Line | |
---|
1 | /*! |
---|
2 | * Ext JS Library 3.0.0 |
---|
3 | * Copyright(c) 2006-2009 Ext JS, LLC |
---|
4 | * licensing@extjs.com |
---|
5 | * http://www.extjs.com/license |
---|
6 | */ |
---|
7 | /** |
---|
8 | * @class Ext.menu.Separator |
---|
9 | * @extends Ext.menu.BaseItem |
---|
10 | * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will |
---|
11 | * add one of these by using "-" in you call to add() or in your items config rather than creating one directly. |
---|
12 | * @constructor |
---|
13 | * @param {Object} config Configuration options |
---|
14 | * @xtype menuseparator |
---|
15 | */ |
---|
16 | Ext.menu.Separator = function(config){ |
---|
17 | Ext.menu.Separator.superclass.constructor.call(this, config); |
---|
18 | }; |
---|
19 | |
---|
20 | Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, { |
---|
21 | /** |
---|
22 | * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep") |
---|
23 | */ |
---|
24 | itemCls : "x-menu-sep", |
---|
25 | /** |
---|
26 | * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) |
---|
27 | */ |
---|
28 | hideOnClick : false, |
---|
29 | |
---|
30 | /** |
---|
31 | * @cfg {String} activeClass |
---|
32 | * @hide |
---|
33 | */ |
---|
34 | activeClass: '', |
---|
35 | |
---|
36 | // private |
---|
37 | onRender : function(li){ |
---|
38 | var s = document.createElement("span"); |
---|
39 | s.className = this.itemCls; |
---|
40 | s.innerHTML = " "; |
---|
41 | this.el = s; |
---|
42 | li.addClass("x-menu-sep-li"); |
---|
43 | Ext.menu.Separator.superclass.onRender.apply(this, arguments); |
---|
44 | } |
---|
45 | }); |
---|
46 | Ext.reg('menuseparator', Ext.menu.Separator); |
---|
Note: See
TracBrowser
for help on using the repository browser.