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
87f558a9
authored
2012-07-09 02:31:35 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove the unbind function from Rivets.Binding until there's a fix for unsubscribing.
1 parent
61c73853
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
17 deletions
lib/rivets.js
src/rivets.coffee
lib/rivets.js
View file @
87f558a
...
...
@@ -14,8 +14,6 @@
this
.
model
=
model
;
this
.
keypath
=
keypath
;
this
.
formatters
=
formatters
!=
null
?
formatters
:
[];
this
.
unbind
=
__bind
(
this
.
unbind
,
this
);
this
.
publish
=
__bind
(
this
.
publish
,
this
);
this
.
bind
=
__bind
(
this
.
bind
,
this
);
...
...
@@ -52,14 +50,6 @@
return
Rivets
.
config
.
adapter
.
publish
(
this
.
model
,
this
.
keypath
,
getInputValue
(
el
));
};
Binding
.
prototype
.
unbind
=
function
()
{
var
_ref
;
Rivets
.
config
.
adapter
.
unsubscribe
(
this
.
model
,
this
.
keypath
,
this
.
set
);
if
(
_ref
=
this
.
type
,
__indexOf
.
call
(
bidirectionals
,
_ref
)
>=
0
)
{
return
this
.
el
.
removeEventListener
(
'change'
,
this
.
publish
);
}
};
return
Binding
;
})();
...
...
src/rivets.coffee
View file @
87f558a
...
...
@@ -38,13 +38,6 @@ class Rivets.Binding
el
=
e
.
target
or
e
.
srcElement
Rivets
.
config
.
adapter
.
publish
@
model
,
@
keypath
,
getInputValue
el
# Unsubscribes from the model and the element
unbind
:
=>
Rivets
.
config
.
adapter
.
unsubscribe
@
model
,
@
keypath
,
@
set
if
@
type
in
bidirectionals
@
el
.
removeEventListener
'change'
,
@
publish
# A collection of bindings for a parent element.
class
Rivets
.
View
# The parent DOM element and the model objects for binding are passed into the
...
...
Please
register
or
sign in
to post a comment