ソースを参照

fix setting global defaults with data-attributes

Robin Herbots 12 年 前
コミット
1aa11a5c6e

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 2
-build.revision = 43
+build.revision = 44
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

+ 2 - 2
component.json

@@ -1,7 +1,7 @@
 {
     "name": "jquery.inputmask",
-    "version": "2.2.43",
-    "main": "./js/jquery.inputmask.js",
+    "version": "2.2.44",
+    "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
         "jquery": ">=1.5"
     }

BIN
dist/jQuery.InputMask.2.2.43.nupkg


BIN
dist/jQuery.InputMask.2.2.44.nupkg


+ 7 - 7
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 2.2.43
+* Version: 2.2.44
 */
 
 (function ($) {
@@ -192,8 +192,8 @@
                         try {
                             attrOptions = attrOptions.replace(new RegExp("'", "g"), '"');
                             var dataoptions = $.parseJSON("{" + attrOptions + "}");
-                            opts = $.extend(true, {}, $.inputmask.defaults, options);
-                            $.extend(true, opts, dataoptions);
+                            $.extend(true, dataoptions, options);
+                            opts = $.extend(true, {}, $.inputmask.defaults, dataoptions);
                             resolveAlias(opts.alias, dataoptions);
                             opts.alias = undefined;
                             $(this).inputmask(opts);
@@ -1468,7 +1468,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.43
+Version: 2.2.44
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1569,7 +1569,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.43
+Version: 2.2.44
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2062,7 +2062,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.43
+Version: 2.2.44
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2224,7 +2224,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.43
+Version: 2.2.44
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask

ファイルの差分が大きいため隠しています
+ 2 - 2
dist/jquery.inputmask.bundle.min.js


ファイルの差分が大きいため隠しています
+ 2 - 2
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"mask"
     ],
-    "version": "2.2.43",
+    "version": "2.2.44",
     "author": {
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"

+ 2 - 2
js/jquery.inputmask.js

@@ -192,8 +192,8 @@
                         try {
                             attrOptions = attrOptions.replace(new RegExp("'", "g"), '"');
                             var dataoptions = $.parseJSON("{" + attrOptions + "}");
-                            opts = $.extend(true, {}, $.inputmask.defaults, options);
-                            $.extend(true, opts, dataoptions);
+                            $.extend(true, dataoptions, options);
+                            opts = $.extend(true, {}, $.inputmask.defaults, dataoptions);
                             resolveAlias(opts.alias, dataoptions);
                             opts.alias = undefined;
                             $(this).inputmask(opts);