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
e0c5ca03
authored
2013-04-03 17:45:39 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Build 0.4.6.
1 parent
b4365a7f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
19 deletions
component.json
lib/rivets.js
lib/rivets.min.js
package.json
src/rivets.coffee
component.json
View file @
e0c5ca0
...
...
@@ -2,8 +2,8 @@
"name"
:
"rivets"
,
"repo"
:
"mikeric/rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.4.
5
"
,
"keywords"
:
[
"data binding"
,
"templat
e
"
],
"version"
:
"0.4.
6
"
,
"keywords"
:
[
"data binding"
,
"templat
ing
"
],
"scripts"
:
[
"lib/rivets.js"
],
"main"
:
"lib/rivets.js"
,
"license"
:
"MIT"
...
...
lib/rivets.js
View file @
e0c5ca0
// rivets.js
// version: 0.4.
5
// version: 0.4.
6
// author: Michael Richards
// license: MIT
(
function
()
{
var
Rivets
,
bindEvent
,
getInputValue
,
rivets
,
unbindEvent
,
var
Rivets
,
bindEvent
,
factory
,
getInputValue
,
unbindEvent
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__slice
=
[].
slice
,
__indexOf
=
[].
indexOf
||
function
(
item
)
{
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
++
)
{
if
(
i
in
this
&&
this
[
i
]
===
item
)
return
i
;
}
return
-
1
;
};
...
...
@@ -480,7 +480,7 @@
return
unbindEvent
(
el
,
'change'
,
this
.
currentListener
);
},
routine
:
function
(
el
,
value
)
{
var
o
,
_i
,
_len
,
_ref
,
_results
;
var
o
,
_i
,
_len
,
_ref
,
_re
f1
,
_re
sults
;
if
(
el
.
type
===
'select-multiple'
)
{
if
(
value
!=
null
)
{
_results
=
[];
...
...
@@ -490,7 +490,7 @@
}
return
_results
;
}
}
else
{
}
else
if
((
value
!=
null
?
value
.
toString
()
:
void
0
)
!==
((
_ref1
=
el
.
value
)
!=
null
?
_ref1
.
toString
()
:
void
0
))
{
return
el
.
value
=
value
!=
null
?
value
:
''
;
}
}
...
...
@@ -581,11 +581,11 @@
Rivets
.
formatters
=
{};
rivets
=
{
binders
:
Rivets
.
binders
,
formatters
:
Rivets
.
formatters
,
config
:
Rivets
.
config
,
configure
:
function
(
options
)
{
factory
=
function
(
exports
)
{
exports
.
binders
=
Rivets
.
binders
;
exports
.
formatters
=
Rivets
.
formatters
;
exports
.
config
=
Rivets
.
config
;
exports
.
configure
=
function
(
options
)
{
var
property
,
value
;
if
(
options
==
null
)
{
options
=
{};
...
...
@@ -594,8 +594,8 @@
value
=
options
[
property
];
Rivets
.
config
[
property
]
=
value
;
}
}
,
bind
:
function
(
el
,
models
)
{
}
;
return
exports
.
bind
=
function
(
el
,
models
)
{
var
view
;
if
(
models
==
null
)
{
models
=
{};
...
...
@@ -603,13 +603,17 @@
view
=
new
Rivets
.
View
(
el
,
models
);
view
.
bind
();
return
view
;
}
}
;
};
if
(
typeof
module
!==
"undefined"
&&
module
!==
null
)
{
module
.
exports
=
rivets
;
if
(
typeof
exports
===
'object'
)
{
factory
(
exports
);
}
else
if
(
typeof
define
===
'function'
&&
define
.
amd
)
{
define
([
'exports'
],
function
(
exports
)
{
return
this
.
rivets
=
factory
(
exports
);
});
}
else
{
this
.
rivets
=
rivets
;
factory
(
this
.
rivets
=
{})
;
}
}).
call
(
this
);
...
...
lib/rivets.min.js
View file @
e0c5ca0
This diff is collapsed.
Click to expand it.
package.json
View file @
e0c5ca0
{
"name"
:
"rivets"
,
"description"
:
"Declarative data binding facility."
,
"version"
:
"0.4.
5
"
,
"version"
:
"0.4.
6
"
,
"author"
:
"Michael Richards"
,
"url"
:
"http://rivetsjs.com"
,
"main"
:
"./lib/rivets.js"
,
...
...
src/rivets.coffee
View file @
e0c5ca0
# rivets.js
# version : 0.4.
5
# version : 0.4.
6
# author : Michael Richards
# license : MIT
...
...
Please
register
or
sign in
to post a comment