From 2fe30af23f3229a9bcf1597356b614259d103710 Mon Sep 17 00:00:00 2001 From: john Date: Mon, 29 Oct 2018 16:21:13 +0800 Subject: [PATCH] Roo/bootstrap/PhoneInput.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/PhoneInput.js | 16 ---------------- roojs-bootstrap-debug.js | 16 ---------------- roojs-bootstrap.js | 3 +-- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index ae99b8850d..36171e800a 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -295,7 +295,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}
  • '; @@ -546,28 +545,13 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { return this.el.select('input.hidden-tel-input',true).first(); }, - onKeyUp : function(e){ - - if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ - e.stopEvent(); - } - - Roo.log(this.getValue()); - - this.setValue(this.getValue()); - }, - onKeyPress : function(e){ if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ e.stopEvent(); } - Roo.log(this.getValue()); - this.setValue(this.getValue()); } - - }); \ No newline at end of file diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 133b6dd55b..55c528de22 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,30 +40388,15 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { return this.el.select('input.hidden-tel-input',true).first(); }, - onKeyUp : function(e){ - - if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ - e.stopEvent(); - } - - Roo.log(this.getValue()); - - this.setValue(this.getValue()); - }, - onKeyPress : function(e){ if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ e.stopEvent(); } - Roo.log(this.getValue()); - this.setValue(this.getValue()); } - - }); /** * @class Roo.bootstrap.MoneyField diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 0ed5389b87..a2bb430342 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1658,8 +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