X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/docs/source/ProgressBar.html
diff --git a/docs/source/ProgressBar.html b/docs/source/ProgressBar.html
index b7e67d8a..c5ed8342 100644
--- a/docs/source/ProgressBar.html
+++ b/docs/source/ProgressBar.html
@@ -1,5 +1,6 @@
+
The source code
@@ -121,7 +122,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
if(text){
this.updateText(text);
}
- if(this.rendered){
+ if(this.rendered && !this.isDestroyed){
var w = Math.floor(value*this.el.dom.firstChild.offsetWidth);
this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));
if(this.textTopEl){
@@ -198,6 +199,7 @@ myAction.on('complete', function(){
this.waitTimer = Ext.TaskMgr.start({
run: function(i){
var inc = o.increment || 10;
+ i -= 1;
this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate);
},
interval: o.interval || 1000,
@@ -276,15 +278,31 @@ myAction.on('complete', function(){
if(this.textTopEl){
this.textTopEl.addClass('x-hidden');
}
+ this.clearTimer();
+ if(hide === true){
+ this.hide();
+ }
+ return this;
+ },
+
+ // private
+ clearTimer : function(){
if(this.waitTimer){
this.waitTimer.onStop = null; //prevent recursion
Ext.TaskMgr.stop(this.waitTimer);
this.waitTimer = null;
}
- if(hide === true){
- this.hide();
+ },
+
+ onDestroy: function(){
+ this.clearTimer();
+ if(this.rendered){
+ if(this.textEl.isComposite){
+ this.textEl.clear();
+ }
+ Ext.destroyMembers(this, 'textEl', 'progressBar', 'textTopEl');
}
- return this;
+ Ext.ProgressBar.superclass.onDestroy.call(this);
}
});
Ext.reg('progress', Ext.ProgressBar);