[pve-devel] [PATCH pve-manager 2/3] reload stores of tabpanel children on 'activate' event

Emmanuel Kasper e.kasper at proxmox.com
Thu Feb 25 13:20:06 CET 2016


Tabpanel reload -> send 'show' event -> reload child panel store

do not work with ExtJS6

but

Tabpanel reload -> reload  child panel ->  child send 'show' event ->
reload a grid store in the panel still works

so we don't blindly replace the 'show' events everywhere but only
when the event was expected by a direct child of a tabpanel
---
 www/manager6/ha/Groups.js         | 2 +-
 www/manager6/ha/Resources.js      | 2 +-
 www/manager6/node/APT.js          | 2 +-
 www/manager6/node/NetworkView.js  | 2 +-
 www/manager6/node/Subscription.js | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/manager6/ha/Groups.js b/www/manager6/ha/Groups.js
index ca0ad51..66ca7d9 100644
--- a/www/manager6/ha/Groups.js
+++ b/www/manager6/ha/Groups.js
@@ -113,7 +113,7 @@ Ext.define('PVE.ha.GroupsView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		beforeselect: function(grid, record, index, eOpts) {
 		    if (!caps.nodes['Sys.Console']) {
 			return false;
diff --git a/www/manager6/ha/Resources.js b/www/manager6/ha/Resources.js
index 4419f38..24552e1 100644
--- a/www/manager6/ha/Resources.js
+++ b/www/manager6/ha/Resources.js
@@ -138,7 +138,7 @@ Ext.define('PVE.ha.ResourcesView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		beforeselect: function(grid, record, index, eOpts) {
 		    if (!caps.nodes['Sys.Console']) {
 			return false;
diff --git a/www/manager6/node/APT.js b/www/manager6/node/APT.js
index aabd341..28301c3 100644
--- a/www/manager6/node/APT.js
+++ b/www/manager6/node/APT.js
@@ -186,7 +186,7 @@ Ext.define('PVE.node.APT', {
 		}
 	    ],
 	    listeners: { 
-		show: reload,
+		activate: reload,
 		itemdblclick: function(v, rec) {
 		    show_changelog(rec);
 		}
diff --git a/www/manager6/node/NetworkView.js b/www/manager6/node/NetworkView.js
index c45107a..93b00fe 100644
--- a/www/manager6/node/NetworkView.js
+++ b/www/manager6/node/NetworkView.js
@@ -319,7 +319,7 @@ Ext.define('PVE.node.NetworkView', {
 		}
 	    ],
 	    listeners: {
-		show: reload
+		activate: reload
 	    }
 	});
 
diff --git a/www/manager6/node/Subscription.js b/www/manager6/node/Subscription.js
index c4e9979..801c8e7 100644
--- a/www/manager6/node/Subscription.js
+++ b/www/manager6/node/Subscription.js
@@ -186,7 +186,7 @@ Ext.define('PVE.node.Subscription', {
 	    ],
 	    rows: rows,
 	    listeners: {
-		show: reload
+		activate: reload
 	    }
 	});
 
-- 
2.1.4





More information about the pve-devel mailing list