9 * @class Roo.bootstrap.Navbar
10 * @extends Roo.bootstrap.Component
11 * Bootstrap Navbar class
12 * @cfg {Boolean} sidebar has side bar
13 * @cfg {Boolean} bar is a bar?
14 * @cfg {String} position (fixed-top|fixed-bottom|static-top) position
15 * @cfg {String} brand what is brand
16 * @cfg {Boolean} inverse is inverted color
17 * @cfg {String} type (nav|pills|tabs)
18 * @cfg {Boolean} arrangement stacked|justified
19 * @cfg {String} align (left|right) alignment
24 * @param {Object} config The config object
28 Roo.bootstrap.Navbar = function(config){
29 Roo.bootstrap.Navbar.superclass.constructor.call(this, config);
32 Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component, {
44 getAutoCreate : function(){
49 if (this.sidebar === true) {
57 if (this.bar === true) {
71 'data-toggle': 'collapse',
76 html: 'Toggle navigation'
96 cls: 'collapse navbar-collapse'
101 cfg.cls += this.inverse ? ' navbar-inverse' : ' navbar-default';
103 if (['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1) {
104 cfg.cls += ' navbar-' + this.position;
105 cfg.tag = this.position == 'fixed-bottom' ? 'footer' : 'header';
108 if (this.brand !== '') {
121 } else if (this.bar === false) {
124 Roo.log('Property \'bar\' in of Navbar must be either true or false')
134 if (['tabs','pills'].indexOf(this.type)!==-1) {
135 cfg.cn[0].cls += ' nav-' + this.type
137 if (this.type!=='nav') {
138 Roo.log('nav type must be nav/tabs/pills')
140 cfg.cn[0].cls += ' navbar-nav'
143 if (['stacked','justified'].indexOf(this.arrangement)!==-1) {
144 cfg.cn[0].cls += ' nav-' + this.arrangement;
147 if (this.align === 'right') {
148 cfg.cn[0].cls += ' navbar-right';
151 cfg.cls += ' navbar-inverse';
154 /* type: nav | tabs | pills
155 * arrangement: stacked | justified
156 * position: fixed/static etc
157 * inverse: true/false
164 getChildContainer : function() {
165 if (this.bar === true) {
166 return this.el.select('.collapse',true).first();