[pve-devel] [PATCH pve-manager 3/3 v2] ext6migrate: listen to 'activate' events for panels inside a tabpanel

Emmanuel Kasper e.kasper at proxmox.com
Mon Nov 23 15:13:12 CET 2015


Using ExtJS6 a browser refresh (F5) do not send the 'show' event which we use to display the store as it did with ExtJS4.

At the momment only for tabs inside the datacenter tabpanel, since node and lxc tabpanels are not yet in manager6/
---
 www/manager6/dc/ACLView.js      | 2 +-
 www/manager6/dc/AuthView.js     | 2 +-
 www/manager6/dc/Backup.js       | 2 +-
 www/manager6/dc/GroupView.js    | 2 +-
 www/manager6/dc/OptionView.js   | 5 ++---
 www/manager6/dc/PoolView.js     | 2 +-
 www/manager6/dc/RoleView.js     | 2 +-
 www/manager6/dc/StorageView.js  | 2 +-
 www/manager6/dc/Summary.js      | 2 +-
 www/manager6/dc/Support.js      | 2 +-
 www/manager6/dc/UserView.js     | 2 +-
 www/manager6/grid/BackupView.js | 2 +-
 12 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/www/manager6/dc/ACLView.js b/www/manager6/dc/ACLView.js
index 7ea314c..f151e44 100644
--- a/www/manager6/dc/ACLView.js
+++ b/www/manager6/dc/ACLView.js
@@ -222,7 +222,7 @@ Ext.define('PVE.dc.ACLView', {
 	    },
 	    columns: columns,
 	    listeners: {
-		show: reload
+		activate: reload
 	    }
 	});
 
diff --git a/www/manager6/dc/AuthView.js b/www/manager6/dc/AuthView.js
index 83e79c6..0ff87b2 100644
--- a/www/manager6/dc/AuthView.js
+++ b/www/manager6/dc/AuthView.js
@@ -136,7 +136,7 @@ Ext.define('PVE.dc.AuthView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 9cc2f7d..3ded111 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -448,7 +448,7 @@ Ext.define('PVE.dc.BackupView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/dc/GroupView.js b/www/manager6/dc/GroupView.js
index 6950a46..668aa5a 100644
--- a/www/manager6/dc/GroupView.js
+++ b/www/manager6/dc/GroupView.js
@@ -100,7 +100,7 @@ Ext.define('PVE.dc.GroupView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index 4de75a1..5abb2c7 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -186,12 +186,11 @@ Ext.define('PVE.dc.OptionView', {
 	    tbar: [ edit_btn ],
 	    rows: rows,
 	    listeners: {
-		itemdblclick: run_editor
+		itemdblclick: run_editor,
+		activate: reload
 	    }
 	});
 
 	me.callParent();
-
-	me.on('show', reload);
     }
 });
diff --git a/www/manager6/dc/PoolView.js b/www/manager6/dc/PoolView.js
index 4ae99e2..c9accf7 100644
--- a/www/manager6/dc/PoolView.js
+++ b/www/manager6/dc/PoolView.js
@@ -100,7 +100,7 @@ Ext.define('PVE.dc.PoolView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/dc/RoleView.js b/www/manager6/dc/RoleView.js
index cbfe82d..066d2e1 100644
--- a/www/manager6/dc/RoleView.js
+++ b/www/manager6/dc/RoleView.js
@@ -52,7 +52,7 @@ Ext.define('PVE.dc.RoleView', {
 		}
 	    ],
 	    listeners: {
-		show: function() {
+		activate: function() {
 		    store.load();
 		}
 	    }
diff --git a/www/manager6/dc/StorageView.js b/www/manager6/dc/StorageView.js
index 4bcf3b7..b9604c1 100644
--- a/www/manager6/dc/StorageView.js
+++ b/www/manager6/dc/StorageView.js
@@ -245,7 +245,7 @@ Ext.define('PVE.dc.StorageView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
index b0f8b32..e6d8236 100644
--- a/www/manager6/dc/Summary.js
+++ b/www/manager6/dc/Summary.js
@@ -128,7 +128,7 @@ Ext.define('PVE.dc.Summary', {
 	    layout: 'border',
 	    items: [ nodegrid ],
 	    listeners: {
-		show: function() {
+		activate: function() {
 		    nodegrid.fireEvent('show', nodegrid);
 		},
 		hide: function() {
diff --git a/www/manager6/dc/Support.js b/www/manager6/dc/Support.js
index 1ed32d4..1dbe8e3 100644
--- a/www/manager6/dc/Support.js
+++ b/www/manager6/dc/Support.js
@@ -69,7 +69,7 @@ Ext.define('PVE.dc.Support', {
 	    autoScroll: true,
 	    bodyStyle: 'padding:10px',
 	    listeners: {
-		show: reload
+		activate: reload
 	    }
 	});
 
diff --git a/www/manager6/dc/UserView.js b/www/manager6/dc/UserView.js
index c4f8a8b..1fc3567 100644
--- a/www/manager6/dc/UserView.js
+++ b/www/manager6/dc/UserView.js
@@ -225,7 +225,7 @@ Ext.define('PVE.dc.UserView', {
 		}
 	    ],
 	    listeners: {
-		show: reload,
+		activate: reload,
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js
index aba6d2d..69b0cc7 100644
--- a/www/manager6/grid/BackupView.js
+++ b/www/manager6/grid/BackupView.js
@@ -198,7 +198,7 @@ Ext.define('PVE.grid.BackupView', {
 		}
 	    ],
 	    listeners: {
-		show: reload
+		activate: reload
 	    }
 	});
 
-- 
2.6.2



More information about the pve-devel mailing list