ソースを参照

phone-codes.js is missing when installing with bower fix #937

Robin Herbots 10 年 前
コミット
e05b9cc856

+ 1 - 0
CHANGELOG.md

@@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
 - Update placeholder handling
 
 ### Fixed
+- phone-codes.js is missing when installing with bower #937
 - Repeat function doesn't work for dynamic masks #960
 - Provide convenient method to unmask value #929
 - Min value doesn't work with allowMinus #951

+ 6 - 1
bower.json

@@ -8,7 +8,12 @@
 	  "./dist/inputmask/inputmask.date.extensions.js",
   	"./dist/inputmask/inputmask.numeric.extensions.js",
   	"./dist/inputmask/inputmask.phone.extensions.js",
-  	"./dist/inputmask/inputmask.regex.extensions.js"
+  	"./dist/inputmask/inputmask.regex.extensions.js",
+    "./extra/phone-codes/phone-be.js",
+    "./extra/phone-codes/phone-codes.js",
+    "./extra/phone-codes/phone-nl.js",
+    "./extra/phone-codes/phone-ru.js",
+    "./extra/phone-codes/phone-uk.js"
   ],
   "keywords" : ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",

+ 6 - 1
component.json

@@ -13,7 +13,12 @@
         "./dist/inputmask/inputmask.date.extensions.js",
         "./dist/inputmask/inputmask.numeric.extensions.js",
         "./dist/inputmask/inputmask.phone.extensions.js",
-        "./dist/inputmask/inputmask.regex.extensions.js"
+        "./dist/inputmask/inputmask.regex.extensions.js",
+        "./extra/phone-codes/phone-be.js",
+        "./extra/phone-codes/phone-codes.js",
+        "./extra/phone-codes/phone-nl.js",
+        "./extra/phone-codes/phone-ru.js",
+        "./extra/phone-codes/phone-uk.js"
     ],
     "dependencies": {
         "components/jquery": ">=1.7"

js/phone-codes/phone-be.js → extra/phone-codes/phone-be.js


js/phone-codes/phone-codes.js → extra/phone-codes/phone-codes.js


js/phone-codes/phone-nl.js → extra/phone-codes/phone-nl.js


js/phone-codes/phone-ru.js → extra/phone-codes/phone-ru.js


js/phone-codes/phone-uk.js → extra/phone-codes/phone-uk.js


+ 6 - 1
package.json

@@ -10,7 +10,12 @@
     "dist/inputmask/inputmask.date.extensions.js",
     "dist/inputmask/inputmask.numeric.extensions.js",
     "dist/inputmask/inputmask.phone.extensions.js",
-    "dist/inputmask/inputmask.regex.extensions.js"
+    "dist/inputmask/inputmask.regex.extensions.js",
+    "./extra/phone-codes/phone-be.js",
+    "./extra/phone-codes/phone-codes.js",
+    "./extra/phone-codes/phone-nl.js",
+    "./extra/phone-codes/phone-ru.js",
+    "./extra/phone-codes/phone-uk.js"
   ],
   "scripts": {
     "test": "grunt qunit"

+ 7 - 7
qunit/tests_phone.js

@@ -4,7 +4,7 @@ asyncTest("inputmask(\"phone be\") - type \"473890428\"", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" />');
 
-    $("#testmask").inputmask("phonebe", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-be.js" });
+    $("#testmask").inputmask("phonebe", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-be.js" });
     $("#testmask")[0].focus();
     $("#testmask").Type("473890428");
 
@@ -18,7 +18,7 @@ asyncTest("inputmask(\"phone be\") - type \"473890428\"", 1, function () {
 asyncTest("inputmask(\"phone be\") - value \"+32473890428\"", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" value="+32473890428" />');
-    $("#testmask").inputmask("phonebe", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-be.js" });
+    $("#testmask").inputmask("phonebe", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-be.js" });
     $("#testmask")[0].focus();
     setTimeout(function () {
         equal($("#testmask").val(), "+32(473)89-04-28", "Result " + $("#testmask").val());
@@ -30,7 +30,7 @@ asyncTest("inputmask(\"phone be\") - value \"+32473890428\"", 1, function () {
 asyncTest("inputmask(\"phone\") - value=\"+32(473)890-428\"", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" value="+32(473)890-428" />');
-    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-codes.js" });
+    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-codes.js" });
 
     setTimeout(function () {
         equal($("#testmask").val(), "+32(473)890-428", "Result " + $("#testmask").val());
@@ -42,7 +42,7 @@ asyncTest("inputmask(\"phone\") - value=\"+32(473)890-428\"", 1, function () {
 asyncTest("inputmask(\"phone\") - value=\"32473890428\"", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" value="32473890428" />');
-    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-codes.js" });
+    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-codes.js" });
 
     setTimeout(function () {
         equal($("#testmask").val(), "+32(473)890-428", "Result " + $("#testmask").val());
@@ -54,7 +54,7 @@ asyncTest("inputmask(\"phone\") - value=\"32473890428\"", 1, function () {
 asyncTest("inputmask(\"phone\") - Brazil new", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" value="5512123451234" />');
-    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-codes.js" });
+    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-codes.js" });
 
     setTimeout(function () {
         equal($("#testmask").val(), "+55-12-12345-1234", "Result " + $("#testmask").val());
@@ -66,7 +66,7 @@ asyncTest("inputmask(\"phone\") - Brazil new", 1, function () {
 asyncTest("inputmask(\"phone\") - Brazil old", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" value="55121234-1234" />');
-    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-codes.js" });
+    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-codes.js" });
 
     setTimeout(function () {
         equal($("#testmask").val(), "+55-12-1234-1234", "Result " + $("#testmask").val());
@@ -78,7 +78,7 @@ asyncTest("inputmask(\"phone\") - Brazil old", 1, function () {
 asyncTest("inputmask(\"phone\") - Brazil switch", 1, function () {
     var $fixture = $("#qunit-fixture");
     $fixture.append('<input type="text" id="testmask" value="55121234-1234" />');
-    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/js/phone-codes/phone-codes.js" });
+    $("#testmask").inputmask("phone", { "url": "https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/extra/phone-codes/phone-codes.js" });
 
 
     $("#testmask")[0].focus();