From 53c532f707c3eb8843ce3bcb70c11cce342dc5da Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 30 Nov 2018 10:40:02 +0800 Subject: [PATCH] Roo/bootstrap/Input.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Input.js | 2 +- roojs-bootstrap-debug.js | 6 +++--- roojs-bootstrap.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Roo/bootstrap/Input.js b/Roo/bootstrap/Input.js index 844a7d2073..6b970c1860 100644 --- a/Roo/bootstrap/Input.js +++ b/Roo/bootstrap/Input.js @@ -403,7 +403,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component, { } if (align ==='left' && this.fieldLabel.length) { - cfg.cls += ' roo-form-group-label-left' + Roo.bootstrap.version == 4 ? ' row' : ''; + cfg.cls += ' roo-form-group-label-left' + (Roo.bootstrap.version == 4 ? ' row' : ''); cfg.cn = [ indicator, diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 381913a11f..c6c8a68d00 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -9234,7 +9234,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component, { } if (align ==='left' && this.fieldLabel.length) { - cfg.cls += ' roo-form-group-label-left' + Roo.bootstrap.version == 4 ? ' row' : ''; + cfg.cls += ' roo-form-group-label-left' + (Roo.bootstrap.version == 4 ? ' row' : ''); cfg.cn = [ indicator, @@ -10533,7 +10533,7 @@ Roo.extend(Roo.bootstrap.TriggerField, Roo.bootstrap.Input, { if (align ==='left' && this.fieldLabel.length) { - cfg.cls += ' roo-form-group-label-left' + Roo.bootstrap.version == 4 ? ' row' : '';; + cfg.cls += ' roo-form-group-label-left' + (Roo.bootstrap.version == 4 ? ' row' : ''); cfg.cn = [ indicator, @@ -13433,7 +13433,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { } if (align ==='left' && this.fieldLabel.length) { - cfg.cls += ' roo-form-group-label-left' + Roo.bootstrap.version == 4 ? ' row' : ''; + cfg.cls += ' roo-form-group-label-left' + (Roo.bootstrap.version == 4 ? ' row' : ''); cfg.cn = [ indicator, diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index acba821f0b..216f7e6b50 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -371,7 +371,7 @@ var C={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control' ;}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 input-group-prepend input-group-text',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-prepend input-group-text 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-append input-group-text 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-append input-group-text input-group-'+(this.after.xtype=='Button'?'btn':'addon')});}if(this.hasFeedback&&this.inputType!='hidden'&&!this.allowBlank){E.cls+=' has-feedback'; -E.cn.push(F);}};var G={tag:'i',cls:'roo-required-indicator '+(this.indicatorpos=='right'?'right':'left')+'-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'};if(Roo.bootstrap.version==4){G={tag:'i',style:'display-none'};}if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left'+Roo.bootstrap.version==4?' row':''; +E.cn.push(F);}};var G={tag:'i',cls:'roo-required-indicator '+(this.indicatorpos=='right'?'right':'left')+'-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'};if(Roo.bootstrap.version==4){G={tag:'i',style:'display-none'};}if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left'+(Roo.bootstrap.version==4?' row':''); B.cn=[G,{tag:'label','for':id,cls:'control-label col-form-label',html:this.fieldLabel},{cls:"",cn:[E]}];var H=B.cn[1];var I=B.cn[2];if(this.indicatorpos=='right'){B.cn=[{tag:'label','for':id,cls:'control-label col-form-label',cn:[{tag:'span',html:this.fieldLabel} ,G]},{cls:"",cn:[E]}];H=B.cn[0];I=B.cn[1];}if(this.labelWidth>12){H.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){H.cls+=' col-lg-'+this.labellg;I.cls+=' col-lg-'+(12-this.labellg); }if(this.labelmd>0){H.cls+=' col-md-'+this.labelmd;I.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){H.cls+=' col-sm-'+this.labelsm;I.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){H.cls+=' col-xs-'+this.labelxs;I.cls+=' col-xs-'+(12-this.labelxs); @@ -432,7 +432,7 @@ var id=Roo.id();var B={cls:'form-group'};var C={tag:'input',id:id,type:this.inpu );}D.cn.push(C);if(this.hasFeedback&&!this.allowBlank){D.cls+=' has-feedback';D.cn.push(E);}if(this.after){D.cn.push({tag:'span',cls:'input-group-addon input-group-append input-group-text',html:this.after});}};var F=D;if(this.multiple){F={tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[D]} ]};}var G={cls:'roo-select2-container input-group',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},F]};if(!this.multiple&&this.showToggleBtn){var H={tag:'span',cls:'caret'};if(this.caret!=false){H={tag:'i',cls:'fa fa-'+this.caret};}G.cn.push({tag:'span',cls:'input-group-addon input-group-append input-group-text btn dropdown-toggle',cn:[H,{tag:'span',cls:'combobox-clear',cn:[{tag:'i',cls:'icon-remove'} ]}]})}if(this.multiple){G.cls+=' roo-select2-container-multi';}var I={tag:'i',cls:'roo-required-indicator '+(this.indicatorpos=='right'?'right':'left')+'-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'};if(Roo.bootstrap.version==4){I={tag:'i',style:'display:none'} -;}if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left'+Roo.bootstrap.version==4?' row':'';;B.cn=[I,{tag:'label','for':id,cls:'control-label',html:this.fieldLabel},{cls:"",cn:[G]}];var J=B.cn[1];var K=B.cn[2];if(this.indicatorpos=='right'){B.cn=[{tag:'label','for':id,cls:'control-label',cn:[{tag:'span',html:this.fieldLabel} +;}if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left'+(Roo.bootstrap.version==4?' row':'');B.cn=[I,{tag:'label','for':id,cls:'control-label',html:this.fieldLabel},{cls:"",cn:[G]}];var J=B.cn[1];var K=B.cn[2];if(this.indicatorpos=='right'){B.cn=[{tag:'label','for':id,cls:'control-label',cn:[{tag:'span',html:this.fieldLabel} ,I]},{cls:"",cn:[G]}];J=B.cn[0];K=B.cn[1];}if(this.labelWidth>12){J.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){J.cls+=' col-lg-'+this.labellg;K.cls+=' col-lg-'+(12-this.labellg); }if(this.labelmd>0){J.cls+=' col-md-'+this.labelmd;K.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){J.cls+=' col-sm-'+this.labelsm;K.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){J.cls+=' col-xs-'+this.labelxs;K.cls+=' col-xs-'+(12-this.labelxs); }}else if(this.fieldLabel.length){B.cn=[I,{tag:'label',html:this.fieldLabel},G];if(this.indicatorpos=='right'){B.cn=[{tag:'label',cn:[{tag:'span',html:this.fieldLabel},I]},G];}}else{B=G}var L=this;['xs','sm','md','lg'].map(function(M){if(L[M]){B.cls+=' col-'+M+'-'+L[M]; @@ -536,7 +536,7 @@ A={cls:'form-group roo-combobox-tickable'};var C='';var D='';var E='';if(this.bt ,{tag:'button',type:'button',name:'ok',cls:'btn btn-link btn-ok pull-'+this.btnPosition,html:D},{tag:'button',type:'button',name:'cancel',cls:'btn btn-link btn-cancel pull-'+this.btnPosition,html:E}]};if(this.editable){F.cn.unshift({tag:'input',cls:'roo-select2-search-field-input'} );}var G=this;Roo.each(F.cn,function(c){if(G.size){c.cls+=' btn-'+G.size;}if(G.disabled){c.disabled=true;}});var H={tag:'div',style:'display: contents',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[F]} ]}]};var I={cls:'roo-select2-container input-group roo-select2-container-multi',cn:[H]};if(this.hasFeedback&&!this.allowBlank){var J={tag:'span',cls:'glyphicon form-control-feedback'};I.cn.push(J);}var K={tag:'i',cls:'roo-required-indicator '+(this.indicatorpos=='right'?'right':'left')+'-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'} -;if(Roo.bootstrap.version==4){K={tag:'i',style:'display:none'};}if(B==='left'&&this.fieldLabel.length){A.cls+=' roo-form-group-label-left'+Roo.bootstrap.version==4?' row':'';A.cn=[K,{tag:'label','for':id,cls:'control-label col-form-label',html:this.fieldLabel} +;if(Roo.bootstrap.version==4){K={tag:'i',style:'display:none'};}if(B==='left'&&this.fieldLabel.length){A.cls+=' roo-form-group-label-left'+(Roo.bootstrap.version==4?' row':'');A.cn=[K,{tag:'label','for':id,cls:'control-label col-form-label',html:this.fieldLabel} ,{cls:"",cn:[I]}];var L=A.cn[1];var M=A.cn[2];if(this.indicatorpos=='right'){A.cn=[{tag:'label','for':id,cls:'control-label col-form-label',cn:[{tag:'span',html:this.fieldLabel},K]},{cls:"",cn:[I]}];L=A.cn[0];M=A.cn[1];}if(this.labelWidth>12){L.style="width: "+this.labelWidth+'px'; }if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){L.cls+=' col-lg-'+this.labellg;M.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){L.cls+=' col-md-'+this.labelmd;M.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){L.cls+=' col-sm-'+this.labelsm; M.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){L.cls+=' col-xs-'+this.labelxs;M.cls+=' col-xs-'+(12-this.labelxs);}}else if(this.fieldLabel.length){A.cn=[K,{tag:'label',html:this.fieldLabel},I];if(this.indicatorpos=='right'){A.cn=[{tag:'label',html:this.fieldLabel} -- 2.39.2