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
11c6d643
authored
2012-11-08 20:24:06 -0800
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Build 0.4.1.
1 parent
2fa291b5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
lib/rivets.js
lib/rivets.min.js
package.json
src/rivets.coffee
lib/rivets.js
View file @
11c6d64
// rivets.js
// version: 0.4.
0
// version: 0.4.
1
// author: Michael Richards
// license: MIT
(
function
()
{
...
...
@@ -88,12 +88,12 @@
Binding
.
prototype
.
bind
=
function
()
{
var
dependency
,
keypath
,
model
,
_i
,
_len
,
_ref
,
_ref1
,
_ref2
,
_results
;
if
(
this
.
options
.
bypass
)
{
this
.
sync
();
}
else
{
if
((
_ref
=
this
.
binder
.
bind
)
!=
null
)
{
_ref
.
call
(
this
,
this
.
el
);
}
if
(
this
.
options
.
bypass
)
{
this
.
sync
();
}
else
{
Rivets
.
config
.
adapter
.
subscribe
(
this
.
model
,
this
.
keypath
,
this
.
sync
);
if
(
Rivets
.
config
.
preloadData
)
{
this
.
sync
();
...
...
@@ -120,10 +120,10 @@
Binding
.
prototype
.
unbind
=
function
()
{
var
keypath
,
_i
,
_len
,
_ref
,
_ref1
,
_ref2
,
_results
;
if
(
!
this
.
options
.
bypass
)
{
if
((
_ref
=
this
.
binder
.
unbind
)
!=
null
)
{
_ref
.
call
(
this
,
this
.
el
);
}
if
(
!
this
.
options
.
bypass
)
{
Rivets
.
config
.
adapter
.
unsubscribe
(
this
.
model
,
this
.
keypath
,
this
.
sync
);
}
if
((
_ref1
=
this
.
options
.
dependencies
)
!=
null
?
_ref1
.
length
:
void
0
)
{
...
...
@@ -407,10 +407,10 @@
checked
:
{
publishes
:
true
,
bind
:
function
(
el
)
{
return
bindEvent
(
el
,
'change'
,
this
.
publish
);
return
this
.
currentListener
=
bindEvent
(
el
,
'change'
,
this
.
publish
);
},
unbind
:
function
(
el
)
{
return
unbindEvent
(
el
,
'change'
,
this
.
publish
);
return
unbindEvent
(
el
,
'change'
,
this
.
currentListener
);
},
routine
:
function
(
el
,
value
)
{
if
(
el
.
type
===
'radio'
)
{
...
...
@@ -423,10 +423,10 @@
unchecked
:
{
publishes
:
true
,
bind
:
function
(
el
)
{
return
bindEvent
(
el
,
'change'
,
this
.
publish
);
return
this
.
currentListener
=
bindEvent
(
el
,
'change'
,
this
.
publish
);
},
unbind
:
function
(
el
)
{
return
unbindEvent
(
el
,
'change'
,
this
.
publish
);
return
unbindEvent
(
el
,
'change'
,
this
.
currentListener
);
},
routine
:
function
(
el
,
value
)
{
if
(
el
.
type
===
'radio'
)
{
...
...
@@ -448,10 +448,10 @@
value
:
{
publishes
:
true
,
bind
:
function
(
el
)
{
return
bindEvent
(
el
,
'change'
,
this
.
publish
);
return
this
.
currentListener
=
bindEvent
(
el
,
'change'
,
this
.
publish
);
},
unbind
:
function
(
el
)
{
return
unbindEvent
(
el
,
'change'
,
this
.
publish
);
return
unbindEvent
(
el
,
'change'
,
this
.
currentListener
);
},
routine
:
function
(
el
,
value
)
{
var
o
,
_i
,
_len
,
_ref
,
_results
;
...
...
lib/rivets.min.js
View file @
11c6d64
This diff is collapsed.
Click to expand it.
package.json
View file @
11c6d64
{
"name"
:
"rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.4.
0
"
,
"version"
:
"0.4.
1
"
,
"author"
:
"Michael Richards"
,
"url"
:
"http://rivetsjs.com"
,
"main"
:
"./lib/rivets.js"
,
...
...
src/rivets.coffee
View file @
11c6d64
# rivets.js
# version : 0.4.
0
# version : 0.4.
1
# author : Michael Richards
# license : MIT
...
...
Please
register
or
sign in
to post a comment