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

index 9277cf4..9d32252 100644 (file)
@@ -94,12 +94,15 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
         this.el.select('.alert',true).first().addClass('alert-' + this.weight);
     },
     
-    setIcon : function(str)
+    setIcon : function(icon)
     {
         if(this.faicon){
-            this.el.select('.roo-alert-text',true).first().dom.innerHTML = str;
+            this.el.select('.roo-alert-icon',true).first().removeClass(['fa', 'fa-' + this.faicon]);
         }
         
+        this.faicon = icon
+        
+        this.el.select('.roo-alert-icon',true).first().addClass(['fa', 'fa-' + this.faicon]);
     },
     
     hide: function()