X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/src/widgets/Toolbar.js diff --git a/src/widgets/Toolbar.js b/src/widgets/Toolbar.js index 97457106..f29394af 100644 --- a/src/widgets/Toolbar.js +++ b/src/widgets/Toolbar.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.0.0 + * Ext JS Library 3.0.3 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license @@ -187,7 +187,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { clearMenu : function(){ var m = this.moreMenu; if(m && m.items){ - this.moreMenu.items.each(function(item){ + m.items.each(function(item){ delete item.menu; }); } @@ -230,6 +230,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { scope: this } }); + this.moreMenu.ownerCt = this.container; this.more = new Ext.Button({ iconCls: 'x-toolbar-more-icon', cls: 'x-toolbar-more', @@ -367,6 +368,15 @@ Ext.extend(T, Ext.Container, { defaultType: 'button', + /** + * @cfg {String/Object} layout + * This class assigns a default layout (layout:'toolbar'). + * Developers may override this configuration option if another layout + * is required (the constructor must be passed a configuration object in this + * case instead of an array). + * See {@link Ext.Container#layout} for additional information. + */ + trackMenus : true, internalDefaults: {removeMode: 'container', hideParent: true}, toolbarCls: 'x-toolbar', @@ -392,12 +402,14 @@ Ext.extend(T, Ext.Container, { }; } this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); + Ext.Toolbar.superclass.onRender.apply(this, arguments); } }, /** - * Adds element(s) to the toolbar -- this function takes a variable number of - * arguments of mixed type and adds them to the toolbar. + *

Adds element(s) to the toolbar -- this function takes a variable number of + * arguments of mixed type and adds them to the toolbar.

+ *

Note: See the notes within {@link Ext.Container#add}.

* @param {Mixed} arg1 The following types of arguments are all valid:
*