ソースを参照

fix change event

Robin Herbots 12 年 前
コミット
9f7e09e4d0

+ 1 - 1
build.properties

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

+ 1 - 1
component.json

@@ -1,6 +1,6 @@
 {
 {
     "name": "jquery.inputmask",
     "name": "jquery.inputmask",
-    "version": "2.2.55",
+    "version": "2.2.56",
     "main": "./dist/jquery.inputmask.bundle.js",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
     "dependencies": {
         "jquery": ">=1.5"
         "jquery": ">=1.5"

BIN
dist/jQuery.InputMask.2.2.55.nupkg


BIN
dist/jQuery.InputMask.2.2.56.nupkg


+ 10 - 5
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 2.2.55
+* Version: 2.2.56
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -812,6 +812,11 @@
                     $input.unbind(".inputmask");
                     $input.unbind(".inputmask");
                     $input.removeClass('focus.inputmask');
                     $input.removeClass('focus.inputmask');
                     //bind events
                     //bind events
+                    $input.closest('form').bind("submit", function() { //trigger change on submit if any
+                        if ($input[0]._valueGet() != getActiveMaskSet()["undoBuffer"]) {
+                            $input.change();
+                        }
+                    });
                     $input.bind("mouseenter.inputmask", function () {
                     $input.bind("mouseenter.inputmask", function () {
                         var $input = $(this), input = this;
                         var $input = $(this), input = this;
                         if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) {
                         if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) {
@@ -1458,7 +1463,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.55
+Version: 2.2.56
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -1560,7 +1565,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Copyright (c) 2010 - 2012 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.55
+Version: 2.2.56
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2029,7 +2034,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.55
+Version: 2.2.56
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2192,7 +2197,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.55
+Version: 2.2.56
 
 
 Regex extensions on the jquery.inputmask base
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
 Allows for using regular expressions as a mask

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 5 - 0
js/jquery.inputmask.js

@@ -812,6 +812,11 @@
                     $input.unbind(".inputmask");
                     $input.unbind(".inputmask");
                     $input.removeClass('focus.inputmask');
                     $input.removeClass('focus.inputmask');
                     //bind events
                     //bind events
+                    $input.closest('form').bind("submit", function() { //trigger change on submit if any
+                        if ($input[0]._valueGet() != getActiveMaskSet()["undoBuffer"]) {
+                            $input.change();
+                        }
+                    });
                     $input.bind("mouseenter.inputmask", function () {
                     $input.bind("mouseenter.inputmask", function () {
                         var $input = $(this), input = this;
                         var $input = $(this), input = this;
                         if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) {
                         if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) {