diff --git a/source/UI/js/Form/Checkbox.js b/source/UI/js/Form/Checkbox.js index da94a77f..25889585 100644 --- a/source/UI/js/Form/Checkbox.js +++ b/source/UI/js/Form/Checkbox.js @@ -47,7 +47,7 @@ Ox.Checkbox = function(options, self) { } else { self.$button.options({values: ['none', 'check']}); 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() { 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', { value: self.options.value });