progressbar: formatting changes

This commit is contained in:
Richard Worth 2008-11-21 04:12:18 +00:00
parent 64f6baeaf4
commit 89a113ba19

View File

@ -13,6 +13,7 @@
(function($) {
$.widget("ui.progressbar", {
_init: function() {
this._interval = this.options.interval;
@ -66,6 +67,17 @@ $.widget("ui.progressbar", {
.appendTo(this.bar);
},
destroy: function() {
this.stop();
this.element
.removeClass("ui-progressbar ui-progressbar-disabled")
.removeData("progressbar").unbind(".progressbar")
.find('.ui-progressbar-wrap').remove();
delete $.easing[this.identifier];
},
_animate: function() {
var self = this,
options = this.options,
@ -98,17 +110,6 @@ $.widget("ui.progressbar", {
);
},
destroy: function() {
this.stop();
this.element
.removeClass("ui-progressbar ui-progressbar-disabled")
.removeData("progressbar").unbind(".progressbar")
.find('.ui-progressbar-wrap').remove();
delete $.easing[this.identifier];
},
disable: function() {
this.element.addClass("ui-progressbar-disabled");
this.disabled = true;
@ -186,14 +187,6 @@ $.widget("ui.progressbar", {
this._trigger('stop', null, this.ui());
},
ui: function() {
return {
options: this.options,
pixelState: this.pixelState,
percentState: this.percentState
};
},
_setData: function(key, value){
switch (key) {
case 'text':
@ -206,18 +199,27 @@ $.widget("ui.progressbar", {
_setText: function(text){
this.textElement.add(this.textBg).html(text);
},
ui: function() {
return {
options: this.options,
pixelState: this.pixelState,
percentState: this.percentState
};
}
});
$.extend($.ui.progressbar, {
version: "@VERSION",
defaults: {
width: 300,
duration: 1000,
interval: 1000,
increment: 1,
interval: 1000,
range: true,
text: ''
text: '',
width: 300
},
uuid: 0