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
ddb69e8c
authored
2013-11-01 00:15:08 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Reorder binders.
1 parent
28fbf16b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
src/binders.coffee
src/binders.coffee
View file @
ddb69e8
# Core binders that are included with Rivets.js.
Rivets
.
binders
.
text
=
(
el
,
value
)
->
if
el
.
textContent
?
el
.
textContent
=
if
value
?
then
value
else
''
else
el
.
innerText
=
if
value
?
then
value
else
''
Rivets
.
binders
.
html
=
(
el
,
value
)
->
el
.
innerHTML
=
if
value
?
then
value
else
''
Rivets
.
binders
.
show
=
(
el
,
value
)
->
el
.
style
.
display
=
if
value
then
''
else
'none'
Rivets
.
binders
.
hide
=
(
el
,
value
)
->
el
.
style
.
display
=
if
value
then
'none'
else
''
Rivets
.
binders
.
enabled
=
(
el
,
value
)
->
el
.
disabled
=
!
value
...
...
@@ -29,15 +45,6 @@ Rivets.binders.unchecked =
else
el
.
checked
=
!
value
Rivets
.
binders
.
show
=
(
el
,
value
)
->
el
.
style
.
display
=
if
value
then
''
else
'none'
Rivets
.
binders
.
hide
=
(
el
,
value
)
->
el
.
style
.
display
=
if
value
then
'none'
else
''
Rivets
.
binders
.
html
=
(
el
,
value
)
->
el
.
innerHTML
=
if
value
?
then
value
else
''
Rivets
.
binders
.
value
=
publishes
:
true
bind
:
(
el
)
->
...
...
@@ -56,12 +63,6 @@ Rivets.binders.value =
else
if
value
?
.
toString
()
isnt
el
.
value
?
.
toString
()
el
.
value
=
if
value
?
then
value
else
''
Rivets
.
binders
.
text
=
(
el
,
value
)
->
if
el
.
textContent
?
el
.
textContent
=
if
value
?
then
value
else
''
else
el
.
innerText
=
if
value
?
then
value
else
''
Rivets
.
binders
.
if
=
block
:
true
...
...
Please
register
or
sign in
to post a comment