Server : LiteSpeed System : Linux server335.web-hosting.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : cardxfeb ( 2452) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/cardxfeb/www/resources/assets/js/custom/ |
window.listen = function (event, selector, callback) {
$(document).on(event, selector, callback)
}
window.listenClick = function (selector, callback) {
$(document).on('click', selector, callback)
}
window.listenSubmit = function (selector, callback) {
$(document).on('submit', selector, callback)
}
window.listenHiddenBsModal = function (selector, callback) {
$(document).on('hidden.bs.modal', selector, callback)
}
window.listenChange = function (selector, callback) {
$(document).on('change', selector, callback)
}
window.listenKeyup= function (selector, callback) {
$(document).on('keyup', selector, callback)
}
window.getFormattedDateTime = function (userDateFormate, isMomentFormat = null) {
if(userDateFormate == 1){
return isMomentFormat ? ('DD MMM, Y') : ('d M, Y') ;
}
if(userDateFormate == 2){
return isMomentFormat ? ('MMM DD, Y') : ('M d, Y') ;
}
if(userDateFormate == 3){
return isMomentFormat ? ('DD/MM/YYYY') : ('d/m/Y') ;
}
if(userDateFormate == 4){
return isMomentFormat ? ('YYYY/MM/DD') : ('Y/m/d') ;
}
if(userDateFormate == 5){
return isMomentFormat ? ('MM/DD/YYYY') : ('m/d/Y') ;
}
if(userDateFormate == 6){
return isMomentFormat ? ('YYYY-MM-DD') : ('Y-m-d') ;
}
}