1/** **************************************************************************** 2 * @copyright Copyright © 2024 Dmitriy Taranov. * 3 * * 4 * @file doctor-status.js * 5 * @author Anton Fedorov * 6 * @author Dmitriy Taranov <[email protected]> * 7 * @site https://xdemon.ru/inova * 8 ***************************************************************************** */ 9(() => { 10 const bannerText = ` 11 <h2>ÐаннÑй ÑÐ°Ð¹Ñ Ð¿ÑедназнаÑен ÑолÑко Ð´Ð»Ñ ÑпеÑиалиÑÑов здÑÐ°Ð²Ð¾Ð¾Ñ ÑанениÑ.</h2> 12 `; 13 14 const buttonText = 'ÐонÑÑно'; 15 16 function restrictAccess() { 17 $('.modal-open').addClass('non-closed'); 18 document.addEventListener('keydown', (event) => { 19 const modal = document.querySelector('.modal-open'); 20 if (modal && modal.classList.contains('non-closed') && event.key === 'Escape') { 21 event.preventDefault(); // ÐÑедоÑвÑаÑÐ°ÐµÑ Ð·Ð°ÐºÑÑÑие 22 console.log('ÐакÑÑÑие модалÑного окна по Esc оÑклÑÑено'); 23 } 24 }); 25 $('.status-modal').on('hide.bs.modal', (event) => { 26 event.preventDefault(); // ÐÑедоÑвÑаÑÐ°ÐµÑ Ð·Ð°ÐºÑÑÑие модалÑного окна 27 }); 28 } 29 30 $(() => { 31 const statusModal = gcModalFactory.create({ 32 onShow() { 33 }, 34 onHide() { 35 }, 36 }); 37window.checkModal = statusModal 38 // Ðобавление клаÑÑа-модиÑикаÑоÑа 39 statusModal.getModalEl().addClass('status-modal'); 40 41 statusModal.get$Modal().modal({ 42 keyboard: false, 43 }); 44 45 // УÑÑановка нÑжного конÑенÑа 46 statusModal.setContent( 47 `${bannerText}<button class="btn-primary btn-approve-status">${buttonText}</button>`, 48 ); 49 $('.btn-approve-status').click(() => { 50 localStorage.setItem('status-accepted', true); 51 if (window.accountUserId > 0) { 52 $.get(`/chtm/approve-status/app`, (response) => { 53 if (response.status === 'success') { 54 $('.status-modal').off('hide.bs.modal'); // Снимаем вÑе обÑабоÑÑики 55$('.status-modal').modal('hide'); 56 } 57 }); 58 } else { 59 $('.status-modal').off('hide.bs.modal'); // Снимаем вÑе обÑабоÑÑики 60$('.status-modal').modal('hide'); 61 } 62 }); 63 statusModal.hide(); 64 65 if (!window.location.href.includes('editor')) { 66 // ÐÑкÑÑÑие модалÑного окна 67 if (window.accountUserId > 0) { 68 $.get(`/chtm/approve-status/app~check`, (response) => { 69 if (response.status !== 'success') { 70 statusModal.show(); 71 restrictAccess(); 72 } else { 73 $('.status-modal').off('hide.bs.modal'); // Снимаем вÑе обÑабоÑÑики 74$('.status-modal').modal('hide'); 75 } 76 }); 77 } else { 78 if (localStorage.getItem('status-accepted') === null) { 79 statusModal.show(); 80 restrictAccess(); 81 } else { 82 $('.status-modal').off('hide.bs.modal'); // Снимаем вÑе обÑабоÑÑики 83$('.status-modal').modal('hide'); 84 } 85 } 86 } 87 88 }); 89})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.