use (de)activate events for dns/timeview

this allows us to properly stop the updatestore when in a
tab/cardpanel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-11-10 12:57:26 +01:00 committed by Dietmar Maurer
parent 4753e65dd6
commit 84af78a1be
2 changed files with 5 additions and 8 deletions

View File

@ -39,7 +39,8 @@ Ext.define('Proxmox.node.DNSView', {
me.callParent();
me.on('activate', me.rstore.startUpdate);
me.on('deactivate', me.rstore.stopUpdate);
me.on('destroy', me.rstore.stopUpdate);
me.rstore.startUpdate();
}
});

View File

@ -50,12 +50,8 @@ Ext.define('Proxmox.node.TimeView', {
me.callParent();
me.rstore.startUpdate();
},
onDestroy: function() {
var me = this;
me.rstore.stopUpdate();
me.callParent();
me.on('activate', me.rstore.startUpdate);
me.on('deactivate', me.rstore.stopUpdate);
me.on('destroy', me.rstore.stopUpdate);
}
});