PageSourceSearch

https://primaria-tuzla.ro/components/com_edocman/assets/js/player.js?0a7fc4

js primaria-tuzla.ro collected 2026-10-02 23:08:53 UTC 4,000 bytes, 98 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function() {
2    setupViewModal();
3});
4
5function setupViewModal() {
6    // Modal chính
7    const modalView = document.getElementById("documentViewModal");
8    const modalIframeView = modalView ? modalView.querySelector("#modalIframe") : null;
9    const modalContent = document.getElementById('modalViewContent');
10    const closeBtn = modalView ? modalView.querySelector(".close-btn:not(#fullscreenBtn)") : null;
11    const toggleFullscreenButton = modalView ? modalView.querySelector("#fullscreenBtn") : null;
12
13    // Modal module
14    const modalViewModule = document.getElementById("documentViewModal_module");
15    const modalIframeViewModule = modalViewModule ? modalViewModule.querySelector("#modalIframe") : null;
16    const modalContentModule = document.getElementById('modalViewContent_module');
17    const closeBtnModule = modalViewModule ? modalViewModule.querySelector(".close-btn:not(#fullscreenBtn)") : null;
18    const toggleFullscreenButtonModule = modalViewModule ? modalViewModule.querySelector("#fullscreenBtn") : null;
19
20    // Links layout chính
21    const linksMain = document.querySelectorAll(".edocmanplayerbtn, .pdfviewer");
22    // Links module
23    const linksModule = document.querySelectorAll(".edocmanplayerbtn_module, .pdfviewer_module");
24
25    // Xử lý click cho layout chính
26    linksMain.forEach(link => {
27        link.addEventListener("click", function(event) {
28            event.preventDefault();
29            var url = this.href;
30            if (modalIframeView && modalView) {
31                modalIframeView.src = url;
32                modalView.style.display = "flex";
33            }
34        });
35    });
36
37    // Xử lý click cho module
38    linksModule.forEach(link => {
39        link.addEventListener("click", function(event) {
40            event.preventDefault();
41            var url = this.href;
42            if (modalIframeViewModule && modalViewModule) {
43                modalIframeViewModule.src = url;
44                modalViewModule.style.display = "flex";
45            }
46        });
47    });
48
49    // Đóng modal chính
50    if (closeBtn) {
51        closeBtn.onclick = function() {
52            modalView.style.display = "none";
53            modalIframeView.src = "";
54        };
55    }
56    // Đóng modal module
57    if (closeBtnModule) {
58        closeBtnModule.onclick = function() {
59            modalViewModule.style.display = "none";
60            modalIframeViewModule.src = "";
61        };
62    }
63
64    // Fullscreen modal chính
65    if (toggleFullscreenButton && modalContent) {
66        toggleFullscreenButton.onclick = function() {
67            modalContent.classList.toggle('fullscreen');
68            if (modalContent.classList.contains('fullscreen')) {
69                toggleFullscreenButton.innerHTML = '<i class="fas fa-compress"></i>';
70            } else {
71                toggleFullscreenButton.innerHTML = '<i class="fas fa-expand"></i>';
72            }
73        };
74    }
75    // Fullscreen modal module
76    if (toggleFullscreenButtonModule && modalContentModule) {
77        toggleFullscreenButtonModule.onclick = function() {
78            modalContentModule.classList.toggle('fullscreen');
79            if (modalContentModule.classList.contains('fullscreen')) {
80                toggleFullscreenButtonModule.innerHTML = '<i class="fas fa-compress"></i>';
81            } else {
82                toggleFullscreenButtonModule.innerHTML = '<i class="fas fa-expand"></i>';
83            }
84        };
85    }
86
87    // Đóng modal khi click ngoài vùng content
88    [modalView, modalViewModule].forEach(modal => {
89        if (!modal) return;
90        window.addEventListener("click", function(event) {
91            if (event.target === modal) {
92                modal.style.display = "none";
93                var iframe = modal.querySelector("#modalIframe");
94                if (iframe) iframe.src = "";
95            }
96        });
97    });
98}

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.