I have a view which act as container for my grid. This view owns a tbar and a header.
When I add a modal window, the header and the tbar aren't masked.
Mainview:
Ext.define('myApp.view.customer.MyMain', {
extend: 'Ext.panel.Panel',
xtype: 'hlx-customermain',
controller: 'maintoolbar',
plugins: 'viewport',
header: {
xtype: 'myheader'
},
tbar: {
xtype: 'mytoolbar'
},
items: [
{
xtype: 'mygrid'
}
]
});
Grid (which uses the controller to add the window)
Ext.define('myApp.view.customer.MyGrid', {
extend: 'Ext.grid.Panel',
xtype: 'mygrid',
tbar: {
xtype: 'mygridtoolbar'
},
controller: 'mygrid',
store: 'MyGridStore',
columns: [
...
]
});
Function from the ViewController
onCustomerAddClick: function () {
var me = this,
addCustomerWindow = me.lookupReference('addCustomerWindow');
if (!addCustomerWindow) {
addCustomerWindow = new myApp.view.customer.AddCustomer();
me.getView().ownerCt.add(addCustomerWindow);
}
addCustomerWindow.show();
}
Even tough I add it to the ownerContainer - which is the MyMain-class - the tbar and the header aren't masked. See this fiddle to experience the error yourself: https://fiddle.sencha.com/#fiddle/uih
You don't have to add it to it's owner or what so ever. Just do this:
onAddCustomerClick: function () {
/*var me = this,
myWindow = me.lookupReference('myWindow');
if (!myWindow) {
myWindow = new MyWindow();
me.getView().ownerCt.add(myWindow);
}
myWindow.show();*/
var myWindow = Ext.create('MyWindow');
myWindow.show();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.