8337496b by Michael Richards

Build 0.3.10.

1 parent c102b078
// 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) {
......
{
"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",
......
# rivets.js
# version : 0.3.9
# version : 0.3.10
# author : Michael Richards
# license : MIT
......