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