Roo/bootstrap/Alert.js
authorEdward <edward@roojs.com>
Thu, 11 Jun 2015 02:52:01 +0000 (10:52 +0800)
committerEdward <edward@roojs.com>
Thu, 11 Jun 2015 02:52:01 +0000 (10:52 +0800)
Roo/bootstrap/Alert.js

index 0812cd4..6ab957e 100644 (file)
@@ -29,7 +29,7 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
     
     title: '',
     html: '',
-    weight: '',
+    weight: false,
     faicon: false,
     
     getAutoCreate : function()
@@ -59,6 +59,10 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
             });
         }
         
+        if(this.weight){
+            cfg.cls += ' alert-' + this.weight;
+        }
+        
         return cfg;
     },
     
@@ -77,6 +81,11 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
         this.el.select('.roo-alert-text',true).first().dom.innerHTML = str;
     },
     
+    setText : function(str)
+    {
+        this.el.select('.roo-alert-text',true).first().dom.innerHTML = str;
+    },
+    
     hide: function() 
     {
         this.el.hide();