1$(document).ready(function() { 2 getConcerts(); 3 4 $("#concerts #myInput").on("change", function(){ 5 getConcerts(); 6 }); 7 8 $("#concerts #load_more").on("click", function(){ 9 getConcerts(); 10 }); 11 12 const myInput = document.getElementById("myInput"); 13 if (myInput && typeof regions !== 'undefined') { 14 initDepartmentAutocomplete(myInput, regions, getConcerts); 15 $(myInput).closest('.autocomplete-block').find('.fa-arrow-alt-circle-up').hide(); 16 } 17}); 18 19function getConcerts(){ 20 const departementInput = $("#myInput").val(); 21 let departement = departementInput; 22 let $visible = 0; 23 24 if (departement && isNaN(parseInt(departement, 10))) { 25 const match = departement.match(/\((\d{2,3}|2[AB])\)/i); 26 if (match) { 27 departement = normalizeDepCode(match[1]); 28 } 29 } else if (departement) { 30 departement = normalizeDepCode(departement); 31 } 32 33 if ($( ".ligne_concert" ).length === 0) { 34 $("#concerts_no_result").removeClass("hidden"); 35 } else { 36 $("#concerts_no_result").addClass("hidden"); 37 38 $( ".ligne_concert" ).each(function() { 39 $(this).show(); 40 41 if (departementInput) { 42 const $ligneDepartement = normalizeDepCode($(this).find('.concert-departement, #departement').first().html()); 43 44 if (departement === $ligneDepartement) { 45 $(this).show(); 46 $visible++; 47 } else { 48 $(this).hide(); 49 } 50 } 51 }); 52 53 if (departementInput && $visible === 0) { 54 $("#concerts_no_result").removeClass("hidden"); 55 } else { 56 $("#concerts_no_result").addClass("hidden"); 57 } 58 } 59}
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.