mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
progressbar: internal methods, fix #3203
This commit is contained in:
parent
d31077469f
commit
d7ca21dbfd
@ -68,7 +68,7 @@ $.widget("ui.progressbar", {
|
|||||||
percentState: this.percentState
|
percentState: this.percentState
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
propagate: function(n,e) {
|
_propagate: function(n,e) {
|
||||||
$.ui.plugin.call(this, n, [e, this.ui()]);
|
$.ui.plugin.call(this, n, [e, this.ui()]);
|
||||||
this.element.triggerHandler(n == "progressbar" ? n : ["progressbar", n].join(""), [e, this.ui()], this.options[n]);
|
this.element.triggerHandler(n == "progressbar" ? n : ["progressbar", n].join(""), [e, this.ui()], this.options[n]);
|
||||||
},
|
},
|
||||||
@ -106,12 +106,12 @@ $.widget("ui.progressbar", {
|
|||||||
options.duration
|
options.duration
|
||||||
);
|
);
|
||||||
|
|
||||||
this.animate();
|
this._animate();
|
||||||
|
|
||||||
this.propagate('start', this.ui());
|
this._propagate('start', this.ui());
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
animate: function() {
|
_animate: function() {
|
||||||
var self = this,
|
var self = this,
|
||||||
options = this.options,
|
options = this.options,
|
||||||
interval = options.interval;
|
interval = options.interval;
|
||||||
@ -135,7 +135,7 @@ $.widget("ui.progressbar", {
|
|||||||
if (self.active) {
|
if (self.active) {
|
||||||
/*TODO*/
|
/*TODO*/
|
||||||
self.stop();
|
self.stop();
|
||||||
self.animate();
|
self._animate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ $.widget("ui.progressbar", {
|
|||||||
pause: function() {
|
pause: function() {
|
||||||
if (this.disabled) return;
|
if (this.disabled) return;
|
||||||
this.bar.stop();
|
this.bar.stop();
|
||||||
this.propagate('pause', this.ui());
|
this._propagate('pause', this.ui());
|
||||||
},
|
},
|
||||||
stop: function() {
|
stop: function() {
|
||||||
this.bar.stop();
|
this.bar.stop();
|
||||||
@ -152,7 +152,7 @@ $.widget("ui.progressbar", {
|
|||||||
this.textElement.width(0);
|
this.textElement.width(0);
|
||||||
this.bar.addClass('ui-hidden');
|
this.bar.addClass('ui-hidden');
|
||||||
this.options.interval = this.options._interval;
|
this.options.interval = this.options._interval;
|
||||||
this.propagate('stop', this.ui());
|
this._propagate('stop', this.ui());
|
||||||
},
|
},
|
||||||
progress: function(percentState) {
|
progress: function(percentState) {
|
||||||
if (this.bar.is('.ui-hidden')) {
|
if (this.bar.is('.ui-hidden')) {
|
||||||
@ -167,7 +167,7 @@ $.widget("ui.progressbar", {
|
|||||||
if (this.options.range && !this.options.text) {
|
if (this.options.range && !this.options.text) {
|
||||||
this.textElement.html(Math.round(this.percentState) + '%');
|
this.textElement.html(Math.round(this.percentState) + '%');
|
||||||
}
|
}
|
||||||
this.propagate('progress', this.ui());
|
this._propagate('progress', this.ui());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user