Browse Source

damn decimals! gr, fix radixPoint dance

Robin Herbots 12 years ago
parent
commit
638cf2b3c3

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 
 build.major = 2
 build.major = 2
 build.minor = 2
 build.minor = 2
-build.revision = 44
+build.revision = 45
 
 
 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.44",
+    "version": "2.2.45",
     "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.44.nupkg


BIN
dist/jQuery.InputMask.2.2.45.nupkg


+ 11 - 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.44
+* Version: 2.2.45
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -1283,6 +1283,12 @@
                         var k = k || e.which || e.charCode || e.keyCode,
                         var k = k || e.which || e.charCode || e.keyCode,
                             c = String.fromCharCode(k);
                             c = String.fromCharCode(k);
 
 
+                        if (opts.numericInput && c == opts.radixPoint) {
+                            var nptStr = input._valueGet();
+                            var radixPosition = nptStr.indexOf(opts.radixPoint);
+                            caret(input, seekNext(radixPosition != -1 ? radixPosition : getMaskLength()));
+                        }
+
                         if ((e.ctrlKey || e.metaKey || ignorable) && checkval !== true) {
                         if ((e.ctrlKey || e.metaKey || ignorable) && checkval !== true) {
                             return true;
                             return true;
                         } else {
                         } else {
@@ -1468,7 +1474,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.44
+Version: 2.2.45
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -1569,7 +1575,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.44
+Version: 2.2.45
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2062,7 +2068,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.44
+Version: 2.2.45
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2224,7 +2230,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.44
+Version: 2.2.45
 
 
 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

File diff suppressed because it is too large
+ 36 - 35
dist/jquery.inputmask.bundle.min.js


File diff suppressed because it is too large
+ 39 - 38
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 6 - 0
js/jquery.inputmask.js

@@ -1283,6 +1283,12 @@
                         var k = k || e.which || e.charCode || e.keyCode,
                         var k = k || e.which || e.charCode || e.keyCode,
                             c = String.fromCharCode(k);
                             c = String.fromCharCode(k);
 
 
+                        if (opts.numericInput && c == opts.radixPoint) {
+                            var nptStr = input._valueGet();
+                            var radixPosition = nptStr.indexOf(opts.radixPoint);
+                            caret(input, seekNext(radixPosition != -1 ? radixPosition : getMaskLength()));
+                        }
+
                         if ((e.ctrlKey || e.metaKey || ignorable) && checkval !== true) {
                         if ((e.ctrlKey || e.metaKey || ignorable) && checkval !== true) {
                             return true;
                             return true;
                         } else {
                         } else {