From: john Date: Mon, 29 Oct 2018 08:26:01 +0000 (+0800) Subject: Roo/bootstrap/PhoneInput.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=bc135bbfd1f90d7525097fabd5c5c5b60f1781ff Roo/bootstrap/PhoneInput.js roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index 36171e800a..940c7542c3 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -551,6 +551,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { e.stopEvent(); } + Roo.log(this.getValue()); + this.setValue(this.getValue()); } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index d398e3e34e..dfd643d1f6 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -40138,7 +40138,6 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { this.list.on('mouseover', this.onViewOver, this); this.list.on('mousemove', this.onViewMove, this); - // this.inputEl().on("keyup", this.onKeyUp, this); this.inputEl().on("keypress", this.onKeyPress, this); this.tpl = '
  • {name} +{dialCode}
  • '; @@ -40389,12 +40388,6 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { return this.el.select('input.hidden-tel-input',true).first(); }, - onKeyUp : function(e){ - this.setValue(this.getValue()); - - Roo.log(this.getValue()); - }, - onKeyPress : function(e){ if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ @@ -40402,10 +40395,10 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { } Roo.log(this.getValue()); + + this.setValue(this.getValue()); } - - }); /** * @class Roo.bootstrap.MoneyField diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 32bd131eed..f31e3761e7 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1658,7 +1658,7 @@ if(!d){return false;}return d;},setDialCode:function(v){this.dialCodeHolder.dom. }return v;},setValue:function(v){var d=this.getDialCode(v);if(v.length==0||!d||d.length==0){if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.hiddenEl().dom.value=(v===null||v===undefined?'':v);}return;}this.setFlagClass(this.dialCodeMapping[d].iso2); this.setDialCode(d);this.inputEl().dom.value=v.replace('+'+d,'');this.hiddenEl().dom.value=this.getValue();this.validate();},getDialCode:function(v){v=v||'';if(v.length==0){return this.dialCodeHolder.dom.value;}var A="";if(v.charAt(0)!="+"){return false;} var B="";for(var i=1;i