remove debugging code
[roojs1] / Roo / bootstrap / MessageBar.js
index 27a7ba9..68170fa 100644 (file)
@@ -30,7 +30,7 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
     weight: 'info',
     closable: false,
     fixed: false,
-    beforeClass: '.bootstrap-sticky-wrap',
+    beforeClass: 'bootstrap-sticky-wrap',
     
     getAutoCreate : function(){
         
@@ -44,7 +44,7 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
                     html: this.html || ''
                 }
             ]
-        }
+        };
         
         if(this.fixed){
             cfg.cls += ' alert-messages-fixed';
@@ -75,7 +75,9 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
             if (this.style) {
                 cfg.style = this.style;
             }
-            this.el = Roo.get(document.body).createChild(cfg, Roo.select(beforeClass, 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);
@@ -96,6 +98,10 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
     
     hide : function()
     {
+        if (!this.rendered) {
+            this.render();
+        }
+        
         this.el.hide();
         
         this.fireEvent('hide', this);