3 <title>The source code</title>
\r
4 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
5 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
7 <body onload="prettyPrint();">
\r
8 <pre class="prettyprint lang-js"><div id="cls-Ext.menu.Separator"></div>/**
9 * @class Ext.menu.Separator
10 * @extends Ext.menu.BaseItem
11 * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
12 * add one of these by using "-" in you call to add() or in your items config rather than creating one directly.
14 * @param {Object} config Configuration options
15 * @xtype menuseparator
17 Ext.menu.Separator = function(config){
18 Ext.menu.Separator.superclass.constructor.call(this, config);
21 Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, {
22 <div id="cfg-Ext.menu.Separator-itemCls"></div>/**
23 * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep")
25 itemCls : "x-menu-sep",
26 <div id="cfg-Ext.menu.Separator-hideOnClick"></div>/**
27 * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
31 <div id="cfg-Ext.menu.Separator-activeClass"></div>/**
32 * @cfg {String} activeClass
38 onRender : function(li){
39 var s = document.createElement("span");
40 s.className = this.itemCls;
41 s.innerHTML = " ";
43 li.addClass("x-menu-sep-li");
44 Ext.menu.Separator.superclass.onRender.apply(this, arguments);
47 Ext.reg('menuseparator', Ext.menu.Separator);</pre>
\r