浏览代码

removeMaskOnSubmit has no reason to depend on autoUnmask #709

Robin Herbots 11 年之前
父节点
当前提交
538c5523e0
共有 5 个文件被更改,包括 5 次插入6 次删除
  1. 0 1
      README.md
  2. 1 1
      dist/inputmask/jquery.inputmask.js
  3. 1 1
      dist/jquery.inputmask.bundle.js
  4. 1 1
      dist/jquery.inputmask.bundle.min.js
  5. 2 2
      js/jquery.inputmask.js

+ 0 - 1
README.md

@@ -427,7 +427,6 @@ Default: false.
 
 #### removeMaskOnSubmit
 Remove the mask before submitting the form.  
-Use in combination with autoUnmask: true
 
 #### clearMaskOnLostFocus
 

+ 1 - 1
dist/inputmask/jquery.inputmask.js

@@ -860,7 +860,7 @@
                 }
                 $el.unbind(".inputmask"), $el.closest("form").bind("submit", function() {
                     valueOnFocus != getBuffer().join("") && $el.change(), $el[0]._valueGet && $el[0]._valueGet() == getBufferTemplate().join("") && $el[0]._valueSet(""), 
-                    opts.autoUnmask && opts.removeMaskOnSubmit && $el.inputmask("remove");
+                    opts.removeMaskOnSubmit && $el.inputmask("remove");
                 }).bind("reset", function() {
                     setTimeout(function() {
                         $el.trigger("setvalue");

+ 1 - 1
dist/jquery.inputmask.bundle.js

@@ -858,7 +858,7 @@
                 }
                 $el.unbind(".inputmask"), $el.closest("form").bind("submit", function() {
                     valueOnFocus != getBuffer().join("") && $el.change(), $el[0]._valueGet && $el[0]._valueGet() == getBufferTemplate().join("") && $el[0]._valueSet(""), 
-                    opts.autoUnmask && opts.removeMaskOnSubmit && $el.inputmask("remove");
+                    opts.removeMaskOnSubmit && $el.inputmask("remove");
                 }).bind("reset", function() {
                     setTimeout(function() {
                         $el.trigger("setvalue");

文件差异内容过多而无法显示
+ 1 - 1
dist/jquery.inputmask.bundle.min.js


+ 2 - 2
js/jquery.inputmask.js

@@ -1601,7 +1601,7 @@
                         if ($el[0]._valueGet && $el[0]._valueGet() == getBufferTemplate().join('')) {
                             $el[0]._valueSet(''); //clear masktemplete on submit and still has focus
                         }
-                        if (opts.autoUnmask && opts.removeMaskOnSubmit) {
+                        if (opts.removeMaskOnSubmit) {
                             $el.inputmask("remove");
                         }
                     }).bind('reset', function () {
@@ -1900,7 +1900,7 @@
                 repeat: 0, //repetitions of the mask: * ~ forever, otherwise specify an integer
                 greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
                 autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
-                removeMaskOnSubmit: true, //remove the mask before submitting the form.  Use in combination with autoUnmask: true
+                removeMaskOnSubmit: true, //remove the mask before submitting the form.
                 clearMaskOnLostFocus: true,
                 insertMode: true, //insert the input or overwrite the input
                 clearIncomplete: false, //clear the incomplete input on blur