~cdparra/gelee/trunk

« back to all changes in this revision

Viewing changes to webui/extjs/source/widgets/menu/Separator.js

  • Committer: parra
  • Date: 2010-03-15 15:56:56 UTC
  • Revision ID: svn-v4:ac5bba68-f036-4e09-846e-8f32731cc928:trunk/gelee:1448
merged gelee at svn

Show diffs side-by-side

added added

removed removed

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