Ext进度条,在相应的地方直接调用UICtrl.InitForm中的showProgress就可以。
UICtrl.initForm = null;
UICtrl.InitForm = function(){
Ext.MessageBox.show({
// 等待标题
title : "请等待正在系统初始化......",
// 允许进度条
progress : true,
// 设置宽度
width : 300
});
// 控制进度速度
var f = function(v,msg) {
// 返回进度条 状态
return function() {
// 到了11 隐藏
if (v == 12) {
Ext.MessageBox.hide();
} else {
var i = v / 11;
Ext.MessageBox.updateProgress( i, Math.round(100 * i) + '%');
Ext.MessageBox.updateText(msg);
}
};
};
this.showProgress = function(v,msg){
setTimeout(f(v,msg), 2000); ;
}
}