Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Mon, 29 Oct 2018 08:21:13 +0000 (16:21 +0800)
committerjohn <john@roojs.com>
Mon, 29 Oct 2018 08:21:13 +0000 (16:21 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/PhoneInput.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index ae99b88..36171e8 100644 (file)
@@ -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 = '<li><a href="#"><div class="flag {iso2}"></div>{name} <span class="dial-code">+{dialCode}</span></a></li>';
@@ -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
index 133b6dd..55c528d 100644 (file)
@@ -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 = '<li><a href="#"><div class="flag {iso2}"></div>{name} <span class="dial-code">+{dialCode}</span></a></li>';
@@ -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
index 0ed5389..a2bb430 100644 (file)
@@ -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<v.length;i++){var c=v.charAt(i);if(!isNaN(c)){B+=c;if(this.dialCodeMapping[B]){A=v.substr(1,i);}if(B.length==4){break;}}}return A;},reset:function(){this.setValue(this.defaultDialCode);this.validate();},hiddenEl:function(){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());}});
+},onKeyPress:function(e){if(this.allowed.indexOf(String.fromCharCode(e.getCharCode()))===-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();
 var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,cls:'form-control roo-money-amount-input',autocomplete:'new-password'};var D={tag:'input',type:'hidden',id:Roo.id(),cls:'hidden-number-input'};if(this.max_length){C.maxlength=this.max_length;