10 * @class Roo.bootstrap.MenuItem
11 * @extends Roo.bootstrap.Component
12 * Bootstrap MenuItem class
13 * @cfg {String} html the menu label
14 * @cfg {String} href the link
15 * @cfg {Boolean} preventDefault (true | false) default true
16 * @cfg {Boolean} isContainer (true | false) default false
20 * Create a new MenuItem
21 * @param {Object} config The config object
25 Roo.bootstrap.MenuItem = function(config){
26 Roo.bootstrap.MenuItem.superclass.constructor.call(this, config);
31 * The raw click event for the entire grid.
32 * @param {Roo.bootstrap.MenuItem} this
33 * @param {Roo.EventObject} e
39 Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component, {
46 getAutoCreate : function(){
51 cls: 'dropdown-menu-item'
57 cls: 'dropdown-menu-item',
66 if (this.parent().type == 'treeview') {
67 cfg.cls = 'treeview-menu';
70 cfg.cn[0].href = this.href || cfg.cn[0].href ;
71 cfg.cn[0].html = this.html || cfg.cn[0].html ;
75 initEvents: function() {
77 //this.el.select('a').on('click', this.onClick, this);
82 Roo.log('item on click ');
83 //if(this.preventDefault){
84 // e.preventDefault();
86 //this.parent().hideMenuItems();
88 this.fireEvent('click', this, e);