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.