From e77f8b09b93c3fd79b0ae1f2a728d4611000cc1d Mon Sep 17 00:00:00 2001 From: john Date: Mon, 29 Oct 2018 16:13:14 +0800 Subject: [PATCH] Roo/bootstrap/PhoneInput.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/PhoneInput.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index d4171492ce..5133d9b36e 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -550,7 +550,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { var k = e.getKey(); var c = e.getCharCode(); - Roo.log(e.getCharCode()); + Roo.log(String.fromCharCode(c)); if( [",", ".", "n"].indexOf(String.fromCharCode(c)) > -1 && diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index c93503193a..273ed3378f 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -40393,7 +40393,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { var k = e.getKey(); var c = e.getCharCode(); - Roo.log(e.getCharCode()); + Roo.log(String.fromCharCode(c)); if( [",", ".", "n"].indexOf(String.fromCharCode(c)) > -1 && diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 4123d3d5a0..af05b47e1a 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-1&&this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent();}if(this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent(); +},onKeyUp:function(e){var k=e.getKey();var c=e.getCharCode();Roo.log(String.fromCharCode(c));if([",",".","n"].indexOf(String.fromCharCode(c))>-1&&this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent();}if(this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent(); }this.setValue(this.getValue());}}); // Roo/bootstrap/MoneyField.js Roo.bootstrap.MoneyField=function(A){Roo.bootstrap.MoneyField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MoneyField,Roo.bootstrap.ComboBox,{allowDecimals:true,decimalSeparator:".",decimalPrecision:0,allowNegative:true,allowZero:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",castInt:true,defaultCurrency:false,thousandsDelimiter:false,max_length:false,inputlg:9,inputmd:9,inputsm:9,inputxs:6,store:false,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign(); -- 2.39.2