forked from 0x2620/oxjs
update progress bar
This commit is contained in:
parent
2f740a972a
commit
7ca9a4a9e7
8 changed files with 202 additions and 70 deletions
|
|
@ -88,7 +88,6 @@ Ox.Button = function(options, self) {
|
|||
|
||||
if (Ox.isArray(options.tooltip)) {
|
||||
self.options.tooltip = options.tooltip;
|
||||
//Ox.print('TOOLTIP', self.options.tooltip);
|
||||
that.$tooltip.options({
|
||||
title: self.options.tooltip[self.value]
|
||||
});
|
||||
|
|
@ -127,6 +126,7 @@ Ox.Button = function(options, self) {
|
|||
self.setOption = function(key, value) {
|
||||
if (key == 'disabled') {
|
||||
that.attr({disabled: value}).toggleClass('OxDisabled');
|
||||
value && that.$tooltip && that.$tooltip.hide();
|
||||
} else if (key == 'tooltip') {
|
||||
that.$tooltip.options({title: value});
|
||||
} else if (key == 'title') {
|
||||
|
|
@ -145,7 +145,7 @@ Ox.Button = function(options, self) {
|
|||
that.toggle = function() {
|
||||
if (self.options.values.length) {
|
||||
self.value = 1 - Ox.getPositionById(self.options.values, self.options.value);
|
||||
//Ox.print('S:O:', self.options, self.value)
|
||||
Ox.print('S:O:', self.options, self.value)
|
||||
self.options.title = self.options.values[self.value].title;
|
||||
self.options.value = self.options.values[self.value].id;
|
||||
setTitle();
|
||||
|
|
@ -158,6 +158,7 @@ Ox.Button = function(options, self) {
|
|||
self.options.value = !self.options.value;
|
||||
}
|
||||
self.options.selectable && that.toggleClass('OxSelected');
|
||||
return that;
|
||||
}
|
||||
|
||||
return that;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue