Ext show,progress

Ext.BLANK_IMAGE_URL  =   " /learn/ext/resources/images/default/s.gif " ;
function  alertE()  {
    Ext.Msg.confirm(
"<font size='4'>提示</font>",
            
"<font color='red'>ExtJs世界你好,这是我的第一个Ext程序!</font>", callBack);
    
function callBack(id) {
        alert(
"你点击的ID是:" + id);
    }

}
;
function  promptE()  {
    Ext.Msg.prompt(
"<font size='4'>输入</font>",
            
"<font color='red'>ExtJs世界你好,这是我的第一个Ext程序!</font>", callBack, this,
            
true);
    
function callBack(id, msg) {
        alert(
"你点击的ID是:" + id + ",消息:" + msg);
    }

}
;
function  wateE()  {
    Ext.Msg.wait(
"等待时间长的操作""提示"{
                text : 
"进度条上的文字"
            }
)
}

function  showE()  {
    Ext.Msg.buttonText.yes 
= "保存";
    Ext.Msg.buttonText.no 
= "清除";
    
var msgBox = Ext.Msg.show({
                title : 
"提示",
                msg : 
"自我介绍一下,我是HuyVanpull哈!!",
                modal : 
true,
                prompt : 
true,
                value : 
"请输入内容..",
                progress : 
true,
                progressText : 
"保存进度0%",
                buttons : Ext.Msg.YESNOCANCEL,
                fn : callBack
            }
)
    
function callBack(id, msg) {
        alert(
"按钮的ID是:" + id + ",内容:" + msg);
    }

    
var count = 0;
    Ext.TaskMgr.start(
{
                run : 
function() {
                    count
++;
                    
if (count > 100{
                        msgBox.hide();
                    }

                    
// msgBox.updateText("时间:"+new Date().format('Y-m-d g:i:s
                    // A'));
                    msgBox.updateProgress(count / 100"还剩" + (100 - count)
                                    
+ "秒关闭窗口""当前时间:"
                                    
+ new Date().format('Y-m-d g:i:s A'));
                }
,
                interval : 
1000
            }
)
}

function  progressBarE1()  {
    
var ProgressBar = new Ext.ProgressBar({
                text : 
"working",
                width : 
300,
                applyTo : 
"ProgressBar"
            }
);
    
var count = 0;
    
var percentage = 0;
    
var progressText = "";
    Ext.TaskMgr.start(
{
                run : 
function() {
                    count
++;
                    
if (count > 100{
                        ProgressBar.hide();
                    }

                    percentage 
= count / 100;
                    progressText 
= percentage * 100 + "%";
                    ProgressBar.updateProgress(percentage, progressText)
                }
,
                interval : 
1000
            }
)
}

function  progressBarE2()  {
    
var ProgressBar = new Ext.ProgressBar({
                text : 
"working",
                width : 
300,
                applyTo : 
"ProgressBar"
            }
);
    ProgressBar.wait(
{
                duration : 
100000,
                interval : 
10,
                increment : 
1000,
                scope : 
this,
                fn : 
function() {
                    alert(
"更新完毕");
                }

            }
)
}

Ext.onReady(progressBarE2);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值