X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/source/Separator.html diff --git a/docs/source/Separator.html b/docs/source/Separator.html index b3604c51..ae8bf433 100644 --- a/docs/source/Separator.html +++ b/docs/source/Separator.html @@ -1,52 +1,128 @@ - -
- -/*! - * Ext JS Library 3.2.1 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** - * @class Ext.menu.Separator - * @extends Ext.menu.BaseItem +\ No newline at end of fileSencha Documentation Project - - \ No newline at end of file +}); * @class Ext.menu.Separator + * @extends Ext.menu.Item + * * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will - * add one of these by using "-" in you call to add() or in your items config rather than creating one directly. - * @constructor - * @param {Object} config Configuration options + * add one of these by using "-" in your call to add() or in your items config rather than creating one directly. + * + * {@img Ext.menu.Separator/Ext.menu.Separator.png Ext.menu.Separator component} + * + * ## Code + * + * Ext.create('Ext.menu.Menu', { + * width: 100, + * height: 100, + * floating: false, // usually you want this set to True (default) + * renderTo: Ext.getBody(), // usually rendered by it's containing component + * items: [{ + * text: 'icon item', + * iconCls: 'add16' + * },{ + * xtype: 'menuseparator' + * },{ + * text: 'seperator above', + * },{ + * text: 'regular item', + * }] + * }); + * * @xtype menuseparator + * @markdown + * @constructor + * @param {Object} config The config object */ -Ext.menu.Separator = Ext.extend(Ext.menu.BaseItem, { - /** - * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep") - */ - itemCls : "x-menu-sep", - /** - * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) - */ - hideOnClick : false, - - /** - * @cfg {String} activeClass - * @hide - */ - activeClass: '', - - // private - onRender : function(li){ - var s = document.createElement("span"); - s.className = this.itemCls; - s.innerHTML = " "; - this.el = s; - li.addClass("x-menu-sep-li"); - Ext.menu.Separator.superclass.onRender.apply(this, arguments); +Ext.define('Ext.menu.Separator', { + extend: 'Ext.menu.Item', + alias: 'widget.menuseparator', + + * @cfg {String} activeCls @hide + */ + + * @cfg {Boolean} canActivate @hide + */ + canActivate: false, + + * @cfg {Boolean} clickHideDelay @hide + */ + + * @cfg {Boolean} destroyMenu @hide + */ + + * @cfg {Boolean} disabledCls @hide + */ + + focusable: false, + + * @cfg {String} href @hide + */ + + * @cfg {String} hrefTarget @hide + */ + + * @cfg {Boolean} hideOnClick @hide + */ + hideOnClick: false, + + * @cfg {String} icon @hide + */ + + * @cfg {String} iconCls @hide + */ + + * @cfg {Mixed} menu @hide + */ + + * @cfg {String} menuAlign @hide + */ + + * @cfg {Number} menuExpandDelay @hide + */ + + * @cfg {Number} menuHideDelay @hide + */ + + * @cfg {Boolean} plain @hide + */ + plain: true, + + * @cfg {String} separatorCls + * The CSS class used by the separator item to show the incised line. + * Defaults to `Ext.baseCSSPrefix + 'menu-item-separator'`. + * @markdown + */ + separatorCls: Ext.baseCSSPrefix + 'menu-item-separator', + + * @cfg {String} text @hide + */ + text: ' ', + + onRender: function(ct, pos) { + var me = this, + sepCls = me.separatorCls; + + me.cls += ' ' + sepCls; + + Ext.applyIf(me.renderSelectors, { + itemSepEl: '.' + sepCls + }); + + me.callParent(arguments); } -}); -Ext.reg('menuseparator', Ext.menu.Separator);