ui: datastore options: factor out update stop/start to controller

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-04-12 16:18:43 +02:00
parent 38774184a9
commit 6353e22c00

View File

@ -64,6 +64,15 @@ Ext.define('PBS.Datastore.Options', {
},
});
},
stopUpdates: function() {
let view = this.getView();
view.rstore.stopUpdate();
},
startUpdates: function() {
let view = this.getView();
view.rstore.startUpdate();
},
},
tbar: [
@ -84,9 +93,9 @@ Ext.define('PBS.Datastore.Options', {
],
listeners: {
activate: function() { this.rstore.startUpdate(); },
destroy: function() { this.rstore.stopUpdate(); },
deactivate: function() { this.rstore.stopUpdate(); },
activate: 'startUpdates',
beforedestroy: 'stopUpdates',
deactivate: 'stopUpdates',
itemdblclick: 'edit',
},