[pve-devel] [PATCH pve-manager] ext6migrate: remove redundant code to set the default active tab
Emmanuel Kasper
e.kasper at proxmox.com
Mon Nov 30 15:00:43 CET 2015
If the default activeTab is *undefined* and *not* null, activeTab defaults to 0,
so we don't need to set this explicitely.
dug from ExtJS tabPanel:
activeTab = me.activeTab !== null ? (me.activeTab || 0) : null;
---
www/manager6/panel/ConfigPanel.js | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index 1878564..fdab318 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -9,7 +9,7 @@ Ext.define('PVE.panel.Config', {
var sp = Ext.state.Manager.getProvider();
- var activeTab;
+ var activeTab; // leaving this undefined means items[0] will be the default tab
var hsregex = /^([^\-\s]+)(-\S+)?$/;
@@ -67,12 +67,6 @@ Ext.define('PVE.panel.Config', {
}),
items: items,
listeners: {
- afterrender: function(tp) {
- var first = tp.items.get(0);
- if (first) {
- first.fireEvent('show', first);
- }
- },
tabchange: function(tp, newcard, oldcard) {
var ntab = newcard.itemId;
--
2.1.4
More information about the pve-devel
mailing list