|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2014 Robin Herbots
|
|
* Copyright (c) 2010 - 2014 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: 3.0.7
|
|
|
|
|
|
|
+* Version: 3.0.8
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
(function ($) {
|
|
(function ($) {
|
|
@@ -620,8 +620,8 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function getPlaceholder(pos) {
|
|
|
|
|
- var test = getTest(pos);
|
|
|
|
|
|
|
+ function getPlaceholder(pos, test) {
|
|
|
|
|
+ test = test || getTest(pos);
|
|
|
return test["fn"] == null ? test["def"] : opts.placeholder.charAt(pos % opts.placeholder.length);
|
|
return test["fn"] == null ? test["def"] : opts.placeholder.charAt(pos % opts.placeholder.length);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -655,10 +655,20 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function clearOptionalTail(input) {
|
|
function clearOptionalTail(input) {
|
|
|
- var buffer = getBuffer(), tmpBuffer = buffer.slice(), pos;
|
|
|
|
|
- for (pos = tmpBuffer.length - 1; pos >= 0; pos--) {
|
|
|
|
|
- var test = getTest(pos);
|
|
|
|
|
- if ((test.optionality || test.optionalQuantifier) && tmpBuffer[pos] == getPlaceholder(pos)) {
|
|
|
|
|
|
|
+ var buffer = getBuffer(), tmpBuffer = buffer.slice(),
|
|
|
|
|
+ pos, lvp = getLastValidPosition(), positions = {},
|
|
|
|
|
+ ndxIntlzr = getMaskSet()["validPositions"][lvp]["locator"].slice(), testPos;
|
|
|
|
|
+ for (pos = lvp + 1; pos < tmpBuffer.length; pos++) {
|
|
|
|
|
+ testPos = getTests(pos, ndxIntlzr, pos - 1);
|
|
|
|
|
+ var firstMatch = testPos[0]["match"];
|
|
|
|
|
+ testPos = testPos[(opts.greedy || (firstMatch.optionality === true && firstMatch.newBlockMarker === false && firstMatch.optionalQuantifier !== true)) ? 0 : (testPos.length - 1)];
|
|
|
|
|
+ positions[pos] = testPos;
|
|
|
|
|
+ ndxIntlzr = testPos["locator"].slice();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for (pos = tmpBuffer.length - 1; pos > lvp; pos--) {
|
|
|
|
|
+ testPos = positions[pos]["match"];
|
|
|
|
|
+ if (testPos.optionality && tmpBuffer[pos] == getPlaceholder(pos, testPos)) {
|
|
|
tmpBuffer.pop();
|
|
tmpBuffer.pop();
|
|
|
} else break;
|
|
} else break;
|
|
|
}
|
|
}
|
|
@@ -1827,7 +1837,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2014 Robin Herbots
|
|
Copyright (c) 2010 - 2014 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: 3.0.7
|
|
|
|
|
|
|
+Version: 3.0.8
|
|
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
*/
|
|
@@ -1937,7 +1947,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2014 Robin Herbots
|
|
Copyright (c) 2010 - 2014 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: 3.0.7
|
|
|
|
|
|
|
+Version: 3.0.8
|
|
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
*/
|
|
@@ -2400,7 +2410,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2014 Robin Herbots
|
|
Copyright (c) 2010 - 2014 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: 3.0.7
|
|
|
|
|
|
|
+Version: 3.0.8
|
|
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
*/
|
|
@@ -2663,7 +2673,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2014 Robin Herbots
|
|
Copyright (c) 2010 - 2014 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: 3.0.7
|
|
|
|
|
|
|
+Version: 3.0.8
|
|
|
|
|
|
|
|
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
|
|
@@ -2850,7 +2860,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2014 Robin Herbots
|
|
Copyright (c) 2010 - 2014 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: 3.0.7
|
|
|
|
|
|
|
+Version: 3.0.8
|
|
|
|
|
|
|
|
Phone extension.
|
|
Phone extension.
|
|
|
When using this extension make sure you specify the correct url to get the masks
|
|
When using this extension make sure you specify the correct url to get the masks
|