Roo/bootstrap/Button.js
authorAlan Knowles <alan@roojs.com>
Fri, 7 Feb 2014 07:49:31 +0000 (15:49 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Feb 2014 07:49:31 +0000 (15:49 +0800)
Roo/bootstrap/Button.js

index 64e5eeb..6385ef1 100644 (file)
@@ -111,28 +111,28 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
             return cfg;
         }
         
-        if (true) {
-            if (this.theme==='default') {
-                cfg.cls = 'btn roo-button';
-                
-                if (this.parentType != 'Navbar') {
-                    this.weight = this.weight.length ?  this.weight : 'default';
-                }
-                if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
-                    
-                    cfg.cls += ' btn-' + this.weight;
-                }
-            } else if (this.theme==='glow') {
+         
+        if (this.theme==='default') {
+            cfg.cls = 'btn roo-button';
+            
+            if (this.parentType != 'Navbar') {
+                this.weight = this.weight.length ?  this.weight : 'default';
+            }
+            if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
                 
-                cfg.tag = 'a';
-                cfg.cls = 'btn-glow roo-button';
+                cfg.cls += ' btn-' + this.weight;
+            }
+        } else if (this.theme==='glow') {
+            
+            cfg.tag = 'a';
+            cfg.cls = 'btn-glow roo-button';
+            
+            if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
                 
-                if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
-                    
-                    cfg.cls += ' ' + this.weight;
-                }
+                cfg.cls += ' ' + this.weight;
             }
         }
+   
         
         if (this.inverse) {
             this.cls += ' inverse';