Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Tue, 27 Mar 2018 08:42:46 +0000 (16:42 +0800)
committerjohn <john@roojs.com>
Tue, 27 Mar 2018 08:42:46 +0000 (16:42 +0800)
less/roojs-bootstrap/phone-input.less
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/PhoneInput.js
less/roojs-bootstrap/phone-input.less
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 48824f4..c982872 100644 (file)
@@ -72,7 +72,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
                     input,
                     {
                         tag: 'input',
-                        cls: 'dial-code'
+                        cls: 'dial-placeholder'
                     }
                 ]
             };
index 1806f35..9b0f539 100644 (file)
@@ -1,9 +1,9 @@
 .tel-input {
-    padding-left: 80px;
+    padding-left: 140px;
     border-radius: 4px !important;
 }
 
-.dial-code {
+.dial-placeholder {
     position: absolute;
     width: 80px;
     left: 55px;
index d4105d9..38e6c21 100644 (file)
@@ -37998,7 +37998,11 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
                 tag: 'div',
                 cls: this.hasFeedback ? 'has-feedback' : '',
                 cn: [
-                    input
+                    input,
+                    {
+                        tag: 'input',
+                        cls: 'dial-placeholder'
+                    }
                 ]
             };
             
index 336ef08..4c0fa48 100644 (file)
@@ -1602,7 +1602,7 @@ this.pnode.addClass("disabled");}},enable:function(){this.disabled=false;this.pn
 // Roo/bootstrap/PhoneInput.js
 Roo.bootstrap.PhoneInput=function(A){Roo.bootstrap.PhoneInput.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.PhoneInput,Roo.bootstrap.TriggerField,{triggerList:true,listWidth:undefined,selectedClass:'active',getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
 var id=Roo.id();for(var i=0;i<this.allCountries.length;i++){var c=this.allCountries[i];this.allCountries[i]={name:c[0],iso2:c[1],dialCode:c[2],priority:c[3]||0,areaCodes:c[4]||null};}this.data=this.allCountries;var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,type:'tel',cls:'form-control tel-input',autocomplete:'new-password'}
-;if(this.name){C.name=this.name;}if(this.disabled){C.disabled=true;}var D={tag:'div',cls:'flag-box',cn:[{tag:'div',cls:'flag'},{tag:'div',cls:'caret'}]};var E={tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]};var F={cls:'roo-select2-container input-group',cn:[D,E]}
+;if(this.name){C.name=this.name;}if(this.disabled){C.disabled=true;}var D={tag:'div',cls:'flag-box',cn:[{tag:'div',cls:'flag'},{tag:'div',cls:'caret'}]};var E={tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C,{tag:'input',cls:'dial-placeholder'}]};var F={cls:'roo-select2-container input-group',cn:[D,E]}
 ;if(this.fieldLabel.length){var G={tag:'i',tooltip:'This field is required'};var H={tag:'label','for':id,cls:'control-label',cn:[]};var I={tag:'span',html:this.fieldLabel};G.cls='roo-required-indicator text-danger fa fa-lg fa-star left-indicator';H.cn=[G,I];
 if(this.indicatorpos=='right'){G.cls='roo-required-indicator text-danger fa fa-lg fa-star right-indicator';H.cn=[I,G];}if(A=='left'){F={tag:'div',cn:[F]};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;C.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){H.cls+=' col-md-'+this.labelmd;F.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){H.cls+=' col-sm-'+this.labelsm;F.cls+=' col-sm-'+(12-this.labelsm);