indeterminate checkboxes...
This commit is contained in:
parent
1472927883
commit
2944379b71
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ Ox.Button = function(options, self) {
|
||||||
if (!self.options.disabled) {
|
if (!self.options.disabled) {
|
||||||
that.$tooltip && that.$tooltip.hide();
|
that.$tooltip && that.$tooltip.hide();
|
||||||
that.triggerEvent('click');
|
that.triggerEvent('click');
|
||||||
if (self.options.values.length > 1 || self.options.selectable) {
|
if (self.options.values.length || self.options.selectable) {
|
||||||
that.toggle();
|
that.toggle();
|
||||||
that.triggerEvent('change', {value: self.options.value});
|
that.triggerEvent('change', {value: self.options.value});
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ Ox.Button = function(options, self) {
|
||||||
() -> <o> toggle button
|
() -> <o> toggle button
|
||||||
@*/
|
@*/
|
||||||
that.toggle = function() {
|
that.toggle = function() {
|
||||||
if (self.options.values.length) {
|
if (self.options.values.length > 1) {
|
||||||
self.value = 1 - Ox.getIndexById(self.options.values, self.options.value);
|
self.value = 1 - Ox.getIndexById(self.options.values, self.options.value);
|
||||||
self.options.title = self.options.values[self.value].title;
|
self.options.title = self.options.values[self.value].title;
|
||||||
self.options.value = self.options.values[self.value].id;
|
self.options.value = self.options.values[self.value].id;
|
||||||
|
|
Loading…
Reference in a new issue