roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Tue, 28 Jan 2014 07:00:56 +0000 (15:00 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 28 Jan 2014 07:00:56 +0000 (15:00 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 07c68fe..af3a33f 100644 (file)
@@ -764,8 +764,8 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         Roo.log(align);
         Roo.log(this.fieldLabel.length);
         switch(true) {
-            case align==='left' && this.fieldLabel.length:
-                
+            case (align==='left' && this.fieldLabel.length):
+                Roo.log("left and has label")
                 cfg.cn = [
                     
                     {
@@ -784,6 +784,8 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
                     
                 ];
                 break;
+            
+            
             case  this.fieldLabel.length:
                 
                  cfg.cn = [
@@ -806,7 +808,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
                         inputblock
                     
                 ];
-                
+                break;
                 
         }
          
index 4bd652d..037bb7a 100644 (file)
@@ -23,7 +23,8 @@ Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this
 //Roo/bootstrap/Input.js
 Roo.bootstrap.Input=function(A){Roo.bootstrap.Input.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Input,Roo.bootstrap.Component,{fieldLabel:'',inputType:'text',disabled:false,name:false,before:false,after:false,getAutoCreate:function(){var A=this.parent();var B=A.labelAlign;var id=Roo.id();var C={cls:'form-group'};var D={tag:'input',id:id,type:this.inputType,cls:'form-control',placeholder:this.placeholder||''};if(this.name){D.name=name;}var E=D;if(this.before||this.after){E={cls:'input-group',cn:[]};if(this.before){E.cn.push({tag:'span',cls:'input-group-addon',html:this.before});}
 E.cn.push(D);if(this.after){E.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}}
-Roo.log(B);Roo.log(this.fieldLabel.length);switch(true){case B==='left'&&this.fieldLabel.length:C.cn=[{tag:'label','for':id,cls:'col-sm-2 control-label',html:this.fieldLabel},{cls:"col-sm-10",cn:[E]}];break;case this.fieldLabel.length:C.cn=[{tag:'label',html:this.fieldLabel},E];break;default:C.cn=[E];}if(this.disabled){D.disabled=true;}return C;},setDisabled:function(v){var i=this.el.select('input',true).dom;if(v){i.removeAttribute('disabled');return;}
+Roo.log(B);Roo.log(this.fieldLabel.length);switch(true){case (B==='left'&&this.fieldLabel.length):Roo.log("left and has label")
+C.cn=[{tag:'label','for':id,cls:'col-sm-2 control-label',html:this.fieldLabel},{cls:"col-sm-10",cn:[E]}];break;case this.fieldLabel.length:C.cn=[{tag:'label',html:this.fieldLabel},E];break;default:C.cn=[E];break;}if(this.disabled){D.disabled=true;}return C;},setDisabled:function(v){var i=this.el.select('input',true).dom;if(v){i.removeAttribute('disabled');return;}
 i.setAttribute('disabled','true');}});
 //Roo/bootstrap/Header.js
 Roo.bootstrap.Header=function(A){Roo.bootstrap.Header.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Header,Roo.bootstrap.Component,{html:false,level:1,getAutoCreate:function(){var A={tag:'h'+(1*this.level),html:this.html||'fill in html'};return A;}});