ext6migrate: remove redundant code to set the default active tab

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;
This commit is contained in:
Emmanuel Kasper 2015-11-30 15:00:43 +01:00 committed by Dietmar Maurer
parent c0b3df6e34
commit cececa1d65

View File

@ -9,7 +9,7 @@ Ext.define('PVE.panel.Config', {
var sp = Ext.state.Manager.getProvider(); 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+)?$/; var hsregex = /^([^\-\s]+)(-\S+)?$/;
@ -67,12 +67,6 @@ Ext.define('PVE.panel.Config', {
}), }),
items: items, items: items,
listeners: { listeners: {
afterrender: function(tp) {
var first = tp.items.get(0);
if (first) {
first.fireEvent('show', first);
}
},
tabchange: function(tp, newcard, oldcard) { tabchange: function(tp, newcard, oldcard) {
var ntab = newcard.itemId; var ntab = newcard.itemId;