From e28a5d8543dd1e5e18d0d26725b42f7c67783137 Mon Sep 17 00:00:00 2001 From: john Date: Tue, 20 Feb 2018 11:50:24 +0800 Subject: [PATCH] Roo/bootstrap/ComboBox.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/ComboBox.js | 4 ++-- roojs-bootstrap-debug.js | 21 +++++++++------------ roojs-bootstrap.js | 4 ++-- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Roo/bootstrap/ComboBox.js b/Roo/bootstrap/ComboBox.js index 8c2cdbbc0b..bff67bdd73 100644 --- a/Roo/bootstrap/ComboBox.js +++ b/Roo/bootstrap/ComboBox.js @@ -2355,7 +2355,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { }, { tag : 'i', - cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star', + cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star', tooltip : 'This field is required' }, { @@ -2366,7 +2366,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { } ]; labelCfg = cfg.cn[0]; - contentCfg = cfg.cn[1]; + contentCfg = cfg.cn[2]; } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 276dead424..d61a236ecf 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -14694,21 +14694,18 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { var contentCfg = cfg.cn[2]; if(this.indicatorpos == 'right'){ - - Roo.log('-------------------right-------------------'); - + cfg.cn = [ { tag: 'label', cls : 'control-label', - html : this.fieldLabel, - cn : [ - { - tag : 'i', - cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star', - tooltip : 'This field is required' - } - ] + html : this.fieldLabel + + }, + { + tag : 'i', + cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star', + tooltip : 'This field is required' }, { cls : '', @@ -14718,7 +14715,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, { } ]; labelCfg = cfg.cn[0]; - contentCfg = cfg.cn[1]; + contentCfg = cfg.cn[2]; } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index ae69db154d..769c0bbc05 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -587,8 +587,8 @@ C.cn.push({tag:'button',html:'x',cls:'roo-combo-removable-btn close'});}if(this. );}var D={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},C]};if(this.multiple){D={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[C]} ]}]}};var E={cls:'roo-select2-container input-group roo-touchview-combobox ',cn:[D]};if(!this.multiple&&this.showToggleBtn){var F={tag:'span',cls:'caret'};if(this.caret!=false){F={tag:'i',cls:'fa fa-'+this.caret};}E.cn.push({tag:'span',cls:'input-group-addon btn dropdown-toggle',cn:[F,{tag:'span',cls:'combobox-clear',cn:[{tag:'i',cls:'icon-remove'} ]}]})}if(this.multiple){E.cls+=' roo-select2-container-multi';}var G=this.labelAlign||this.parentLabelAlign();if(G==='left'&&this.fieldLabel.length){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'} -,{tag:'label',cls:'control-label',html:this.fieldLabel},{cls:'',cn:[E]}];var H=A.cn[1];var I=A.cn[2];if(this.indicatorpos=='right'){Roo.log('-------------------right-------------------');A.cn=[{tag:'label',cls:'control-label',html:this.fieldLabel,cn:[{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'} -]},{cls:'',cn:[E]}];H=A.cn[0];I=A.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); +,{tag:'label',cls:'control-label',html:this.fieldLabel},{cls:'',cn:[E]}];var H=A.cn[1];var I=A.cn[2];if(this.indicatorpos=='right'){A.cn=[{tag:'label',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]}];H=A.cn[0];I=A.cn[2];}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); }}else if(this.fieldLabel.length){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},{tag:'label',cls:'control-label',html:this.fieldLabel},{cls:'',cn:[E]}];if(this.indicatorpos=='right'){A.cn=[{tag:'label',cls:'control-label',html:this.fieldLabel,cn:[{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'} ]},{cls:'',cn:[E]}];}}else{A.cn=E;}var J=this;['xs','sm','md','lg'].map(function(K){if(J[K]){A.cls+=' col-'+K+'-'+J[K];}});return A;},initTouchView:function(){this.renderTouchView();this.touchViewEl.on('scroll',function(){this.el.dom.scrollTop=0;},this);this.originalValue=this.getValue(); -- 2.39.2