1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Ext.MessageBox.show({
title: 'Please wait',
msg: 'Loading items...',
progressText: 'Initializing...',
width:300,
progress:true,
closable:false
// animateTarget: 'mb6'
});
var f = function(v){
return function(){
if(v == 12){
Ext.MessageBox.hide();
Ext.example.msg('Done', 'Your fake items were loaded!');
}else{
var i = v/11;
Ext.MessageBox.updateProgress(i, Math.round(100*i)+'% completed');
menu.selectAll(TryCatch.wrap(function (all){
var clstore = grid.store;
clstore.loadData(all);
}), this);
grid.show();
}
};
};
for(var i = 1; i < 13; i++){
setTimeout(f(i), i*500);
} |
Partager