Fixes Hardware View gridPanel for ExtJS6

* uses Ext.apply() instead of applyIf(), because the parent class
 already set a toolbar to 'null', and we want to override that
 * use 'activate' event to redisplay content on page reload
 * use a managed listener via mon() so we ignore events from the store
 when the component is not displayed ( prevent race conditions)
This commit is contained in:
Emmanuel Kasper 2016-03-17 10:31:11 +01:00 committed by Dietmar Maurer
parent fbe1b520b3
commit f09dd6c16d

View File

@ -456,7 +456,7 @@ Ext.define('PVE.qemu.HardwareView', {
}; };
Ext.applyIf(me, { Ext.apply(me, {
url: '/api2/json/' + 'nodes/' + nodename + '/qemu/' + vmid + '/pending', url: '/api2/json/' + 'nodes/' + nodename + '/qemu/' + vmid + '/pending',
interval: 5000, interval: 5000,
selModel: sm, selModel: sm,
@ -526,11 +526,11 @@ Ext.define('PVE.qemu.HardwareView', {
me.callParent(); me.callParent();
me.on('show', me.rstore.startUpdate); me.on('activate', me.rstore.startUpdate);
me.on('hide', me.rstore.stopUpdate); me.on('hide', me.rstore.stopUpdate);
me.on('destroy', me.rstore.stopUpdate); me.on('destroy', me.rstore.stopUpdate);
me.rstore.on('datachanged', function() { me.mon(me.rstore, 'refresh', function() {
set_button_status(); set_button_status();
}); });
} }