Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/js/settings.js
Назад
$(function () { $("#emailNotif").click(async function () { // Check if the checkbox is checked if ($(this).is(":checked")) { // Checkbox is checked, add your logic here showLoading(); const data = await $.ajax({ url: '/email_on', method: 'GET', // dataType: 'json', }); swal.close(); if(data){ // info.event.remove(); toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('Email Notification Enabled'); }else{ toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.error('Error Enabling Email Notification'); } } else { // Checkbox is unchecked, add your logic here // console.log("Email notifications disabled"); showLoading(); const data = await $.ajax({ url: '/email_off', method: 'GET', // dataType: 'json', }); swal.close(); if(data){ // info.event.remove(); toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('Email Notification Disabled'); }else{ toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.error('Error Disabling Email Notification'); } } }); $("#desktopNotif").click(async function () { // Check if the checkbox is checked if ($(this).is(":checked")) { // Checkbox is checked, add your logic here showLoading(); const data = await $.ajax({ url: '/desktop_on', method: 'GET', // dataType: 'json', }); swal.close(); if(data){ // info.event.remove(); toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('Desktop Notification Enabled'); }else{ toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.error('Error Enabling Desktop Notification'); } } else { // Checkbox is unchecked, add your logic here // console.log("Desktop notifications disabled"); showLoading(); const data = await $.ajax({ url: '/desktop_off', method: 'GET', // dataType: 'json', }); swal.close(); if(data){ // info.event.remove(); toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('Desktop Notification Disabled'); }else{ toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.error('Error Disabling Desktop Notification'); } } }); });
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка