Ox.CheckboxGroup: handle value change
This commit is contained in:
parent
c9bbdec039
commit
2c595008fd
1 changed files with 8 additions and 0 deletions
|
@ -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});
|
||||
|
|
Loading…
Reference in a new issue