Ext.Window 中 closeAction 的自定义函数
Custom function on closeAction in Ext.Window
我添加了extjs window如下,
var popupWindow = me.popupWindow = new Ext.window.Window({
autoHeight: true,
itemId: 'popup',
cls: 'premier-window',
width: 550,
height: 280,
layout: {
pack: 'center'
},
shadow: false,
modal: true,
frame: false,
resizable: false,
isPremierPanel: true,
usePremierCloseButton: true,
closeAction: 'hide',
dockedItems: [
{
dock: 'bottom',
xtype: 'toolbar',
itemId: 'button_toolbar',
style: 'background:#F5F3F4;broder:0',
items: [
{
dock: 'bottom',
xtype: 'button',
itemId: 'btnOk',
style: 'margin-left:230px;background:#D3D3D3;',
text: 'OK',
width: 70,
handler: me.okClicked,
scope: me
}
]
}
],
style: 'background-color:#F5F3F4; font-size:11px; padding-bottom:10px; margin-left:10px;',
html: '<div style="padding-left: 7px;padding-right: 7px;padding-top: 7px;font-size:12px;">'
});
popupWindow.show();
popupWindow.setTitle('Restricted Access');
如何自定义 extjs 的 closeAction 功能window?
我想做一些事情,而不是在单击 window 的默认关闭按钮时销毁或隐藏 window。
listeners:{
beforeclose:function() {
if(I_DONT_WANT_TO_CLOSE) {
doSomethingAndDontCloseTheWindow()
return false;
}
}
close:function() {
doSomethingAfterWindowHasBeenClosed();
}
}
beforeclose
在文档中。
close
在文档中。
我添加了extjs window如下,
var popupWindow = me.popupWindow = new Ext.window.Window({
autoHeight: true,
itemId: 'popup',
cls: 'premier-window',
width: 550,
height: 280,
layout: {
pack: 'center'
},
shadow: false,
modal: true,
frame: false,
resizable: false,
isPremierPanel: true,
usePremierCloseButton: true,
closeAction: 'hide',
dockedItems: [
{
dock: 'bottom',
xtype: 'toolbar',
itemId: 'button_toolbar',
style: 'background:#F5F3F4;broder:0',
items: [
{
dock: 'bottom',
xtype: 'button',
itemId: 'btnOk',
style: 'margin-left:230px;background:#D3D3D3;',
text: 'OK',
width: 70,
handler: me.okClicked,
scope: me
}
]
}
],
style: 'background-color:#F5F3F4; font-size:11px; padding-bottom:10px; margin-left:10px;',
html: '<div style="padding-left: 7px;padding-right: 7px;padding-top: 7px;font-size:12px;">'
});
popupWindow.show();
popupWindow.setTitle('Restricted Access');
如何自定义 extjs 的 closeAction 功能window?
我想做一些事情,而不是在单击 window 的默认关闭按钮时销毁或隐藏 window。
listeners:{
beforeclose:function() {
if(I_DONT_WANT_TO_CLOSE) {
doSomethingAndDontCloseTheWindow()
return false;
}
}
close:function() {
doSomethingAfterWindowHasBeenClosed();
}
}
beforeclose
在文档中。close
在文档中。