X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..e9397f91ede62d446aed37d23256e8938fc4c335:/docs/source/MenuLayout.html?ds=sidebyside diff --git a/docs/source/MenuLayout.html b/docs/source/MenuLayout.html index dd29c796..bc5dca28 100644 --- a/docs/source/MenuLayout.html +++ b/docs/source/MenuLayout.html @@ -1,12 +1,18 @@ - - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
+ */
+
/** * @class Ext.layout.MenuLayout * @extends Ext.layout.ContainerLayout *

Layout manager used by {@link Ext.menu.Menu}. Generally this class should not need to be used directly.

@@ -14,6 +20,8 @@ Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, { monitorResize : true, + type: 'menu', + setContainer : function(ct){ this.monitorResize = !ct.floating; // This event is only fired by the menu in IE, used so we don't couple @@ -27,7 +35,7 @@ this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate( '
  • ', '', - '', + '{altText}', '', '
  • ' ); @@ -52,7 +60,7 @@ if (!a.isMenuItem && a.needsIcon) { c.positionEl.addClass('x-menu-list-item-indent'); } - this.configureItem(c, position); + this.configureItem(c); }else if(c && !this.isValidParent(c, target)){ if(Ext.isNumber(position)){ position = target.dom.childNodes[position]; @@ -62,14 +70,17 @@ }, getItemArgs : function(c) { - var isMenuItem = c instanceof Ext.menu.Item; + var isMenuItem = c instanceof Ext.menu.Item, + canHaveIcon = !(isMenuItem || c instanceof Ext.menu.Separator); + return { isMenuItem: isMenuItem, - needsIcon: !isMenuItem && (c.icon || c.iconCls), + needsIcon: canHaveIcon && (c.icon || c.iconCls), icon: c.icon || Ext.BLANK_IMAGE_URL, iconCls: 'x-menu-item-icon ' + (c.iconCls || ''), itemId: 'x-menu-el-' + c.id, - itemCls: 'x-menu-list-item ' + itemCls: 'x-menu-list-item ', + altText: c.altText || '' }; }, @@ -96,6 +107,7 @@ } } }); -Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;
    - +Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout; +
    + \ No newline at end of file