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,
49 onRender : function(ct, position)
51 Roo.bootstrap.Component.superclass.onRender.call(this, ct, position);
54 var cfg = Roo.apply({}, this.getAutoCreate());
57 // cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name;
59 //if (!cfg.name.length) {
63 cfg.cls += ' ' + this.cls;
66 cfg.style = this.style;
68 this.el = Roo.get(document.body).createChild(cfg, position);