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
e0b6c36b
authored
2012-09-02 16:35:22 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Build 0.3.5.
1 parent
cebdbf06
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
9 deletions
lib/rivets.js
lib/rivets.min.js
package.json
src/rivets.coffee
lib/rivets.js
View file @
e0b6c36
// rivets.js
// version: 0.3.
4
// version: 0.3.
5
// author: Michael Richards
// license: MIT
(
function
()
{
...
...
@@ -64,16 +64,13 @@
};
Binding
.
prototype
.
set
=
function
(
value
)
{
value
=
this
.
formattedValue
(
value
);
value
=
value
instanceof
Function
&&
this
.
options
.
special
!==
"event"
?
this
.
formattedValue
(
value
.
call
(
this
.
model
))
:
this
.
formattedValue
(
value
);
if
(
this
.
options
.
special
===
"event"
)
{
this
.
routine
(
this
.
el
,
value
,
this
.
currentListener
);
return
this
.
currentListener
=
value
;
}
else
if
(
this
.
options
.
special
===
"iteration"
)
{
return
this
.
routine
(
this
.
el
,
value
,
this
);
}
else
{
if
(
value
instanceof
Function
)
{
value
=
value
.
call
(
this
.
model
);
}
return
this
.
routine
(
this
.
el
,
value
);
}
};
...
...
@@ -294,7 +291,14 @@
})();
bindEvent
=
function
(
el
,
event
,
fn
)
{
if
(
window
.
addEventListener
)
{
if
(
window
.
jQuery
!=
null
)
{
el
=
jQuery
(
el
);
if
(
el
.
on
!=
null
)
{
return
el
.
on
(
event
,
fn
);
}
else
{
return
el
.
bind
(
event
,
fn
);
}
}
else
if
(
window
.
addEventListener
!=
null
)
{
return
el
.
addEventListener
(
event
,
fn
,
false
);
}
else
{
event
=
"on"
+
event
;
...
...
@@ -303,7 +307,14 @@
};
unbindEvent
=
function
(
el
,
event
,
fn
)
{
if
(
window
.
removeEventListener
)
{
if
(
window
.
jQuery
!=
null
)
{
el
=
jQuery
(
el
);
if
(
el
.
off
!=
null
)
{
return
el
.
off
(
event
,
fn
);
}
else
{
return
el
.
unbind
(
event
,
fn
);
}
}
else
if
(
window
.
removeEventListener
)
{
return
el
.
removeEventListener
(
event
,
fn
,
false
);
}
else
{
event
=
"on"
+
event
;
...
...
lib/rivets.min.js
View file @
e0b6c36
This diff is collapsed.
Click to expand it.
package.json
View file @
e0b6c36
{
"name"
:
"rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.3.
4
"
,
"version"
:
"0.3.
5
"
,
"author"
:
"Michael Richards"
,
"url"
:
"http://rivetsjs.com"
,
"main"
:
"./lib/rivets.js"
,
...
...
src/rivets.coffee
View file @
e0b6c36
# rivets.js
# version : 0.3.
4
# version : 0.3.
5
# author : Michael Richards
# license : MIT
...
...
Please
register
or
sign in
to post a comment