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
8337496b
authored
12 years ago
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Build 0.3.10.
1 parent
c102b078
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
lib/rivets.js
lib/rivets.min.js
package.json
src/rivets.coffee
lib/rivets.js
View file @
8337496
// rivets.js
// version: 0.3.
9
// version: 0.3.
10
// author: Michael Richards
// license: MIT
(
function
()
{
...
...
@@ -381,9 +381,20 @@
};
getInputValue
=
function
(
el
)
{
var
o
,
_i
,
_len
,
_results
;
switch
(
el
.
type
)
{
case
'checkbox'
:
return
el
.
checked
;
case
'select-multiple'
:
_results
=
[];
for
(
_i
=
0
,
_len
=
el
.
length
;
_i
<
_len
;
_i
++
)
{
o
=
el
[
_i
];
if
(
o
.
selected
)
{
_results
.
push
(
o
.
value
);
}
}
return
_results
;
break
;
default
:
return
el
.
value
;
}
...
...
@@ -488,7 +499,19 @@
return
el
.
innerHTML
=
value
!=
null
?
value
:
''
;
},
value
:
function
(
el
,
value
)
{
var
o
,
_i
,
_len
,
_ref
,
_results
;
if
(
el
.
type
===
'select-multiple'
)
{
if
(
value
!=
null
)
{
_results
=
[];
for
(
_i
=
0
,
_len
=
el
.
length
;
_i
<
_len
;
_i
++
)
{
o
=
el
[
_i
];
_results
.
push
(
o
.
selected
=
(
_ref
=
o
.
value
,
__indexOf
.
call
(
value
,
_ref
)
>=
0
));
}
return
_results
;
}
}
else
{
return
el
.
value
=
value
!=
null
?
value
:
''
;
}
},
text
:
function
(
el
,
value
)
{
if
(
el
.
innerText
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/rivets.min.js
View file @
8337496
This diff is collapsed.
Click to expand it.
package.json
View file @
8337496
{
"name"
:
"rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.3.
9
"
,
"version"
:
"0.3.
10
"
,
"author"
:
"Michael Richards"
,
"url"
:
"http://rivetsjs.com"
,
"main"
:
"./lib/rivets.js"
,
...
...
This diff is collapsed.
Click to expand it.
src/rivets.coffee
View file @
8337496
# rivets.js
# version : 0.3.
9
# version : 0.3.
10
# author : Michael Richards
# license : MIT
...
...
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment