PageSourceSearch

https://ipsen-edu.ru/pl/cms/layout/js?id=47979&hash=&bundle=1&v8

js ipsen-edu.ru collected 2026-10-07 01:02:16 UTC 3,865 bytes, 89 lines download raw bytes

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.