Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
088a0570
authored
2012-09-03 16:54:46 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Implement object specificity for dependent attribute declarations. [Closes #53]
1 parent
1e6b3edf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
src/rivets.coffee
src/rivets.coffee
View file @
088a057
...
...
@@ -80,8 +80,16 @@ class Rivets.Binding
@
sync
()
if
Rivets
.
config
.
preloadData
if
@
options
.
dependencies
?
.
length
for
keypath
in
@
options
.
dependencies
Rivets
.
config
.
adapter
.
subscribe
@
model
,
keypath
,
@
sync
for
dependency
in
@
options
.
dependencies
if
/^\./
.
test
dependency
model
=
@
model
keypath
=
dependency
.
substr
1
else
dependency
=
dependency
.
split
'.'
model
=
@
view
.
models
[
dependency
.
shift
()]
keypath
=
dependency
.
join
'.'
Rivets
.
config
.
adapter
.
subscribe
model
,
keypath
,
@
sync
if
@
isBidirectional
()
bindEvent
@
el
,
'change'
,
@
publish
...
...
Please
register
or
sign in
to post a comment