9 * @class Roo.bootstrap.NavSidebarItem
10 * @extends Roo.bootstrap.Component
11 * Bootstrap Navbar.NavSidebarItem class
12 * @cfg {String} href link to
13 * @cfg {String} html content of button
14 * @cfg {String} badge text inside badge
15 * @cfg {String} glyphicon name of glyphicon
16 * @cfg {String} icon name of font awesome icon
17 * @cfg {Boolean} active Is item active
18 * @cfg {Boolean} preventDefault (true | false) default false
19 * @cfg {String} tabId the tab that this item activates.
22 * Create a new Navbar Button
23 * @param {Object} config The config object
25 Roo.bootstrap.NavSidebarItem = function(config){
26 Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this, config);
31 * The raw click event for the entire grid.
32 * @param {Roo.EventObject} e
37 * Fires when the active item active state changes
38 * @param {Roo.bootstrap.Navbar.Item} this
39 * @param {boolean} state the new state
47 Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem, {
55 preventDefault : false,
58 getAutoCreate : function(){
73 cfg.cn[0].html = this.html;
77 this.cls += ' active';
84 cfg.cn[0].href = this.href;
87 if (this.badge !== '') {
88 cfg.cn[0].html += ' <span class="badge">' + this.badge + '</span>';
92 cfg.cn[0].cls += ' dropdown-toggle';
93 cfg.cn[0].html += '<span class="glyphicon glyphicon-chevron-down"></span>';
96 // fixme - this should handle glyphicon or ico
97 if (this.glyphicon || this.icon) {
98 var c = this.glyphicon ? ('glyphicon glyphicon-'+this.glyphicon) : this.icon;
100 cfg.cn[0].html = '<i class="' +c+'"></i><span>' + cfg.cn[0].html || this.html + '</span>'