-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eduardo Villão
authored and
Eduardo Villão
committed
Sep 16, 2021
1 parent
ea0e6f8
commit dc38356
Showing
7 changed files
with
453 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
(function($) { | ||
var fmeMasks = { | ||
'ev-tel': '0000-0000', | ||
'ev-tel-ddd': '(00) 0000-0000', | ||
'ev-tel-ddd9': '(00) 0.0000-0000', | ||
'ev-tel-us': '(000) 000-0000', | ||
'ev-cpf': '000.000.000-00', | ||
'ev-cnpj': '00.000.000/0000-00', | ||
'ev-money': '000.000.000.000.000,00', | ||
'ev-ccard': '0000-0000-0000-0000', | ||
'ev-ccard-valid': '00/00', | ||
'ev-cep': '00000-000', | ||
'ev-time': '00:00:00', | ||
'ev-date': '00/00/0000', | ||
'ev-date_time': '00/00/0000 00:00:00' | ||
}; | ||
|
||
$(window).load( function() { | ||
"use strict"; | ||
$('.fme-mask-input').each(function() { | ||
if($( this ).data('fme-mask') !== undefined) { | ||
var inputMask = $( this ).data("fme-mask"); | ||
if(inputMask == 'ev-cpf' || inputMask == 'ev-cnpj' || inputMask == 'ev-money') { | ||
$( this ).mask( fmeMasks[inputMask], {reverse: true} ); | ||
} else { | ||
$( this ).mask( fmeMasks[inputMask] ); | ||
} | ||
} | ||
}); | ||
jQuery(document).on( 'elementor/popup/show', () => { | ||
$('.fme-mask-input').each(function() { | ||
if($( this ).data("fme-mask") !== undefined) { | ||
var inputMask = $( this ).data("fme-mask"); | ||
if(inputMask == 'ev-cpf' || inputMask == 'ev-cnpj' || inputMask == 'ev-money') { | ||
$( this ).mask( fmeMasks[inputMask], {reverse: true} ); | ||
} else { | ||
$( this ).mask( fmeMasks[inputMask] ); | ||
} | ||
} | ||
}); | ||
}); | ||
}); | ||
})(jQuery); |
0
assets/jquery.mask.js → assets/lib/jquery.mask.js
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.