代码都在附件里了var HelloWorld = function(){
// everything in this space is private and only accessible in the HelloWorld block
// define some private variables
var dialog, showBtn;
// return a public interface
return {
init : function(){
showBtn = Ext.get('show-dialog-btn');
// attach to click event
showBtn.on('click', this.showDialog, this);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new Ext.BasicDialog("hello-dlg", {
modal:true,
autoTabs:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Submit', this.ok, dialog);
dialog.addButton('Close', dialog.hide, dialog);
}
dialog.show(showBtn.dom);
},
ok:function (){
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?',function(btn){
if(btn == 'yes') {
dialog.hide();
}
else{
//在这里写隐藏select..fLASH等元素的代码
}
})
}
};
}();// using onDocumentReady instead of window.onload initializes the application
// when the DOM is ready, without waiting for images and other resources to load
Ext.onReady(HelloWorld.init, HelloWorld, true);
// everything in this space is private and only accessible in the HelloWorld block
// define some private variables
var dialog, showBtn;
// return a public interface
return {
init : function(){
showBtn = Ext.get('show-dialog-btn');
// attach to click event
showBtn.on('click', this.showDialog, this);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new Ext.BasicDialog("hello-dlg", {
modal:true,
autoTabs:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Submit', this.ok, dialog);
dialog.addButton('Close', dialog.hide, dialog);
}
dialog.show(showBtn.dom);
},
ok:function (){
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?',function(btn){
if(btn == 'yes') {
dialog.hide();
}
else{
//在这里写隐藏select..fLASH等元素的代码
}
})
}
};
}();// using onDocumentReady instead of window.onload initializes the application
// when the DOM is ready, without waiting for images and other resources to load
Ext.onReady(HelloWorld.init, HelloWorld, true);
// everything in this space is private and only accessible in the HelloWorld block
// define some private variables
var dialog, showBtn;
// return a public interface
return {
init : function(){
showBtn = Ext.get('show-dialog-btn');
// attach to click event
showBtn.on('click', this.showDialog, this);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new Ext.BasicDialog("hello-dlg", {
modal:true,
autoTabs:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Submit', this.ok, dialog);
dialog.addButton('Close', dialog.hide, dialog);
}
dialog.show(showBtn.dom);
},
ok:function (){
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?',function(btn){
if(btn == 'yes') {
dialog.hide();
}
else{
//在这里写隐藏select..fLASH等元素的代码加上下面这句就可以了!
Ext.get(document.body).addClass("x-body-masked");
}
})
}
};
}();// using onDocumentReady instead of window.onload initializes the application
// when the DOM is ready, without waiting for images and other resources to load
Ext.onReady(HelloWorld.init, HelloWorld, true);
这样写:Ext.onReady(HelloWorld.init, HelloWorld, true);
就会报:l.fireFn is undefined
[在此错误处中断] Ext.util.Observable=function(){if(this...is.firing=false;}return true;}};})(); 什么都出不来是怎么回事啊???求助