Roo/bootstrap/Component.js
[roojs1] / roojs-bootstrap-debug.js
index b8442e8..e75bca3 100644 (file)
@@ -330,11 +330,11 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         }
         
         if (this.cls) {
-            cfg.cls = (typeof(cfg.cls) == 'undefined') ? this.cls : cfg.cls + ' ' + this.cls;
+            cfg.cls = (typeof(cfg.cls) == 'undefined' ? this.cls : cfg.cls) + ' ' + this.cls;
         }
         
         if (this.style) { // fixme needs to support more complex style data.
-            cfg.style = (cfg.style || '') + '  ' + this.style;
+            cfg.style = (typeof(cfg.style) == 'undefined' ? this.style : cfg.style) + ' ' + this.style;
         }
         
         if(this.name){