source:
trunk/workshop-routing-foss4g/web/ext/src/widgets/menu/Separator.js
@
81
Revision 76, 1.3 KB checked in by djay, 13 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | /*! |
2 | * Ext JS Library 3.4.0 |
3 | * Copyright(c) 2006-2011 Sencha Inc. |
4 | * licensing@sencha.com |
5 | * http://www.sencha.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 = Ext.extend(Ext.menu.BaseItem, { |
17 | /** |
18 | * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep") |
19 | */ |
20 | itemCls : "x-menu-sep", |
21 | /** |
22 | * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) |
23 | */ |
24 | hideOnClick : false, |
25 | |
26 | /** |
27 | * @cfg {String} activeClass |
28 | * @hide |
29 | */ |
30 | activeClass: '', |
31 | |
32 | // private |
33 | onRender : function(li){ |
34 | var s = document.createElement("span"); |
35 | s.className = this.itemCls; |
36 | s.innerHTML = " "; |
37 | this.el = s; |
38 | li.addClass("x-menu-sep-li"); |
39 | Ext.menu.Separator.superclass.onRender.apply(this, arguments); |
40 | } |
41 | }); |
42 | Ext.reg('menuseparator', Ext.menu.Separator); |
Note: See TracBrowser
for help on using the repository browser.