Skip to content
Permalink
Browse files

Include Input Mask JS Script

  • Loading branch information...
sebastienheraud committed Jul 19, 2019
1 parent 800c72a commit 13aa6bbfabe8d73f6afb82783987dfaefb428223
Showing with 34 additions and 0 deletions.
  1. +26 −0 media/cck/js/jquery.inputmask.binding.min.js
  2. +8 −0 media/cck/js/jquery.inputmask.min.js
@@ -0,0 +1,26 @@
/*
Input Mask plugin binding
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) Robin Herbots
Licensed under the MIT license
*/
(function (factory) {
factory(jQuery, window.Inputmask, window);
}
(function ($, Inputmask, window) {
$(window.document).ajaxComplete(function (event, xmlHttpRequest, ajaxOptions) {
if ($.inArray("html", ajaxOptions.dataTypes) !== -1) {
$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias], [data-inputmask-regex]").each(function (ndx, lmnt) {
if (lmnt.inputmask === undefined) {
Inputmask().mask(lmnt);
}
});
}
}).ready(function () {
$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias],[data-inputmask-regex]").each(function (ndx, lmnt) {
if (lmnt.inputmask === undefined) {
Inputmask().mask(lmnt);
}
});
});
}));

Large diffs are not rendered by default.

0 comments on commit 13aa6bb

Please sign in to comment.
You can’t perform that action at this time.