Browse Source

fix for numericinput #321

Robin Herbots 12 years ago
parent
commit
40a6675729

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 
 build.major = 2
 build.major = 2
 build.minor = 3
 build.minor = 3
-build.revision = 23
+build.revision = 24
 
 
 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.3.23",
+    "version": "2.3.24",
     "main": "./dist/jquery.inputmask.bundle.js",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
     "dependencies": {
         "jquery": ">=1.5"
         "jquery": ">=1.5"

+ 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.3.23
+* Version: 2.3.24
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -235,6 +235,9 @@
                 return false;
                 return false;
             }
             }
             function getMaskTemplate(mask) {
             function getMaskTemplate(mask) {
+                if(opts.numericInput) {
+            		mask = mask.split('').reverse().join('');
+            	}
                 var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat;
                 var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat;
                 if (repeat == "*") greedy = false;
                 if (repeat == "*") greedy = false;
                 if (greedy == true && opts.placeholder == "") opts.placeholder = " ";
                 if (greedy == true && opts.placeholder == "") opts.placeholder = " ";
@@ -269,6 +272,9 @@
             }
             }
             //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol}
             //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol}
             function getTestingChain(mask) {
             function getTestingChain(mask) {
+            	if(opts.numericInput) {
+            		mask = mask.split('').reverse().join('');
+            	}
                 var isOptional = false, escaped = false;
                 var isOptional = false, escaped = false;
                 var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated
                 var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated
 
 
@@ -1564,7 +1570,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.3.23
+Version: 2.3.24
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -1666,7 +1672,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.3.23
+Version: 2.3.24
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2143,7 +2149,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.3.23
+Version: 2.3.24
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2312,7 +2318,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.3.23
+Version: 2.3.24
 
 
 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
+ 42 - 42
dist/jquery.inputmask.bundle.min.js


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


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"inputmask",
 		"mask"
 		"mask"
     ],
     ],
-    "version": "2.3.23",
+    "version": "2.3.24",
     "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

@@ -235,6 +235,9 @@
                 return false;
                 return false;
             }
             }
             function getMaskTemplate(mask) {
             function getMaskTemplate(mask) {
+                if(opts.numericInput) {
+            		mask = mask.split('').reverse().join('');
+            	}
                 var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat;
                 var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat;
                 if (repeat == "*") greedy = false;
                 if (repeat == "*") greedy = false;
                 if (greedy == true && opts.placeholder == "") opts.placeholder = " ";
                 if (greedy == true && opts.placeholder == "") opts.placeholder = " ";
@@ -269,6 +272,9 @@
             }
             }
             //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol}
             //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol}
             function getTestingChain(mask) {
             function getTestingChain(mask) {
+            	if(opts.numericInput) {
+            		mask = mask.split('').reverse().join('');
+            	}
                 var isOptional = false, escaped = false;
                 var isOptional = false, escaped = false;
                 var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated
                 var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated