9 * @class Roo.bootstrap.NavSidebarItem
10 * @extends Roo.bootstrap.Component
11 * Bootstrap Navbar.NavSidebarItem class
13 * Create a new Navbar Button
14 * @param {Object} config The config object
16 Roo.bootstrap.NavSidebarItem = function(config){
17 Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this, config);
22 * The raw click event for the entire grid.
23 * @param {Roo.EventObject} e
28 * Fires when the active item active state changes
29 * @param {Roo.bootstrap.Navbar.Item} this
30 * @param {boolean} state the new state
38 Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem, {
46 preventDefault : false,
49 getAutoCreate : function(){
64 cfg.cn[0].html = this.html;
68 this.cls += ' active';
75 cfg.cn[0].href = this.href;
78 if (this.badge !== '') {
79 cfg.cn[0].html += ' <span class="badge">' + this.badge + '</span>';
83 cfg.cn[0].cls += ' dropdown-toggle';
84 cfg.cn[0].html += '<span class="glyphicon glyphicon-chevron-down"></span>';
87 // fixme - this should handle glyphicon or ico
88 if (this.glyphicon || this.icon) {
89 var c = this.glyphicon ? ('glyphicon glyphicon-'+this.glyphicon) : this.icon;
91 cfg.cn[0].html = '<i class="' +c+'"></i><span>' + cfg.cn[0].html || this.html + '</span>'