X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/src/widgets/layout/MenuLayout.js?ds=sidebyside diff --git a/src/widgets/layout/MenuLayout.js b/src/widgets/layout/MenuLayout.js index a7fd4d63..ca31b9d7 100644 --- a/src/widgets/layout/MenuLayout.js +++ b/src/widgets/layout/MenuLayout.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.2.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.layout.MenuLayout @@ -27,7 +27,7 @@ this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate( '
  • ', '', - '', + '{altText}', '', '
  • ' ); @@ -52,7 +52,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 +62,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 || '' }; },