Roo/bootstrap/Input.js
authorjohn <john@roojs.com>
Fri, 9 Mar 2018 05:27:52 +0000 (13:27 +0800)
committerjohn <john@roojs.com>
Fri, 9 Mar 2018 05:27:52 +0000 (13:27 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/Input.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 4afa371..328f661 100644 (file)
@@ -406,7 +406,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
                 }
             ];
             
-            var labelCfg = cfg.cn[1];
+            var labelCfg = cfg.cn[0];
             var contentCfg = cfg.cn[2];
             
             if(this.indicatorpos == 'right'){
index 4ab47c4..be58389 100644 (file)
@@ -8722,11 +8722,6 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
             cfg.cls += ' roo-form-group-label-left';
             
             cfg.cn = [
-                {
-                    tag : 'i',
-                    cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
-                    tooltip : 'This field is required'
-                },
                 {
                     tag: 'label',
                     'for' :  id,
@@ -8734,6 +8729,11 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
                     html : this.fieldLabel
 
                 },
+                {
+                    tag : 'i',
+                    cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
+                    tooltip : 'This field is required'
+                },
                 {
                     cls : "", 
                     cn: [
@@ -8742,7 +8742,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
                 }
             ];
             
-            var labelCfg = cfg.cn[1];
+            var labelCfg = cfg.cn[0];
             var contentCfg = cfg.cn[2];
             
             if(this.indicatorpos == 'right'){
index c7d65b9..f6ed526 100644 (file)
@@ -344,8 +344,8 @@ var C={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control'
 }});var E=C;var F={tag:'span',cls:'glyphicon form-control-feedback'};if(this.hasFeedback&&this.inputType!='hidden'&&!this.allowBlank){E={cls:'has-feedback',cn:[C,F]};}if(this.before||this.after){E={cls:'input-group',cn:[]};if(this.before&&typeof(this.before)=='string'){E.cn.push({tag:'span',cls:'roo-input-before input-group-addon',html:this.before}
 );}if(this.before&&typeof(this.before)=='object'){this.before=Roo.factory(this.before);E.cn.push({tag:'span',cls:'roo-input-before input-group-'+(this.before.xtype=='Button'?'btn':'addon')});}E.cn.push(C);if(this.after&&typeof(this.after)=='string'){E.cn.push({tag:'span',cls:'roo-input-after input-group-addon',html:this.after}
 );}if(this.after&&typeof(this.after)=='object'){this.after=Roo.factory(this.after);E.cn.push({tag:'span',cls:'roo-input-after input-group-'+(this.after.xtype=='Button'?'btn':'addon')});}if(this.hasFeedback&&this.inputType!='hidden'&&!this.allowBlank){E.cls+=' has-feedback';
-E.cn.push(F);}};if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left';B.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},{tag:'label','for':id,cls:'control-label',html:this.fieldLabel}
-,{cls:"",cn:[E]}];var G=B.cn[1];var H=B.cn[2];if(this.indicatorpos=='right'){B.cn=[{tag:'label','for':id,cls:'control-label',html:this.fieldLabel},{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
+E.cn.push(F);}};if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left';B.cn=[{tag:'label','for':id,cls:'control-label',html:this.fieldLabel},{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
+,{cls:"",cn:[E]}];var G=B.cn[0];var H=B.cn[2];if(this.indicatorpos=='right'){B.cn=[{tag:'label','for':id,cls:'control-label',html:this.fieldLabel},{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
 ,{cls:"",cn:[E]}];G=B.cn[0];H=B.cn[2];}if(this.labelWidth>12){G.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){G.cls+=' col-lg-'+this.labellg;H.cls+=' col-lg-'+(12-this.labellg);
 }if(this.labelmd>0){G.cls+=' col-md-'+this.labelmd;H.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){G.cls+=' col-sm-'+this.labelsm;H.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){G.cls+=' col-xs-'+this.labelxs;H.cls+=' col-xs-'+(12-this.labelxs);
 }}else if(this.fieldLabel.length){B.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},{tag:'label',html:this.fieldLabel},E];if(this.indicatorpos=='right'){B.cn=[{tag:'label',html:this.fieldLabel}