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
5cd20248
authored
2013-01-11 20:26:31 -0800
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Build 0.4.5.
1 parent
14b3c772
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
18 deletions
component.json
lib/rivets.js
lib/rivets.min.js
package.json
src/rivets.coffee
component.json
View file @
5cd2024
...
...
@@ -2,7 +2,7 @@
"name"
:
"rivets"
,
"repo"
:
"mikeric/rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.4.
4
"
,
"version"
:
"0.4.
5
"
,
"keywords"
:
[
"data binding"
,
"template"
],
"scripts"
:
[
"lib/rivets.js"
],
"main"
:
"lib/rivets.js"
,
...
...
lib/rivets.js
View file @
5cd2024
// rivets.js
// version: 0.4.
4
// version: 0.4.
5
// author: Michael Richards
// license: MIT
(
function
()
{
...
...
@@ -535,22 +535,28 @@
el
.
parentNode
.
removeChild
(
el
);
}
this
.
iterated
=
[];
_results
=
[];
for
(
_k
=
0
,
_len2
=
collection
.
length
;
_k
<
_len2
;
_k
++
)
{
item
=
collection
[
_k
];
data
=
{};
_ref2
=
this
.
view
.
models
;
for
(
n
in
_ref2
)
{
m
=
_ref2
[
n
];
data
[
n
]
=
m
;
if
(
collection
)
{
_results
=
[];
for
(
_k
=
0
,
_len2
=
collection
.
length
;
_k
<
_len2
;
_k
++
)
{
item
=
collection
[
_k
];
data
=
{};
_ref2
=
this
.
view
.
models
;
for
(
n
in
_ref2
)
{
m
=
_ref2
[
n
];
data
[
n
]
=
m
;
}
data
[
this
.
args
[
0
]]
=
item
;
itemEl
=
el
.
cloneNode
(
true
);
if
(
this
.
iterated
.
length
>
0
)
{
previous
=
this
.
iterated
[
this
.
iterated
.
length
-
1
].
els
[
0
];
}
else
{
previous
=
this
.
marker
;
}
this
.
marker
.
parentNode
.
insertBefore
(
itemEl
,
(
_ref3
=
previous
.
nextSibling
)
!=
null
?
_ref3
:
null
);
_results
.
push
(
this
.
iterated
.
push
(
rivets
.
bind
(
itemEl
,
data
)));
}
data
[
this
.
args
[
0
]]
=
item
;
itemEl
=
el
.
cloneNode
(
true
);
previous
=
this
.
iterated
[
this
.
iterated
.
length
-
1
]
||
this
.
marker
;
this
.
marker
.
parentNode
.
insertBefore
(
itemEl
,
(
_ref3
=
previous
.
nextSibling
)
!=
null
?
_ref3
:
null
);
_results
.
push
(
this
.
iterated
.
push
(
rivets
.
bind
(
itemEl
,
data
)));
return
_results
;
}
return
_results
;
}
},
"class-*"
:
function
(
el
,
value
)
{
...
...
lib/rivets.min.js
View file @
5cd2024
This diff is collapsed.
Click to expand it.
package.json
View file @
5cd2024
{
"name"
:
"rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.4.
4
"
,
"version"
:
"0.4.
5
"
,
"author"
:
"Michael Richards"
,
"url"
:
"http://rivetsjs.com"
,
"main"
:
"./lib/rivets.js"
,
...
...
src/rivets.coffee
View file @
5cd2024
# rivets.js
# version : 0.4.
4
# version : 0.4.
5
# author : Michael Richards
# license : MIT
...
...
Please
register
or
sign in
to post a comment