Ox.CheckboxGroup: handle value change

This commit is contained in:
rolux 2013-10-31 13:47:12 +01:00
parent c9bbdec039
commit 2c595008fd

View file

@ -29,6 +29,14 @@ Ox.CheckboxGroup = function(options, self) {
})
.options(options || {})
.update({
value: function() {
self.options.checkboxes.forEach(function(checkbox, index) {
var value = Ox.contains(self.options.value, checkbox.id);
if (checkbox.checked != value) {
toggleCheckbox(index);
}
});
},
width: function() {
self.$checkboxes.forEach(function($checkbox) {
$checkbox.options({width: self.options.width});