1var url = getUrlVars(); 2 3 4function getHashParams() { 5 6 var hashParams = {}; 7 var e, 8 a = /\+/g, // Regex for replacing addition symbol with a space 9 r = /([^&;=]+)=?([^&;]*)/g, 10 d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, 11 q = window.location.hash.substring(1); 12 13 while (e = r.exec(q)) 14 hashParams[d(e[1])] = d(e[2]); 15 16 return hashParams; 17} 18 19function getUrlVars() { 20 url = {}; 21 url.url = window.location.origin + window.location.pathname; 22 var get = {}; 23 var parts = window.location.href.replace(/[?&]+([^=&]+)=?([^&]*)/gi, function(m, key, value) { 24 if (m.indexOf('=') < 0) { 25 get[key] = null; 26 } else { 27 get[key] = value; 28 } 29 }); 30 url.get = get; 31 return url; 32} 33 34function isset(variable) { 35 return typeof variable !== 'undefined'; 36} 37 38 39function dodajTargetDoLinkow() { 40 $('a[href*="/file"]').each(function() { 41 $(this).attr('target', '_blank'); 42 }); 43} 44 45function dodajTargetDoStronZewnetrznych() { 46 $('a[href*="http"]').each(function() { 47 $(this).attr('target', '_blank'); 48 }); 49 $('a[href*="//"]').each(function() { 50 $(this).attr('target', '_blank'); 51 }); 52} 53 54 55 56$.fn.odswiezTooltipy = function() { 57 $(this).find('.tooltip').tooltip({ 58 items: '*', 59 content: function() { 60 return $(this).find('.tooltip-tresc').html(); 61 }, 62 show: null, // show immediately 63 open: function(event, ui) 64 { 65 if (typeof(event.originalEvent) === 'undefined') 66 { 67 return false; 68 } 69 70 var $id = $(ui.tooltip).attr('id'); 71 72 // close any lingering tooltips 73 $('div.ui-tooltip').not('#' + $id).remove(); 74 75 // ajax function to pull in data and add it to the tooltip goes here 76 }, 77 close: function(event, ui) 78 { 79 ui.tooltip.hover(function() 80 { 81 $(this).stop(true).fadeTo(400, 1); 82 }, 83 function() 84 { 85 $(this).fadeOut('400', function() 86 { 87 $(this).remove(); 88 }); 89 }); 90 } 91 }); 92} 93 94function dajLinkiDoElementowZId() { 95 $('.main *[id]').each(function() { 96 $(this).css({ outline: '3px dashed orange' }); 97 var top = $(this).position().top; 98 var right = $(this).offset().left + $(this).width(); 99 // console.log(right); 100 var divZLinkiem = $("<div class='link-do-elementu'><div class='ikonka ui-icon ui-icon-link'></div><textarea class='url'>" + $(this).linkDoElementu() + "</textarea></div>"); 101 divZLinkiem.css({ 102 top: top, 103 right: 0, 104 }); 105 $(this).append(divZLinkiem); 106 divZLinkiem.find('.ikonka').hover( 107 function() { 108 $(this).parent().find('.url').show().select(); 109 $(this).parent().find('.ikonka').hide(); 110 }, 111 function() {} 112 ); 113 divZLinkiem.find('.url').hover( 114 function() {}, 115 function() { 116 $(this).hide().select(); 117 $(this).parent().find('.ikonka').show(); 118 } 119 ); 120 }); 121} 122 123$.fn.linkDoElementu = function() { 124 return url.url + '#scroll=' + $(this).attr('id'); 125} 126 127 128function odswiezStruktury() { 129 dodajTargetDoLinkow(); 130 dodajTargetDoStronZewnetrznych(); 131 if (isset(url.get.linki)) { 132 dajLinkiDoElementowZId(); 133 } 134 odswiezZwijanie(); 135} 136 137 138 139 140 141 142 143 144 145 146 147 148 149function odswiezZwijanie() { 150 $(".przycisk-zwin-rozwin").each(function() { 151 var elementRozwijany = dajRozwijanyElement($(this).data('rozwijany-id')); 152 var czyZwiniety = elementRozwijany.hasClass('zwiniete'); 153 if (czyZwiniety) { 154 $(this).find('.rozwin').show(); 155 $(this).find('.zwin').hide(); 156 } else { 157 $(this).find('.rozwin').hide(); 158 $(this).find('.zwin').show(); 159 } 160 }); 161} 162 163function przypiszZwijanie() { 164 $(".przycisk-zwin-rozwin").click(function() { 165 var elementRozwijany = dajRozwijanyElement($(this).data('rozwijany-id')); 166 var czyRozwijac = elementRozwijany.hasClass('zwiniete'); 167 if (typeof($(this).data('zwijany-typ')) !== 'undefined') { 168 var elementyZwijane = $("*[data-zwijanie-typ = '" + $(this).data('zwijany-typ') + "']"); 169 elementyZwijane.addClass('zwiniete'); 170 } 171 if (czyRozwijac) { 172 elementRozwijany.removeClass('zwiniete'); 173 } 174 odswiezZwijanie(); 175 }); 176} 177 178function dajRozwijanyElement(idRozwijanego) { 179 return elementRozwijany = $("*[data-zwijanie-id = '" + idRozwijanego + "']") 180} 181 182 183 184 185 186 187$(document).ready(function() { 188 189 przypiszZwijanie(); 190 odswiezStruktury(); 191 192 193 $(".filtry").odswiezCheckboksy(); 194 195 $('.tabelka-kontener').each(function() { 196 // $(this).wyswietlTabele(); 197 $(this).wzbogacTabeleOZdarzenia(); 198 }); 199 200 $('.zobacz-pozostale').click(function() { 201 $(this).closest('.rozwin-zwin').prev('.schowane').show(200); 202 $(this).closest('.rozwin-zwin').prev('table').find('.ukryte').show(200); 203 $(this).closest('.rozwin-zwin').prev('ul').find('.ukryte').show(200); 204 $(this).hide(200); 205 $(this).closest('.rozwin-zwin').find('.schowaj-pozostale').show(200); 206 odswiezStruktury(); 207 }); 208 209 $('.schowaj-pozostale').click(function() { 210 $(this).closest('.rozwin-zwin').prev('.schowane').hide(200); 211 $(this).closest('.rozwin-zwin').prev('table').find('.ukryte').hide(200); 212 $(this).closest('.rozwin-zwin').prev('ul').find('.ukryte').hide(200); 213 $(this).hide(200); 214 $(this).closest('.rozwin-zwin').find('.zobacz-pozostale').show(200); 215 odswiezStruktury(); 216 }); 217 218 $('.rozwin-wszystkie').click(function() { 219 var typ = $(this).closest('.rozwin-zwin').data('zwijany-typ'); 220 if (typeof typ !== 'undefined') { 221 $("*[data-zwijanie-typ='" + typ + "']").removeClass('zwiniete'); 222 } else { 223 $('.schowane.' + $(this).data('klasa-celu')).show(200); 224 } 225 $(this).fadeOut(200); 226 $(this).closest('.rozwin-zwin').find('.zwin').fadeIn(200); 227 odswiezStruktury(); 228 }); 229 230 $('.zwin-wszystkie').click(function() { 231 var typ = $(this).closest('.rozwin-zwin').data('zwijany-typ'); 232 if (typeof typ !== 'undefined') { 233 $("*[data-zwijanie-typ='" + typ + "']").addClass('zwiniete'); 234 } else { 235 $('.schowane.' + $(this).data('klasa-celu')).hide(200); 236 } 237 $(this).fadeOut(200); 238 $(this).closest('.rozwin-zwin').find('.rozwin').fadeIn(200); 239 odswiezStruktury(); 240 }); 241 242 $('span.rozwin').click(function() { 243 $(this).closest('.rekord').find('.' + $(this).data('klasa-celu')).show(200); 244 odswiezStruktury(); 245 }); 246 247 $(document).on('click', '.button-transparent.down-arrow', function() { 248 var kontener = $(this).closest('.czytaj-wiecej-kontener'); 249 kontener.find('.schowane').show(500); 250 kontener.find('.marker').hide(); 251 $(this).hide(); 252 kontener.find('.button-transparent.up-arrow').show(); 253 odswiezStruktury(); 254 }); 255 256 $(document).on('click', '.button-transparent.up-arrow', function() { 257 var kontener = $(this).closest('.czytaj-wiecej-kontener'); 258 kontener.find('.schowane').hide(500); 259 $(this).hide(); 260 kontener.find('.button-transparent.down-arrow').show(); 261 kontener.find('.marker').show(); 262 odswiezStruktury(); 263 }); 264 265 $(document).on('click', '.button-transparent.down-arrow', function() { 266 var kontener = $(this).closest('.offices-list'); 267 kontener.find('.schowane').show(500); 268 $(this).hide(); 269 kontener.find('.button-transparent.up-arrow').show(); 270 odswiezStruktury(); 271 }); 272 273 $(document).on('click', '.button-transparent.up-arrow', function() { 274 var kontener = $(this).closest('.offices-list'); 275 kontener.find('.schowane').hide(500); 276 $(this).hide(); 277 kontener.find('.button-transparent.down-arrow').show(); 278 odswiezStruktury(); 279 }); 280 281 282 // [Kuba, 2019-07-17] ZakomentowaÅem, aby pozbyÄ siÄ bÅÄdów w konsoli js z tooltipami 283 // 284 // $(document).tooltip({ 285 // items: "[tooltip]", 286 // content: function() { 287 // return $(this).attr('tooltip'); 288 // }, 289 // // hide: { 290 // // effect: "slideDown", 291 // // delay: 200000, 292 // // }, 293 // }); 294 295 296 297 $('form.wyszukiwarka-glowna').submit(function(e) { 298 e.preventDefault(); 299 var q = $(this).find('input').val(); 300 // $(this).find('input').remove(); 301 // $(this).attr('action', '/q/' + q); 302 window.location.href = '/q/' + q; 303 }); 304 305 $('#wyszukiwarka-lupka').click(function() { 306 $('#wyszukiwarka-pole-z-przyciskiem').show(500); 307 $('#wyszukiwarka-pole-z-przyciskiem input').focus(); 308 }); 309 310 $('#wyszukiwarka-przycisk').click(function() { 311 $(this).closest('form').submit(); 312 }); 313 314 315 // $('.grid-2-columns-from-top').masonry({ 316 // itemSelector: '.grid-item', 317 // gutter: 40 318 // }); 319 320 321 322 $("svg g[data-filtr]").click(function() { 323 var filtr = $(this).data('filtr'); 324 var wartosc = $(this).data('wartosc-filtra'); 325 var tabelkaZFiltrem = $('#' + $(this).closest('svg').data('tabelka-powiazana')); 326 var tabelka = tabelkaZFiltrem.find('.tabelka-kontener'); 327 var filtry = { filtry: {}}; 328 filtry['filtry'][filtr] = [ 329 wartosc 330 ]; 331 tabelka.data('filtr', filtry); 332 tabelka.wyswietlTabele(); 333 334 przewinDoElementu(tabelkaZFiltrem); 335 336 337 }); 338 339 $('body').odswiezTooltipy(); 340 341 var hash = getHashParams(); 342 343 obsluzHash(hash); 344 odswiezZwijanie(); 345}); 346 347function przewinDoElementu(element) { 348 $("html, body").animate({ scrollTop: element.offset().top - 100}, 1000); 349} 350 351$.fn.pokazGalaz = function() { 352 var dzieciaki = $(this).find('.zwiniete'); 353 var tatusiowie = $(this).parents('.zwiniete'); 354 dzieciaki.removeClass('zwiniete'); 355 tatusiowie.removeClass('zwiniete'); 356} 357 358function obsluzHash(hash) { 359 if (typeof hash.r !== 'undefined') { 360 var rekord = $('#rekord-' + hash.r); 361 rekord.find('.schowane').show(200); 362 if (!rekord.is(':visible')) { 363 rekord.parent().find('.ukryte').show(); 364 } 365 $("html, body").animate({ scrollTop: $('#rekord-' + hash.r).offset().top - 100 }, 1000, 'swing'); 366 } 367 if (typeof hash.scroll !== 'undefined') { 368 var rekord = $('#' + hash.scroll); 369 rekord.pokazGalaz(); 370 rekord.find('.schowane').show(200); 371 if (!rekord.is(':visible')) { 372 rekord.parent().find('.ukryte').show(); 373 } 374 $("html, body").animate({ scrollTop: rekord.offset().top - 100}, 1000, 'swing'); 375 } 376 377 378 hash = location.hash; 379 try { 380 var json = $.parseJSON(hash.substring(1)); 381 } catch (e) { 382 383 } 384 385} 386 387function scrollToElement(element) { 388 $('html, body').animate({ 389 scrollTop: element.offset().top - 100 390 }, 1000); 391} 392 393$(window).on('hashchange', function (e) { 394 obsluzHash(location.hash); 395}).trigger('hashchange'); 396 397 398 399window.onload = function() { 400 // var hash = getHashParams(); 401 402 // obsluzHash(hash); 403} 404
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.