ソースを参照

Merge branch 'dev'

Robin Herbots 14 年 前
コミット
3756d24402
3 ファイル変更9 行追加80 行削除
  1. 0 67
      changelog.txt
  2. 0 1
      jquery.inputmask.extentions.js
  3. 9 12
      jquery.inputmask.js

+ 0 - 67
changelog.txt

@@ -1,67 +0,0 @@
-jquery.inputmask changelog
-==========================
-
-version 0.1.9
-
-- allow re-masking with another mask, when their is already a mask in place.
-  ex.
-
-      $(input).inputmask('d/m/y');
-      ... do some stuff ...
-      $(input).inputmask('999999999999');  // => input mask changes to the new mask and applies it to it's value
-
-version 0.2.0
-
-- make entering the textbox via mouseclick or via tab key behave like a normal input
-
-version 0.2.1
-
-- avoid needless checking of the value 
-
-version 0.2.2
-
-- update doubleclick behavior 
-
-version 0.2.3
-
-- ui.datepicker fix
-
-version 0.2.5
-
-- (simple) optional masks    ex:  $(selector).inputmask('9999[aaaa]9999');
-
-version 0.2.8a
-
-- removed optional mask implementation
-
-version 0.2.8b
-
-- added base implementation of numeric inputmask
-
-version 0.3.1
-
-- added clearMaskOnLostFocus option
-
-version 0.3.3
-
-- added insertMode option
-
-version 0.3.5
-
-- added remove option
-
-version 0.3.6
-
-- added escape special chars in mask
-
-version 0.3.7
-
-- added clearIncomplete option - clear the incomplete input on blur
-
-version 0.3.9
-
-- added oncleared option - executes when the mask is cleared
-
-version 0.4.0
-
-- add aliases option

+ 0 - 1
jquery.inputmask.extentions.js

@@ -41,7 +41,6 @@ Optional extentions on the jquery.inputmask base
         'A': {
             validator: "[A-Za-z]",
             cardinality: 1,
-            prevalidator: null,
             casing: "upper"
         }
     });

+ 9 - 12
jquery.inputmask.js

@@ -34,19 +34,15 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                 definitions: {
                     '9': {
                         validator: "[0-9]",
-                        cardinality: 1,
-                        prevalidator: null
+                        cardinality: 1
                     },
                     'a': {
                         validator: "[A-Za-z]",
-                        cardinality: 1,
-                        prevalidator: null
-                        //,casing: "upper" //casing option "upper" => toUpperCase, "lower" => toLowerCase
+                        cardinality: 1
                     },
                     '*': {
                         validator: "[A-Za-z0-9]",
-                        cardinality: 1,
-                        prevalidator: null
+                        cardinality: 1
                     }
                 },
                 keyCode: { ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108,
@@ -432,11 +428,12 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                     end = (typeof end == 'number') ? end : begin;
                     if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
                     return input.each(function() {
-                        if (this.setSelectionRange) {
-                            this.focus();
-                            this.setSelectionRange(begin, end);
-                        } else if (this.createTextRange) {
-                            var range = this.createTextRange();
+                        var self = this;
+                        if (self.setSelectionRange) {
+                            self.focus();
+                            self.setSelectionRange(begin, end);
+                        } else if (self.createTextRange) {
+                            var range = self.createTextRange();
                             range.collapse(true);
                             range.moveEnd('character', end);
                             range.moveStart('character', begin);