indeterminate checkboxes...
This commit is contained in:
parent
2944379b71
commit
d9ef18d482
1 changed files with 6 additions and 2 deletions
|
@ -47,7 +47,7 @@ Ox.Checkbox = function(options, self) {
|
||||||
} else {
|
} else {
|
||||||
self.$button.options({values: ['none', 'check']});
|
self.$button.options({values: ['none', 'check']});
|
||||||
self.$button.options({
|
self.$button.options({
|
||||||
value: self.options.value ? 'none' : 'check'
|
value: self.options.value ? 'check' : 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -121,7 +121,11 @@ Ox.Checkbox = function(options, self) {
|
||||||
|
|
||||||
function clickButton() {
|
function clickButton() {
|
||||||
self.options.value = !self.options.value;
|
self.options.value = !self.options.value;
|
||||||
self.options.indeterminate = false;
|
if (self.options.indeterminate) {
|
||||||
|
self.options.indeterminate = false;
|
||||||
|
self.$button.options({values: ['none', 'check']});
|
||||||
|
self.$button.options({value: self.options.value ? 'check' : 'none'});
|
||||||
|
}
|
||||||
that.triggerEvent('change', {
|
that.triggerEvent('change', {
|
||||||
value: self.options.value
|
value: self.options.value
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue