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

index 6ab957e..57eceb3 100644 (file)
@@ -81,7 +81,18 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
         this.el.select('.roo-alert-text',true).first().dom.innerHTML = str;
     },
     
-    setText : function(str)
+    setWeight : function(weight)
+    {
+        if(this.weight){
+            this.el.select('.alert',true).first().removeClass('alert-' + this.weight);
+        }
+        
+        this.weight = weight;
+        
+        this.el.select('.alert',true).first().addClass('alert-' + this.weight);
+    },
+    
+    setIcon : function(str)
     {
         this.el.select('.roo-alert-text',true).first().dom.innerHTML = str;
     },