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 || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
// fixme: should 'checkboxes' be 'items'?
|
||||
// fixme: 'checkboxes' should be 'items'?
|
||||
checkboxes: [],
|
||||
max: 1,
|
||||
min: 1,
|
||||
|
@ -30,9 +30,10 @@ Ox.CheckboxGroup = function(options, self) {
|
|||
.options(options || {})
|
||||
.update({
|
||||
value: function() {
|
||||
var value = Ox.clone(self.options.value);
|
||||
self.options.checkboxes.forEach(function(checkbox, index) {
|
||||
var value = Ox.contains(self.options.value, checkbox.id);
|
||||
if (checkbox.checked != value) {
|
||||
var checked = Ox.contains(value, checkbox.id);
|
||||
if (checked != checkbox.checked) {
|
||||
toggleCheckbox(index);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -105,7 +105,7 @@ Ox.OptionGroup = function(items, min, max, property) {
|
|||
}
|
||||
}
|
||||
return toggled;
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
value <f> get value
|
||||
|
|
Loading…
Reference in a new issue