Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/js/main.js
Назад
$(document).ready(function () { window._token = $('meta[name="csrf-token"]').attr('content') moment.updateLocale('en', { week: {dow: 1} // Monday is the first day of the week }) $('.date').datetimepicker({ format: 'YYYY-MM-DD', locale: 'en', icons: { up: 'fas fa-chevron-up', down: 'fas fa-chevron-down', previous: 'fas fa-chevron-left', next: 'fas fa-chevron-right' } }) $('.datetime').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss', locale: 'en', sideBySide: true, icons: { up: 'fas fa-chevron-up', down: 'fas fa-chevron-down', previous: 'fas fa-chevron-left', next: 'fas fa-chevron-right' } }) $('.timepicker').datetimepicker({ format: 'HH:mm:ss', icons: { up: 'fas fa-chevron-up', down: 'fas fa-chevron-down', previous: 'fas fa-chevron-left', next: 'fas fa-chevron-right' } }) $('.select-all').click(function () { let $select2 = $(this).parent().siblings('.select2') $select2.find('option').prop('selected', 'selected') $select2.trigger('change') }) $('.deselect-all').click(function () { let $select2 = $(this).parent().siblings('.select2') $select2.find('option').prop('selected', '') $select2.trigger('change') }) $('.select2').select2() $('.treeview').each(function () { var shouldExpand = false $(this).find('li').each(function () { if ($(this).hasClass('active')) { shouldExpand = true } }) if (shouldExpand) { $(this).addClass('active') } }) $('a[data-widget^="pushmenu"]').click(function () { setTimeout(function() { $($.fn.dataTable.tables(true)).DataTable().columns.adjust(); }, 350); }) $(document).on('change','#country',function(){ // console.log( this.value); showLoading(); $.ajax({ method: "GET", url: "/admin/getStates/"+this.value, success: function(response){ // console.log(response); $("#state").empty() $("#city").empty() response.forEach(function(data){ // console.log(data) $("#state").append("<option value='"+data.id+"'>"+data.name+"</option>") }) $("#state").select2("destroy").select2(); swal.close() }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert("Status: " + textStatus); alert("Error: " + errorThrown); swal.close() } }) }); $(document).on('change','#state',function(){ showLoading(); $.ajax({ method: "GET", url: "/admin/getCities/"+this.value, success: function(response){ // console.log(response); $("#city").empty() response.forEach(function(data){ // console.log(data) $("#city").append("<option value='"+data.id+"'>"+data.name+"</option>") }) $("#city").select2("destroy").select2(); swal.close() }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert("Status: " + textStatus); alert("Error: " + errorThrown); swal.close() } }) // console.log( this.value); }); $(document).on('change','select.toggle_status',function(){ showLoading(); var user_id = $(this).attr('data-user'); $.ajax({ method: "GET", url: "/admin/status/"+user_id+"/"+this.value, success: function(response){ swal.close() // console.log(response); if(response){ TopEndPopUp('success','Status Changed!') }else{ TopEndPopUp('danger','something went wrong!') } }, error: function(XMLHttpRequest, textStatus, errorThrown) { swal.close() alert("Status: " + textStatus); alert("Error: " + errorThrown); } }) }); // const TopEndPopUp = function(sign,message){ // const Toast = Swal.mixin({ // toast: true, // position: 'top-end', // showConfirmButton: false, // timer: 2000, // timerProgressBar: true, // didOpen: (toast) => { // toast.addEventListener('mouseenter', Swal.stopTimer) // toast.addEventListener('mouseleave', Swal.resumeTimer) // } // }) // Toast.fire({ // icon: sign, // title: message // }) // }; // const showLoading = function() { // Swal.fire({ // title: 'Processing!', // html: 'Please wait', // didOpen: () => { // Swal.showLoading() // } // }) // }; })
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка