- doAutoSize : function(){
- var ct = this.container, w = ct.width;
- if(ct.floating){
- if(w){
- ct.setWidth(w);
- }else if(Ext.isIE){
- ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8) ? 'auto' : ct.minWidth);
- var el = ct.getEl(), t = el.dom.offsetWidth; // force recalc
- ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr'));
- }
- }
- }
-});
-Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;
-
-<div id="cls-Ext.menu.Menu"></div>/**
- * @class Ext.menu.Menu
- * @extends Ext.Container
- * <p>A menu object. This is the container to which you may add menu items. Menu can also serve as a base class
- * when you want a specialized menu based off of another component (like {@link Ext.menu.DateMenu} for example).</p>
- * <p>Menus may contain either {@link Ext.menu.Item menu items}, or general {@link Ext.Component Component}s.</p>
- * <p>To make a contained general {@link Ext.Component Component} line up with other {@link Ext.menu.Item menu items}
- * specify <tt>iconCls: 'no-icon'</tt>. This reserves a space for an icon, and indents the Component in line
- * with the other menu items. See {@link Ext.form.ComboBox}.{@link Ext.form.ComboBox#getListParent getListParent}
- * for an example.</p>
- * <p>By default, Menus are absolutely positioned, floating Components. By configuring a Menu with
- * <b><tt>{@link #floating}:false</tt></b>, a Menu may be used as child of a Container.</p>
- *
- * @xtype menu
- */
-Ext.menu.Menu = Ext.extend(Ext.Container, {
- <div id="cfg-Ext.menu.Menu-defaults"></div>/**
- * @cfg {Object} defaults
- * A config object that will be applied to all items added to this container either via the {@link #items}
- * config or via the {@link #add} method. The defaults config can contain any number of
- * name/value property pairs to be added to each item, and should be valid for the types of items
- * being added to the menu.
- */
- <div id="cfg-Ext.menu.Menu-items"></div>/**
- * @cfg {Mixed} items
- * An array of items to be added to this menu. Menus may contain either {@link Ext.menu.Item menu items},
- * or general {@link Ext.Component Component}s.
- */
- <div id="cfg-Ext.menu.Menu-minWidth"></div>/**
- * @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120)
- */
- minWidth : 120,
- <div id="cfg-Ext.menu.Menu-shadow"></div>/**
- * @cfg {Boolean/String} shadow True or 'sides' for the default effect, 'frame' for 4-way shadow, and 'drop'
- * for bottom-right shadow (defaults to 'sides')
- */
- shadow : 'sides',
- <div id="cfg-Ext.menu.Menu-subMenuAlign"></div>/**
- * @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of
- * this menu (defaults to 'tl-tr?')
- */
- subMenuAlign : 'tl-tr?',
- <div id="cfg-Ext.menu.Menu-defaultAlign"></div>/**
- * @cfg {String} defaultAlign The default {@link Ext.Element#alignTo} anchor position value for this menu
- * relative to its element of origin (defaults to 'tl-bl?')
- */
- defaultAlign : 'tl-bl?',
- <div id="cfg-Ext.menu.Menu-allowOtherMenus"></div>/**
- * @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false)
- */
- allowOtherMenus : false,
- <div id="cfg-Ext.menu.Menu-ignoreParentClicks"></div>/**
- * @cfg {Boolean} ignoreParentClicks True to ignore clicks on any item in this menu that is a parent item (displays
- * a submenu) so that the submenu is not dismissed when clicking the parent item (defaults to false).
- */
- ignoreParentClicks : false,
- <div id="cfg-Ext.menu.Menu-enableScrolling"></div>/**
- * @cfg {Boolean} enableScrolling True to allow the menu container to have scroller controls if the menu is too long (defaults to true).
- */
- enableScrolling : true,
- <div id="cfg-Ext.menu.Menu-maxHeight"></div>/**
- * @cfg {Number} maxHeight The maximum height of the menu. Only applies when enableScrolling is set to True (defaults to null).
- */
- maxHeight : null,
- <div id="cfg-Ext.menu.Menu-scrollIncrement"></div>/**
- * @cfg {Number} scrollIncrement The amount to scroll the menu. Only applies when enableScrolling is set to True (defaults to 24).
- */
- scrollIncrement : 24,
- <div id="cfg-Ext.menu.Menu-showSeparator"></div>/**
- * @cfg {Boolean} showSeparator True to show the icon separator. (defaults to true).
- */
- showSeparator : true,
- <div id="cfg-Ext.menu.Menu-defaultOffsets"></div>/**
- * @cfg {Array} defaultOffsets An array specifying the [x, y] offset in pixels by which to
- * change the default Menu popup position after aligning according to the {@link #defaultAlign}
- * configuration. Defaults to <tt>[0, 0]</tt>.
- */
- defaultOffsets : [0, 0],