cosmetic changes
This commit is contained in:
parent
b043cca751
commit
397dc8b903
2 changed files with 5 additions and 4 deletions
|
@ -19,7 +19,7 @@ Ox.CheckboxGroup = function(options, self) {
|
||||||
self = self || {};
|
self = self || {};
|
||||||
var that = Ox.Element({}, self)
|
var that = Ox.Element({}, self)
|
||||||
.defaults({
|
.defaults({
|
||||||
// fixme: should 'checkboxes' be 'items'?
|
// fixme: 'checkboxes' should be 'items'?
|
||||||
checkboxes: [],
|
checkboxes: [],
|
||||||
max: 1,
|
max: 1,
|
||||||
min: 1,
|
min: 1,
|
||||||
|
@ -30,9 +30,10 @@ Ox.CheckboxGroup = function(options, self) {
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.update({
|
.update({
|
||||||
value: function() {
|
value: function() {
|
||||||
|
var value = Ox.clone(self.options.value);
|
||||||
self.options.checkboxes.forEach(function(checkbox, index) {
|
self.options.checkboxes.forEach(function(checkbox, index) {
|
||||||
var value = Ox.contains(self.options.value, checkbox.id);
|
var checked = Ox.contains(value, checkbox.id);
|
||||||
if (checkbox.checked != value) {
|
if (checked != checkbox.checked) {
|
||||||
toggleCheckbox(index);
|
toggleCheckbox(index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -105,7 +105,7 @@ Ox.OptionGroup = function(items, min, max, property) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return toggled;
|
return toggled;
|
||||||
}
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
value <f> get value
|
value <f> get value
|
||||||
|
|
Loading…
Reference in a new issue