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
557742db
authored
2013-05-23 00:50:06 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update the handler API and simplify the on-* binder's routine to use the eventHandler factory.
1 parent
a5a6ad5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
src/rivets.coffee
src/rivets.coffee
View file @
557742d
...
...
@@ -368,10 +368,8 @@ Rivets.binders =
Rivets
.
Util
.
unbindEvent
el
,
@
args
[
0
],
@
handler
if
@
handler
routine
:
(
el
,
value
)
->
binding
=
this
Rivets
.
Util
.
unbindEvent
el
,
@
args
[
0
],
@
handler
if
@
handler
@
handler
=
(
ev
)
->
binding
.
view
.
config
.
handler
value
,
@
,
ev
,
binding
Rivets
.
Util
.
bindEvent
el
,
@
args
[
0
],
@
handler
Rivets
.
Util
.
bindEvent
el
,
@
args
[
0
],
@
handler
=
@
eventHandler
value
"each-*"
:
block
:
true
...
...
@@ -451,8 +449,8 @@ Rivets.binders =
# overridden globally or local to a `Rivets.View` instance.
Rivets
.
config
=
preloadData
:
true
handler
:
(
fn
,
context
,
ev
,
binding
)
->
fn
.
call
context
,
ev
,
binding
.
view
.
models
handler
:
(
context
,
ev
,
binding
)
->
@
call
context
,
ev
,
binding
.
view
.
models
# Rivets.formatters
# -----------------
...
...
Please
register
or
sign in
to post a comment