Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/js/global.js
Назад
$(function () { $('#toggle').click(function () { $(this).toggleClass('active'); $('#overlay').toggleClass('open'); $('body').toggleClass('openned'); }); $('.close').click(function () { $('#overlay').removeClass('open'); $('body').removeClass('openned'); }); $(document).on('keydown', function (e) { if (e.keyCode === 27) { // ESC $('#overlay').removeClass('open'); $('body').removeClass('openned'); } }); $(window).scroll(function () { if (window.innerWidth < 992) { if ($(document).scrollTop() > 0) { $('.somni-header').addClass('scrolled'); } else { $('.somni-header').removeClass('scrolled'); } } }); $('.db-nav a').click(function () { $('.db-nav a').removeClass('active'); $(this).toggleClass('active'); }); $('.main-links li').click(function () { $('.main-links li').removeClass('active'); $(this).toggleClass('active'); }); $('.db-toggle').click(function () { $('.l-sidebar').toggleClass('open'); }); }); // HM Jquery 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() } }) }; function swalPop(type,title,message){ Swal.fire({ icon: type, title: title, text: message, }) } function printUnits(format, numUnits) { const units = []; switch (format) { case 'A-Z': for (let i = 65; i <= 90; i++) { // ASCII codes for A to Z units.push(String.fromCharCode(i)); } break; case '1-10': for (let i = 1; i <= 10; i++) { units.push(i); } break; case '1A-10Z': for (let i = 1; i <= 10; i++) { for (let j = 65; j <= 90; j++) { units.push(`${i}${String.fromCharCode(j)}`); } } break; case '1A-100B': for (let i = 1; i <= 100; i++) { for (let j = 65; j <= 66; j++) { // ASCII codes for A and B units.push(`${i}${String.fromCharCode(j)}`); } } break; case '100-900': for (let i = 100; i <= 900; i++) { units.push(i); } break; case '100A-900B': for (let i = 100; i <= 900; i++) { for (let j = 65; j <= 66; j++) { // ASCII codes for A and B units.push(`${i}${String.fromCharCode(j)}`); } } break; } // Print the specified number of units return units.slice(0, numUnits); } function getPartialSelectedUnits(callback) { var property_id = $('input[name="property_id"]').val(); $.ajax({ url: '/landlord/get_partial_units/'+property_id, // Replace with your Laravel route URL type: 'GET', dataType: 'json', success: function(response) { if (typeof callback === 'function') { callback(response); } }, error: function(xhr, status, error) { console.error('Error: ' + error); } }); } function sendEmailVerification(){ showLoading(); $.ajax({ url: '/send-verification', // Replace with your Laravel route URL type: 'GET', dataType: 'json', success: function(response) { swal.close(); if (response.flag) { swalPop('success',response.message); }else{ swalPop('error',response.message); } }, error: function(xhr, status, error) { swal.close(); swalPop('error',error); console.error('Error: ' + error); } }); } //Firebase code var firebaseConfig = { apiKey: "AIzaSyDZl2hRU60LVUxIExYQOSThkubF4hCJ2l8", authDomain: "somni-5470e.firebaseapp.com", projectId: "somni-5470e", storageBucket: "somni-5470e.appspot.com", messagingSenderId: "479279133405", appId: "1:479279133405:web:d5aafcd870646df253e134", measurementId: "G-CSBJ2P0R5R" }; firebase.initializeApp(firebaseConfig); const messaging = firebase.messaging(); function startFCM() { messaging .requestPermission() .then(function () { return messaging.getToken() }) .then(function (response) { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ url: '/store-token', type: 'POST', data: { token: response }, dataType: 'JSON', success: function (response) { // alert('Token stored.'); }, error: function (error) { // alert(error); }, }); }).catch(function (error) { // alert(error); }); } messaging.onMessage(function (payload) { const title = payload.notification.title; const options = { body: payload.notification.body, icon: payload.notification.icon, }; new Notification(title, options); }); $( document ).ready(function() { startFCM(); // console.log('start man'); });
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка