From 22cdd6ccde6a8486db2af839ec6268ee71cc3cf9 Mon Sep 17 00:00:00 2001 From: Jack OConnor Date: Wed, 18 Feb 2015 21:01:29 -0800 Subject: [PATCH] Release v5.1.7 --- bower.json | 2 +- build/js/intlTelInput.js | 2 +- build/js/intlTelInput.min.js | 2 +- intl-tel-input.jquery.json | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index 7952ed5ed..a49589735 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "intl-tel-input", - "version": "5.1.6", + "version": "5.1.7", "main": [ "./build/js/intlTelInput.min.js", "./lib/libphonenumber/build/utils.js", diff --git a/build/js/intlTelInput.js b/build/js/intlTelInput.js index d282216e0..f186ee552 100644 --- a/build/js/intlTelInput.js +++ b/build/js/intlTelInput.js @@ -1,5 +1,5 @@ /* -International Telephone Input v5.1.6 +International Telephone Input v5.1.7 https://github.com/Bluefieldscom/intl-tel-input.git */ // wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPlugin.js diff --git a/build/js/intlTelInput.min.js b/build/js/intlTelInput.min.js index 12c66f43e..992efe07e 100644 --- a/build/js/intlTelInput.min.js +++ b/build/js/intlTelInput.min.js @@ -1,5 +1,5 @@ /* -International Telephone Input v5.1.6 +International Telephone Input v5.1.7 https://github.com/Bluefieldscom/intl-tel-input.git */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],function(b){a(b,window,document)}):a(jQuery,window,document)}(function(a,b,c,d){"use strict";function e(b,c){this.a=b,c&&($.extend(c, c, {a:c.autoFormat,h:c.autoHideDialCode,d:c.defaultCountry,i:c.ipinfoToken,n:c.nationalMode,t:c.numberType,o:c.onlyCountries,p:c.preferredCountries,v:c.preventInvalidNumbers,u:c.utilsScript})),this.b=a.extend({},h,c),this.c=h,this.ns="."+f+g++,this.d=Boolean(b.setSelectionRange),this.e=Boolean(a(b).attr("placeholder")),this.f=f,this.init()}var f="intlTelInput",g=1,h={allowExtensions:!1,a:!0,autoPlaceholder:!0,h:!0,d:"",i:"",n:!0,t:"MOBILE",o:[],p:["us","gb"],u:""},i={b:38,c:40,d:13,e:27,f:43,A:65,Z:90,g:48,h:57,i:32,Bi:8,k:46,l:17,m:91,n:224},j=!1;a(b).load(function(){j=!0}),e.prototype={init:function(){var b=this;if("auto"==this.b.d){this.b.d="";var c="//ipinfo.io";this.b.i&&(c+="?token="+this.b.i),a.get(c,function(a){a&&a.country&&(b.b.d=a.country.toLowerCase())},"jsonp").always(function(){b._a()})}else this._a()},_a:function(){this.b.n&&(this.b.h=!1),navigator.userAgent.match(/IEMobile/i)&&(this.b.a=!1),this._b(),this._f(),this._h(),this._i()},_b:function(){this._d(),this._e()},_c:function(a,b,c){b in this.m||(this.m[b]=[]);var d=c||0;this.m[b][d]=a},_d:function(){var b;if(this.b.o.length){for(b=0;b",{"class":"intl-tel-input"}));var c=a("
",{"class":"flag-dropdown"}).insertAfter(this.g),d=a("
",{"class":"selected-flag"}).appendTo(c);this.h=a("
",{"class":"iti-flag"}).appendTo(d),a("
",{"class":"arrow"}).appendTo(this.h),this.i=a("
    ",{"class":"country-list v-hide"}).appendTo(c),this.n.length&&(this._g(this.n,"preferred"),a("
  • ",{"class":"divider"}).appendTo(this.i)),this._g(this.l,""),this.j=this.i.outerHeight(),this.i.removeClass("v-hide").addClass("hide"),b.innerWidth<500&&this.i.outerWidth(this.g.outerWidth()),this.k=this.i.children(".country")},_g:function(a,b){for(var c="",d=0;d",c+="
    ",c+=""+e.name+"",c+="+"+e.dialCode+"",c+="
  • "}this.i.append(c)},_h:function(){var a=this.g.val();this._af(a)?this._v(a):(this.b.d=this.b.d?this._y(this.b.d.toLowerCase(),!1,!1):this.n.length?this.n[0]:this.l[0],this._z(this.b.d.iso2),a||this._ae(this.b.d.dialCode,!1)),a&&this._u(a,!1)},_i:function(){var c=this;this._j(),(this.b.h||this.b.a)&&this._l();var d=this.g.closest("label");d.length&&d.on("click"+this.ns,function(a){c.i.hasClass("hide")?c.g.focus():a.preventDefault()});var e=this.h.parent();e.on("click"+this.ns,function(){!c.i.hasClass("hide")||c.g.prop("disabled")||c.g.prop("readonly")||c._n()}),this.b.u&&(j?this.loadUtils():a(b).load(function(){c.loadUtils()}))},_j:function(){var a=this;this.b.a&&this.g.on("keypress"+this.ns,function(c){if(c.which>=i.i&&!c.ctrlKey&&!c.metaKey&&b.intlTelInputUtils&&!a.g.prop("readonly")){c.preventDefault();var d=c.which>=i.g&&c.which<=i.h||c.which==i.f,e=a.g[0],f=a.d&&e.selectionStart==e.selectionEnd,g=a.g.attr("maxlength"),h=a.g.val(),j=g?h.length0;e--){var f=b.charAt(e-1);if(a.isNumeric(f)||b.substr(e-2,2)==d)return e}return 0},_getCursorFromDigitsOnRight:function(b,c){for(var d=b.length-1;d>=0;d--)if(a.isNumeric(b.charAt(d))&&0===--c)return d;return 0},_getDigitsOnRight:function(b,c){for(var d=0,e=c;ed,g=!e&&f?"-"+(this.j-1)+"px":"";this.i.css("top",g)},_p:function(){var b=this;this.i.on("mouseover"+this.ns,".country",function(){b._x(a(this))}),this.i.on("click"+this.ns,".country",function(){b._ab(a(this))});var d=!0;a("html").on("click"+this.ns,function(){d||b._ac(),d=!1});var e="",f=null;a(c).on("keydown"+this.ns,function(a){a.preventDefault(),a.which==i.b||a.which==i.c?b._q(a.which):a.which==i.d?b._r():a.which==i.e?b._ac():(a.which>=i.A&&a.which<=i.Z||a.which==i.i)&&(f&&clearTimeout(f),e+=String.fromCharCode(a.which),b._s(e),f=setTimeout(function(){e=""},1e3))})},_q:function(a){var b=this.i.children(".highlight").first(),c=a==i.b?b.prev():b.next();c.length&&(c.hasClass("divider")&&(c=a==i.b?c.prev():c.next()),this._x(c),this._ad(c))},_r:function(){var a=this.i.children(".highlight").first();a.length&&this._ab(a)},_s:function(a){for(var b=0;bg&&(f=f.substr(0,g))}else f=a;this.g.val(f)},_v:function(b){this.b.n&&this.o&&"1"==this.o.dialCode&&"+"!=b.charAt(0)&&("1"!=b.charAt(0)&&(b="1"+b),b="+"+b);var c=this._af(b),d=null;if(c){var e=this.m[this._m(c)],f=this.o&&-1!=a.inArray(this.o.iso2,e);if(!f||this._w(b,c))for(var g=0;g=4},_x:function(a){this.k.removeClass("highlight"),a.addClass("highlight")},_y:function(a,b,c){for(var d=b?k:this.l,e=0;eh)b&&(j-=k),c.scrollTop(j);else if(i>f){b&&(j+=k);var l=d-g;c.scrollTop(j-l)}},_ae:function(b,c){var d,e=this.g.val();if(b="+"+b,this.b.n&&"+"!=e.charAt(0))d=e;else if(e){var f=this._af(e);if(f.length>1)d=e.replace(f,b);else{var g="+"!=e.charAt(0)?a.trim(e):"";d=b+g}}else d=!this.b.h||c?b:"";this._u(d,c)},_af:function(b){var c="";if("+"==b.charAt(0))for(var d="",e=0;e