10 * @class Roo.bootstrap.Container
11 * @extends Roo.bootstrap.Component
12 * Bootstrap Container class
13 * @cfg {Boolean} jumbotron is it a jumbotron element
14 * @cfg {String} html content of element
15 * @cfg {String} well (lg|sm|md) a well, large, small or medium.
16 * @cfg {String} panel (primary|success|info|warning|danger) render as a panel.
17 * @cfg {String} header content of header (for panel)
18 * @cfg {String} footer content of footer (for panel)
19 * @cfg {String} sticky (footer|wrap|push) block to use as footer or body- needs css-bootstrap/sticky-footer.css
20 * @cfg {String} tag (header|aside|section) type of HTML tag.
21 * @cfg {String} alert (success|info|warning|danger) type alert (changes background / border...)
22 * @cfg {String} fa (ban|check|...) font awesome icon
23 * @cfg {String} icon (info-sign|check|...) glyphicon name
24 * @cfg {Boolean} hidden (true|false) hide the element
28 * Create a new Container
29 * @param {Object} config The config object
32 Roo.bootstrap.Container = function(config){
33 Roo.bootstrap.Container.superclass.constructor.call(this, config);
36 Roo.extend(Roo.bootstrap.Container, Roo.bootstrap.Component, {
50 getChildContainer : function() {
56 if (this.panel.length) {
57 return this.el.select('.panel-body',true).first();
64 getAutoCreate : function(){
67 tag : this.tag || 'div',
72 cfg.cls = 'jumbotron';
77 // - this is applied by the parent..
79 // cfg.cls = this.cls + '';
82 if (this.sticky.length) {
84 var bd = Roo.get(document.body);
85 if (!bd.hasClass('bootstrap-sticky')) {
86 bd.addClass('bootstrap-sticky');
87 Roo.select('html',true).setStyle('height', '100%');
90 cfg.cls += 'bootstrap-sticky-' + this.sticky;
94 if (this.well.length) {
98 cfg.cls +=' well well-' +this.well;
107 cfg.cls += ' hidden';
111 if (this.alert && ["success","info","warning", "danger"].indexOf(this.alert) > -1) {
112 cfg.cls +=' alert alert-' + this.alert;
117 if (this.panel.length) {
118 cfg.cls += ' panel panel-' + this.panel;
120 if (this.header.length) {
123 cls : 'panel-heading',
139 if (this.footer.length) {
141 cls : 'panel-footer',
150 body.html = this.html || cfg.html;
151 // prefix with the icons..
153 body.html = '<i class="fa fa-'+this.fa + '"></i>' + body.html ;
156 body.html = '<i class="glyphicon glyphicon-'+this.icon + '"></i>' + body.html ;
161 if ((!this.cls || !this.cls.length) && (!cfg.cls || !cfg.cls.length)) {
162 cfg.cls = 'container';
170 if(!this.el || !this.panel.length || !this.header.length){
174 return this.el.select('.panel-title',true).first();
177 setTitle : function(v)
179 var titleEl = this.titleEl();
185 titleEl.dom.innerHTML = v;
188 getTitle : function()
191 var titleEl = this.titleEl();
197 return titleEl.dom.innerHTML;