9 * @class Roo.bootstrap.NavHeaderbar
10 * @extends Roo.bootstrap.NavSimplebar
11 * Bootstrap Sidebar class
13 * @cfg {String} brand what is brand
14 * @cfg {String} position (fixed-top|fixed-bottom|static-top) position
15 * @cfg {String} brand_href href of the brand
16 * @cfg {Boolean} srButton generate the sr-only button (true | false) default true
19 * Create a new Sidebar
20 * @param {Object} config The config object
24 Roo.bootstrap.NavHeaderbar = function(config){
25 Roo.bootstrap.NavHeaderbar.superclass.constructor.call(this, config);
28 Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar, {
36 getAutoCreate : function(){
39 tag: this.nav || 'nav',
54 'data-toggle': 'collapse',
59 html: 'Toggle navigation'
81 cls: 'collapse navbar-collapse',
85 cfg.cls += this.inverse ? ' navbar-inverse' : ' navbar-default';
87 if (['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1) {
88 cfg.cls += ' navbar-' + this.position;
90 // tag can override this..
92 cfg.tag = this.tag || (this.position == 'fixed-bottom' ? 'footer' : 'header');
95 if (this.brand !== '') {
98 href: this.brand_href ? this.brand_href : '#',
107 cfg.cls += ' main-nav';
115 initEvents : function()
119 Roo.get(document.body).on('mousewheel',function(e){
120 var ft = this.select('.navbar-fixed-top').first();
121 if(e.wheelDelta < 0 ){
122 ft.removeClass('slideDown');
123 ft.addClass('slideUp');
126 ft.removeClass('slideUp').addClass('slideDown');