Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Wed, 28 Mar 2018 04:57:34 +0000 (12:57 +0800)
committerjohn <john@roojs.com>
Wed, 28 Mar 2018 04:57:34 +0000 (12:57 +0800)
Roo/bootstrap/PhoneInput.js

index ba87348..102cca6 100644 (file)
@@ -22,7 +22,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, {
         
         dialCodeMapping: [],
         
-        preferedCountries: false,
+        preferedDialCode: false,
         
         defaultDialCode: '+852', //hk
         
@@ -222,10 +222,10 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, {
         
         initEvents : function()
         {
-            if(this.preferedCountries) {
-                for (var i = 0; i < this.preferedCountries.length; i++) {
+            if(this.preferedDialCode) {
+                for (var i = 0; i < this.preferedDialCode.length; i++) {
                     for (var j = 0; j < this.allCountries.length; j++) {
-                        if(this.allCountries[j].dialCode == this.preferedCountries[i]) {
+                        if(this.allCountries[j].dialCode == this.preferedDialCode[i]) {
                             var t = this.allCountries[j];
                             this.allCountries.splice(j,1);
                             this.allCountries.unshift(t);