9 * @class Roo.bootstrap.MessageBar
10 * @extends Roo.bootstrap.Component
11 * Bootstrap MessageBar class
12 * @cfg {String} html contents of the MessageBar
13 * @cfg {String} weight (info | success | warning | danger) default info
14 * @cfg {Boolean} closable (true | false) default true
17 * Create a new Element
18 * @param {Object} config The config object
21 Roo.bootstrap.MessageBar = function(config){
22 Roo.bootstrap.MessageBar.superclass.constructor.call(this, config);
25 Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component, {
31 getAutoCreate : function(){
35 cls: 'alert alert-dismissable alert-messages alert-' + this.weight,
50 onRender : function(ct, position)
52 Roo.bootstrap.Component.superclass.onRender.call(this, ct, position);
55 var cfg = Roo.apply({}, this.getAutoCreate());
58 // cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name;
60 //if (!cfg.name.length) {
64 cfg.cls += ' ' + this.cls;
67 cfg.style = this.style;
69 // this.el = Roo.get(document.body).createChild(cfg, position);
70 this.el = Roo.select('.bootstrap-sticky-wrap', true).first().createChild(cfg, position);
73 this.el.select('>button.close').on('click', this.hide, this);