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
c102b078
authored
2012-09-23 12:06:29 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'multiple-select-support'
2 parents
f6c70967
20c0b4b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
src/rivets.coffee
src/rivets.coffee
View file @
c102b07
...
...
@@ -240,6 +240,7 @@ unbindEvent = (el, event, fn) ->
getInputValue
=
(
el
)
->
switch
el
.
type
when
'checkbox'
then
el
.
checked
when
'select-multiple'
then
o
.
value
for
o
in
el
when
o
.
selected
else
el
.
value
# Returns an event binding routine for the specified event.
...
...
@@ -311,6 +312,9 @@ Rivets.routines =
html
:
(
el
,
value
)
->
el
.
innerHTML
=
if
value
?
then
value
else
''
value
:
(
el
,
value
)
->
if
el
.
type
is
'select-multiple'
o
.
selected
=
o
.
value
in
value
for
o
in
el
if
value
?
else
el
.
value
=
if
value
?
then
value
else
''
text
:
(
el
,
value
)
->
if
el
.
innerText
?
...
...
Please
register
or
sign in
to post a comment