Roo/bootstrap/Button.js
[roojs1] / Roo / bootstrap / Button.js
index f219263..7d4aa2d 100644 (file)
@@ -113,26 +113,6 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
             return cfg;
         }
         
-        if (this.badge) {
-            cfg.html += ' ';
-            
-            cfg.tag = 'a';
-            
-            cfg.cls='btn roo-button';
-            
-            cfg.href=this.href;
-            
-            cfg.cn = [
-                cfg.html,
-                {
-                    tag: 'span',
-                    cls: 'badge',
-                    html: this.badge
-                }
-            ];
-            
-            cfg.html='';
-        }
          
         if (this.theme==='default') {
             cfg.cls = 'btn roo-button';
@@ -211,6 +191,27 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
             ];
         }
         
+        if (this.badge) {
+            cfg.html += ' ';
+            
+            cfg.tag = 'a';
+            
+            cfg.cls='btn roo-button';
+            
+            cfg.href=this.href;
+            
+            cfg.cn = [
+                cfg.html,
+                {
+                    tag: 'span',
+                    cls: 'badge',
+                    html: this.badge
+                }
+            ];
+            
+            cfg.html='';
+        }
+        
         if (cfg.tag !== 'a' && this.href !== '') {
             throw "Tag must be a to set href.";
         } else if (this.href.length > 0) {