Ext初级学习-Windows
来源:互联网 发布:盟军敢死队2 for mac 编辑:程序博客网 时间:2024/06/06 17:38
//Ext创建Windows弹出面板,以及Ext.MessageBox一些弹出窗口的简单样例语句
Ext.onReady(function(){
var win,
button=Ext.get("but_id"); //获取页面ID
button.on('click',function(){
if(!win){
win = Ext.create('widget.window',{
title:'Layout Window',
closable:true,
closeAction:'hide',
width:600,
minWidth:350,
height:350,
layout:'border',
bodyStyle:'padding:5px;',
items:[
{
region:'west',
title:'navigation',
width:200,
split :true,
collapsible:true,
floatable:false
},{
region:'center',
xtype:'tabpanel',
items: [{
title:'Bogus Tab',
html:'Hello World 1'
},{
title:'Another Tab',
html:'Hello World 2'
},{
title:'Closable Tab',
html:'Hello Word 3',
closable:true
}]
}]
});
}
});
});
Ext.onReady(function(){
//confirm
Ext.get('mb1').on('click',function(e){
Ext.MessageBox.confirm('Confirm','Are you sure to do that?',showResult);
});
//prompt
Ext.get('mb1').on('click',function(e){
Ext.MessageBox.prompt('Name','Please enter you name:',showResultText);
});
//Multi-line Prompt
Ext.get('mb1').on('click'.function(e){
Ext.MessageBox.show({
title:'Address',
msg:'Please enter you address:',
width:300,
buttons:Ext.MessageBox.OKCANCEL,
multiline:true,
fn:showResultText,
animateTarget: 'mb3'
});
});
//yes/no/cancel
Ext.get('but1').on('click',function(e){
Ext.MessageBox.show({
title:'Save Changes?',
msg:'You are closing a tab that has unsaved changes. </br> Would you like to save you changes?',
fn: showResultText,
animateTarget:'mb4',
icon:Ext.MessageBox.QUESTION
});
});
//progress Dialog
Ext.get('but1').on('click',function(e){
Ext.MessageBox.show({
title:'Please Wait',
msg:'Loading times......',
progressText:'Initializing...',
width:300,
progress:true,
closable:true,
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');
}
};
};
for (var i=1,i<13;i++){
setTimeout(f(i),i*500);
}
});
//wait
Ext.get('but1').on('click',function(){
Ext.MessageBox.show({
msg:'Saving you data,please wait...',
progressText:'Saving...',
width:300,
wait:true,
waitConfig: {interval:200},
icon:'ext-mb-download',
animateTarget:'but1',
});
setTimeout(function(){
Ext.MessageBox.hide();
Ext.example.msg('Done','Your fake data was saved'),
},8000);
});
Ext.get('but1').on('click',function(){
Ext.MessageBox.alert('Status','Changes saved success',showResult);
});
function showResult(btn){
Ext.example.msg('Click Button','You clicked the {0} button',btn);
}
function showResult(btn,text){
Ext.example.msg('Click Button','You clicked the {0} button and entered the text "{1} " ',btn,text);
}
});
- Ext初级学习-Windows
- ext 选择器 初级学习
- Ext初级入门
- Javascript 之 Ext.Button 初级
- Ext 学习
- Ext学习
- 学习 ext
- ext学习
- 学习EXT
- ext学习
- Ext 学习
- EXT学习
- Ext学习
- ext 学习
- ext学习
- Ext 学习
- EXT学习
- Windows 服务初级
- iframe可编辑 (CRM不免会运用到JS)
- ExtJS的几个小技巧
- 如何设置让IE9不弹出“只显示安全内容”的提示
- oracle官方文档对连接和会话的解释
- httpclient返回string 和流
- Ext初级学习-Windows
- javaBean
- java中的向上转型和向下转型
- Mapreduce程序中的FileInputFormat.addInputPaths和FileInputFormat.addInputPath方法
- CSS温故知新
- iOS 调用系统发短信以及打电话功能
- 连接打印机提示:找不到驱动程序,windows在网络上找不到Canon LBP2900的驱动程序,若要手动查找,请单击“确定”。否则,请单击“取消”并咨询你的网络管理员或者访问打印机制造商的网站
- 1034. Head of a Gang (30)
- hdu/hdoj 1075 FatMouse and Cheese