|
|
@@ -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.1.2
|
|
|
+* Version: 2.1.3
|
|
|
*/
|
|
|
|
|
|
(function ($) {
|
|
|
@@ -35,7 +35,7 @@
|
|
|
skipOptionalPartCharacter: " ", //a character which can be used to skip an optional part of a mask
|
|
|
//numeric basic properties
|
|
|
numericInput: false, //numericInput input direction style (input shifts to the left while holding the caret position)
|
|
|
- radixPoint: ".", // | ","
|
|
|
+ radixPoint: "", //".", // | ","
|
|
|
//numeric basic properties
|
|
|
definitions: {
|
|
|
'9': {
|
|
|
@@ -597,7 +597,7 @@
|
|
|
if (clearInvalid) {
|
|
|
writeBuffer(input, buffer);
|
|
|
}
|
|
|
- return isRTL ? (opts.numericInput ? ($.inArray(opts.radixPoint, buffer) != -1 && skipRadixHandling !== true ? $.inArray(opts.radixPoint, buffer) : seekNext(buffer, maskL)) : seekNext(buffer, rtlMatch)) : seekNext(buffer, lastMatch);
|
|
|
+ return isRTL ? (opts.numericInput ? (opts.radixPoint != "" && $.inArray(opts.radixPoint, buffer) != -1 && skipRadixHandling !== true ? $.inArray(opts.radixPoint, buffer) : seekNext(buffer, maskL)) : seekNext(buffer, rtlMatch)) : seekNext(buffer, lastMatch);
|
|
|
}
|
|
|
|
|
|
function escapeRegex(str) {
|
|
|
@@ -1028,7 +1028,7 @@
|
|
|
var input = this, k = e.keyCode, pos = caret(input);
|
|
|
|
|
|
//set input direction according the position to the radixPoint
|
|
|
- if (opts.numericInput) {
|
|
|
+ if (opts.numericInput && opts.radixPoint != "") {
|
|
|
var nptStr = input._valueGet();
|
|
|
var radixPosition = nptStr.indexOf(opts.radixPoint);
|
|
|
if (radixPosition != -1) {
|
|
|
@@ -1055,9 +1055,13 @@
|
|
|
beginPos = firstMaskPos;
|
|
|
}
|
|
|
if (beginPos >= firstMaskPos) {
|
|
|
+ console.log('before delete ' + buffer);
|
|
|
if (opts.numericInput && opts.greedy && k == opts.keyCode.DELETE && buffer[beginPos] == opts.radixPoint) {
|
|
|
beginPos = seekNext(buffer, beginPos);
|
|
|
isRTL = false;
|
|
|
+ } else if (opts.numericInput && opts.greedy && k == opts.keyCode.BACKSPACE && buffer[beginPos] == opts.radixPoint) {
|
|
|
+ beginPos--;
|
|
|
+ isRTL = true;
|
|
|
}
|
|
|
if (isRTL) {
|
|
|
beginPos = shiftR(firstMaskPos, beginPos, getPlaceHolder(beginPos), true);
|
|
|
@@ -1162,7 +1166,7 @@
|
|
|
}
|
|
|
|
|
|
if (writeOutBuffer) {
|
|
|
- writeBuffer(input, buffer, opts.numericInput ? seekNext(buffer, p) : p);
|
|
|
+ writeBuffer(input, buffer, opts.numericInput ? p + 1 : p);
|
|
|
setTimeout(function () { //timeout needed for IE
|
|
|
if (isComplete(input))
|
|
|
$input.trigger("complete");
|
|
|
@@ -1230,7 +1234,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.1.2
|
|
|
+Version: 2.1.3
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1327,7 +1331,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.1.2
|
|
|
+Version: 2.1.3
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1805,7 +1809,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.1.2
|
|
|
+Version: 2.1.3
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1820,6 +1824,7 @@ Optional extensions on the jquery.inputmask base
|
|
|
numericInput: true,
|
|
|
digits: "*", //numer of digits
|
|
|
groupSeparator: ",", // | "."
|
|
|
+ radixPoint: ".",
|
|
|
groupSize: 3,
|
|
|
autoGroup: false,
|
|
|
postFormat: function (buffer, pos, reformatOnly, opts) {
|