PageSourceSearch

https://zdravka-plzen.cz/bakaweb/next/js/master_core.js?v=20260917

js zdravka-plzen.cz collected 2026-09-24 10:11:01 UTC 4,209 bytes, 125 lines download raw bytes

1$(
2    function () {
3        CheckUnsupportedBrowser();
4        CheckConnection();
5        CheckNetCoreWeb();
6    }
7)
8
9/**
10 * Otevření popup okna
11 * @param {any} element prvek nad kterým se má popup zobrazit
12 * @param {any} position pozice popupu
13 */
14function showPopup(element, position) {
15    var id = element.id;
16    var popup = "#" + id + "_popUp";
17    if (!position) {
18        position = { my: "center", at: "center", of: window, collision: 'fit' };
19    }
20    $(popup).dialog({
21        dialogClass: "no-titlebar",
22        clickOutside: true,
23        clickOutsideTrigger: "#" + id,
24        position: position,
25        draggable: false,
26        resizable: false,
27        show: {
28            effect: "fade",
29            duration: 100
30        },
31        hide: {
32            effect: "fade",
33            duration: 100
34        }
35    });
36}
37//Pro odstranění focusu na close button
38$.ui.dialog.prototype._focusTabbable = $.noop;
39//Doplněk pro zavírání jquery dialogu po kliknutí mimo něj
40$.widget('ui.dialog', $.ui.dialog, {
41    options: {
42        clickOutside: false,
43        clickOutsideTrigger: ''
44    },
45    open: function () {
46        var clickOutsideTriggerEl = $(this.options.clickOutsideTrigger),
47            that = this;
48        if (this.options.clickOutside) {
49            $(document).on('click.ui.dialogClickOutside' + that.eventNamespace, function (event) {
50                var $target = $(event.target);
51                if ($target.closest($(clickOutsideTriggerEl)).length === 0 &&
52                    $target.closest($(that.uiDialog)).length === 0) {
53                    that.close();
54                }
55            });
56        }
57        this._super();
58    },
59    close: function () {
60        $(document).off('click.ui.dialogClickOutside' + this.eventNamespace);
61        this._super();
62    },
63});
64
65/**
66 * Zobrazení panelu s obecným varováním pro uživatele
67 * @param {any} message zpráva obsahu
68 */
69function ShowGeneralWarningPanel(message) {
70    /**Panel pro obecné varování zobrazené v hlavním layoutu */
71    var warningPanel = $("#generalWarning");
72    warningPanel.addClass("visible"); //přidaná třída 'visible' kvůli selectoru v css
73    warningPanel.empty();
74    warningPanel.html(message);
75    warningPanel.show();
76}
77
78/**Kontrola podporovaného prohlížeče kvůli ukončení podpory IE */
79function CheckUnsupportedBrowser() {
80    if (!(/(Chrome|Safari|Firefox)/.test(navigator.userAgent))) {
81        ShowGeneralWarningPanel(unsupportedBrowserMsg);
82    }
83}
84
85/**Detekce nezabezpečeného spojení */
86function CheckConnection() {
87    if (window.location.protocol == 'http:') {
88        /**Testovací url pro https */
89        var url = 'https://' + window.location.host + window.location.pathname;
90        $.get(url)
91            .done(function () {
92                window.location.href.replace('http:', 'https:');
93            })
94            .fail(function () {
95                ShowGeneralWarningPanel(unsecuredConnectionMsg);
96            });
97    }
98}
99
100/** Kontrola na běh NetCore webovky */
101const CheckNetCoreWeb = () => {
102    if (typeof isNetCoreRunning !== "undefined" && !isNetCoreRunning) {
103        ShowGeneralWarningPanel(netCoreIsNotRunningMsg);
104    }
105}
106
107/** 
108 * Kontrola na přetýkání textů, kde se mají případně zobrazit tooltipy.
109 * Pro použití je nutné danému elementu přidat classu "_checkOverflowingText" a následně ve vhodnou chvílit provolat tuto metodu.
110 */
111const CheckOverflowingText = () => {
112    const elements = document.querySelectorAll("._checkOverflowingText");
113    elements.forEach(el => {
114        const title = el.getAttribute('title');
115        if (title) {
116            if (el.scrollWidth > el.clientWidth) {
117                //el.removeAttribute('data-title'); // Odstranit vlastní data atribut
118                el.setAttribute('title', title); // Obnovení originálního title
119            } else {
120                //el.setAttribute('data-title', title); // Nastavení vlastního data atributu
121                el.removeAttribute('title'); // Skrytí originálního title
122            }
123        }
124    })
125}

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.