From ca5e5bb67f0a86ee5779746b3189bcf4e827f179 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 4 Jun 2021 11:44:06 +0200 Subject: [PATCH] ui: datastore/OptionView: only navigate up when we removed the datastore and not on window close Signed-off-by: Dominik Csapak (cherry picked from commit 82cae19d192c97a16b7aff45f6c97be878174ca4) Signed-off-by: Thomas Lamprecht --- www/datastore/OptionView.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js index 98152dce..5a5e85be 100644 --- a/www/datastore/OptionView.js +++ b/www/datastore/OptionView.js @@ -33,13 +33,11 @@ Ext.define('PBS.Datastore.Options', { note: gettext('Configuration change only, no data will be deleted.'), autoShow: true, taskName: 'delete-datastore', - listeners: { - destroy: () => { - let navtree = Ext.ComponentQuery.query('navigationtree')[0]; - navtree.rstore.load(); - let mainview = me.getView().up('mainview'); - mainview.getController().redirectTo('pbsDataStores'); - }, + apiCallDone: (success) => { + let navtree = Ext.ComponentQuery.query('navigationtree')[0]; + navtree.rstore.load(); + let mainview = me.getView().up('mainview'); + mainview.getController().redirectTo('pbsDataStores'); }, }); },