X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/TabPanel.html diff --git a/docs/source/TabPanel.html b/docs/source/TabPanel.html index 1ce6367c..6eeeff62 100644 --- a/docs/source/TabPanel.html +++ b/docs/source/TabPanel.html @@ -1,11 +1,17 @@ - - - The source code - - - - -
/** + + + The source code + + + + +
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.TabPanel *

A basic tab container. TabPanels can be used exactly like a standard {@link Ext.Panel} * for layout purposes, but also have special support for containing child Components @@ -426,11 +432,11 @@ new Ext.TabPanel({ // private initEvents : function(){ Ext.TabPanel.superclass.initEvents.call(this); - this.on('add', this.onAdd, this, {target: this}); - this.on('remove', this.onRemove, this, {target: this}); - - this.mon(this.strip, 'mousedown', this.onStripMouseDown, this); - this.mon(this.strip, 'contextmenu', this.onStripContextMenu, this); + this.mon(this.strip, { + scope: this, + mousedown: this.onStripMouseDown, + contextmenu: this.onStripContextMenu + }); if(this.enableTabScroll){ this.mon(this.strip, 'mousewheel', this.onWheel, this); } @@ -467,6 +473,7 @@ new Ext.TabPanel({ if(t.close){ if (t.item.fireEvent('beforeclose', t.item) !== false) { t.item.fireEvent('close', t.item); + delete t.item.tabEl; this.remove(t.item); } return; @@ -564,12 +571,16 @@ new Ext.TabPanel({ }, // private - onAdd : function(tp, item, index){ - this.initTab(item, index); - if(this.items.getCount() == 1){ - this.syncSize(); + onAdd : function(c){ + Ext.TabPanel.superclass.onAdd.call(this, c); + if(this.rendered){ + var items = this.items; + this.initTab(c, items.indexOf(c)); + if(items.getCount() == 1){ + this.syncSize(); + } + this.delegateUpdates(); } - this.delegateUpdates(); }, // private @@ -586,15 +597,16 @@ new Ext.TabPanel({ }, // private - onRemove : function(tp, item){ - Ext.destroy(Ext.get(this.getTabEl(item))); - this.stack.remove(item); - item.un('disable', this.onItemDisabled, this); - item.un('enable', this.onItemEnabled, this); - item.un('titlechange', this.onItemTitleChanged, this); - item.un('iconchange', this.onItemIconChanged, this); - item.un('beforeshow', this.onBeforeShowItem, this); - if(item == this.activeTab){ + onRemove : function(c){ + Ext.TabPanel.superclass.onRemove.call(this, c); + Ext.destroy(Ext.get(this.getTabEl(c))); + this.stack.remove(c); + c.un('disable', this.onItemDisabled, this); + c.un('enable', this.onItemEnabled, this); + c.un('titlechange', this.onItemTitleChanged, this); + c.un('iconchange', this.onItemIconChanged, this); + c.un('beforeshow', this.onBeforeShowItem, this); + if(c == this.activeTab){ var next = this.stack.next(); if(next){ this.setActiveTab(next); @@ -644,7 +656,9 @@ new Ext.TabPanel({ onItemIconChanged : function(item, iconCls, oldCls){ var el = this.getTabEl(item); if(el){ - Ext.fly(el).child('span.x-tab-strip-text').replaceClass(oldCls, iconCls); + el = Ext.get(el); + el.child('span.x-tab-strip-text').replaceClass(oldCls, iconCls); + el[Ext.isEmpty(iconCls) ? 'removeClass' : 'addClass']('x-tab-with-icon'); } }, @@ -1030,8 +1044,8 @@ new Ext.TabPanel({ * @property header * @hide */ -

/** - * @property title +
/** + * @cfg title * @hide */
/** @@ -1098,6 +1112,7 @@ Ext.TabPanel.AccessStack = function(){ return items.pop(); } }; -};
- +}; +
+ \ No newline at end of file