13 * @class Roo.bootstrap.NavSidebarItem
14 * @extends Roo.bootstrap.NavItem
15 * Bootstrap Navbar.NavSidebarItem class
16 * {String} badgeWeight (default|primary|success|info|warning|danger)the extra classes for the badge
18 * Create a new Navbar Button
19 * @param {Object} config The config object
21 Roo.bootstrap.NavSidebarItem = function(config){
22 Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this, config);
27 * The raw click event for the entire grid.
28 * @param {Roo.EventObject} e
33 * Fires when the active item active state changes
34 * @param {Roo.bootstrap.NavSidebarItem} this
35 * @param {boolean} state the new state
43 Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem, {
45 badgeWeight : 'default',
47 getAutoCreate : function(){
52 href : this.href || '#',
64 html : this.html || ''
73 if (this.glyphicon || this.icon) {
74 var c = this.glyphicon ? ('glyphicon glyphicon-'+this.glyphicon) : this.icon;
75 a.cn.push({ tag : 'i', cls : c }) ;
80 if (this.badge !== '') {
82 a.cn.push({ tag: 'span', cls : 'badge pull-right badge-' + this.badgeWeight, html: this.badge });
86 a.cn.push({ tag : 'i', cls : 'glyphicon glyphicon-chevron-down pull-right'});
87 a.cls += 'dropdown-toggle treeview' ;
98 initEvents : function()