roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Tue, 28 Jan 2014 06:58:32 +0000 (14:58 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 28 Jan 2014 06:58:32 +0000 (14:58 +0800)
roojs-bootstrap-debug.js

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

index dff1fd9..6086f3a 100644 (file)
@@ -763,7 +763,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         
         
         switch(true) {
-            case align=='left' && this.fieldLabel:
+            case align==='left' && this.fieldLabel.length:
                 
                 cfg.cn = [
                     
@@ -783,7 +783,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
                     
                 ];
                 break;
-            case  this.fieldLabel:
+            case  this.fieldLabel.length:
                 
                  cfg.cn = [
                    
index c753c12..a9d91b8 100644 (file)
@@ -22,7 +22,7 @@ Roo.bootstrap.Form=function(A){Roo.bootstrap.Form.superclass.constructor.call(th
 Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'',autoCreate:{tag:'img',cls:'img-responsive',html:null},getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.Img.superclass.getAutoCreate.call(this));A.html=this.html||A.html;A.src=this.src||A.src;if(['rounded','circle','thumbnail'].indexOf(this.border)>-1){A.cls+=' img-'+this.border;}if(this.alt){A.alt=this.alt;}return A;}});
 //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});}}switch(true){case B=='left'&&this.fieldLabel: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: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;}
+E.cn.push(D);if(this.after){E.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}}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;}
 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;}});