1$(window).ready(function(){ 2 enableSearch("#mapContainer",".search"); 3}); 4 5function enableSearch(cont, input){ 6 var element = $(input); 7 var interval = element.attr("data-interval"); 8 var typingTimer; 9 10 element.keyup(function(){ 11 syncBars($(this)); 12 clearTimeout(typingTimer); 13 typingTimer = setTimeout(searchResults, interval); 14 }); 15 16 $(window).keydown(function(e){ 17 if(e.keyCode==27 && $(input).val()!=""){ 18 $(input).val(""); 19 typingTimer = setTimeout(searchResults, interval); 20 } 21 }); 22 23} 24 25var search_change=false; 26// EXECUTED AFTER THE INTERVAL PASSES 27function searchResults(el,container){ 28 if(typeof el === "undefined"){ 29 el = null; 30 } 31 32 if(typeof container ==="undefined"){ 33 container = null; 34 } 35 36 search_change=true; 37 text = $("#search").val(); 38 39 if(text === ''){ 40 toggleMunicipal(); 41 } 42 43 else{ 44 $("footer").css({"display":"none"}); 45 $(".header-text").hide(); 46 47 closeNational(); 48 closeOverall(); 49 closeMunicipal(); 50 $(".region-popup").hide(); 51 52 Request.call("Maps","getProject",null,{"search":text},"POST","text"). 53 then(function(data){ 54 $("#mapContainer").html(data).css({"display":"flex","margin-top":"1%"}); 55 positionTable(); 56 }). 57 fail(function(error){ 58 //alert("Status: " + error.status + "\nText: " + error.statusText); 59 }); 60 } 61} 62 63function syncBars(el){ 64 el.val(el.val().toLowerCase()); 65 if(el.attr('name')=='map-search') 66 $(".bar-search").val($(".map-search").val()); 67 if(el.attr('name')=='bar-search') 68 $(".map-search").val($(".bar-search").val()); 69} 70 71function positionTable(){ 72 table = $(".searchTable"); 73 if( menuOpen && windowsize>800) table.css({"margin-top":"initial"}); 74 if(!menuOpen && windowsize<800) table.css({"margin-top":"55px"}); 75 if( menuOpen && windowsize<800) table.css({"margin-top":"initial"}); 76 77 $(".searchRow").each(function(){ 78 $(this).children('td').eq(3).each(function(){ 79 $(this).html($(this).html()+' \u20AC'); 80 }); 81 }); 82}
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.