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
0dc2fa3f
authored
2012-07-01 15:29:13 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add some code documentation for the Rivets.View class.
1 parent
f093f839
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
src/rivets.coffee
src/rivets.coffee
View file @
0dc2fa3
...
...
@@ -30,10 +30,14 @@ class Rivets.Binding
@
el
.
addEventListener
'change'
,
(
el
)
=>
Rivets
.
config
.
adapter
.
publish
@
context
,
@
keypath
,
getInputValue
el
# Parses and stores the binding data for an entire view binding.
class
Rivets
.
View
# Takes the parent DOM element as well as all the context objects that are to
# be binded to the view.
constructor
:
(
@
el
,
@
contexts
)
->
@
build
()
# Parses and builds new Rivets.Binding instances for the data bindings.
build
:
=>
@
bindings
=
[]
...
...
@@ -46,6 +50,7 @@ class Rivets.View
keypath
=
path
.
join
'.'
@
bindings
.
push
new
Rivets
.
Binding
node
,
type
,
context
,
keypath
# Binds all of the current bindings for this view.
bind
:
=>
binding
.
bind
()
for
binding
in
@
bindings
...
...
Please
register
or
sign in
to post a comment