[pve-devel] [PATCH manager 3/4] fire activate event for lazyitems in tabpanels

Dominik Csapak d.csapak at proxmox.com
Tue Jul 5 17:06:56 CEST 2016


when changing tabs which are lazyitems,
there will be no activate event for the content of the tab

so we fire it manually on tabchange (if the new card has the
lazyitems plugin activated) as we do it for the hide event

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/panel/ConfigPanel.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index 489eb3b..51bdf1f 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -108,6 +108,11 @@ Ext.define('PVE.panel.Config', {
 		    if (oldcard.plugins && oldcard.plugins[0] && oldcard.plugins[0].ptype == 'lazyitems') {
 			oldcard.items.items[0].fireEvent('hide');
 		    }
+
+		    // same for activating
+		    if (newcard.plugins && newcard.plugins[0] && newcard.plugins[0].ptype == 'lazyitems') {
+			newcard.items.items[0].fireEvent('activate');
+		    }
 		}
 	    }
 	});
-- 
2.1.4




More information about the pve-devel mailing list