用window实现类似Ext.msg.alert()效果
公司的项目没有使用ifram,所以整个项目就一张页面,导致当使用Ext.msg.alert()后会遮罩整个界面。如果我只想遮罩右边的tab而让左边的tree依然还能用的话就只有重写一个window来代替alert。然后自己再通过mask()方法来手工控制遮罩
Ext.create('Ext.window.Window', {title : title,id : id,renderTo : renderTo,resizable : false,constrain : true,border : false,cls : Ext.baseCSSPrefix + 'message-box',buttonAlign : 'center',width : 250,height : 115,items : [{xtype : 'container',anchor : '100%',style : {padding : '10px',overflow : 'hidden'},items : [{xtype : 'image',src : '/btoc/resource/app/images/icon-question.gif',width : 32,height : 32,style : {'float' : 'left'}}, {xtype : 'label',padding : '0 0 0 20',text : msg}]}],buttons : [{text : '确定',handler : ok}, {text : '取消',handler : function(btn) {btn.up('window').close();}}]}).show();?
?
?