* Bootstrap MessageBar class
* @cfg {String} html contents of the MessageBar
* @cfg {String} weight (info | success | warning | danger) default info
+ * @cfg {String} beforeClass insert the bar before the given class
* @cfg {Boolean} closable (true | false) default false
* @cfg {Boolean} fixed (true | false) default false, fix the bar at the top
*
weight: 'info',
closable: false,
fixed: false,
+ beforeClass: 'bootstrap-sticky-wrap',
getAutoCreate : function(){
html: this.html || ''
}
]
- }
+ };
if(this.fixed){
cfg.cls += ' alert-messages-fixed';
if (this.style) {
cfg.style = this.style;
}
- this.el = Roo.get(document.body).createChild(cfg, Roo.select('.bootstrap-sticky-wrap', true).first());
+ this.el = Roo.get(document.body).createChild(cfg, Roo.select('.'+this.beforeClass, true).first());
+
+ this.el.setVisibilityMode(Roo.Element.DISPLAY);
}
this.el.select('>button.close').on('click', this.hide, this);
hide : function()
{
+ if (!this.rendered) {
+ this.render();
+ }
+
this.el.hide();
this.fireEvent('hide', this);