1var newurl = ""; 2var nbFiltres = 0; 3var strNbfiltres = "filtre"; 4 5$(document).ready(function(){ 6 var url = window.location.origin + window.location.pathname; 7 var url = url + "?amcall=0"; 8 var currenturl = window.location.href; 9 currenturl = currenturl.replace(/\&/g, '?'); 10 11 $('#filters').addClass('multifilters'); 12 13 $('#filters ul').before('<p><strong>Sélectionnez les filtres qui vous intéressent :</strong> <span class="nbfiltres">' + nbFiltres + ' ' + strNbfiltres + '</span></p>'); 14 15 16 function filtres() { 17 $(".nbfiltres").empty(); 18 if (nbFiltres > 1) { 19 strNbfiltres = "filtres"; 20 } else { 21 strNbfiltres = "filtre"; 22 } 23 $(".nbfiltres").html(nbFiltres + ' ' + strNbfiltres); 24 } 25 26 $('#filters li a').each(function() { 27 if (currenturl.indexOf($(this).attr('href')) > -1) { 28 $(this).addClass("sel"); 29 newurl = newurl + $(this).attr('href'); 30 nbFiltres++; 31 filtres(); 32 } 33 }); 34 35 36 $('#filters li a').click(function(e) { 37 e.preventDefault(); 38 var filterurl = $(this).attr('href'); 39 if (newurl.indexOf(filterurl) > -1) { 40 newurl = newurl.replace(filterurl, ""); 41 $(this).removeClass("sel"); 42 nbFiltres--; 43 filtres(); 44 } else { 45 newurl = newurl + filterurl; 46 $(this).addClass("sel"); 47 nbFiltres++; 48 filtres(); 49 } 50 }); 51 52 53 $('#submitbtn').click(function(e) { 54 if(newurl == "") { 55 url = url.replace('?amcall=0', ''); 56 } 57 var finalurl = url + newurl; 58 finalurl = finalurl.replace(/\?/g, '&'); 59 finalurl = finalurl.replace('&', '?'); 60 $('#submitbtn').attr('href', finalurl); 61 }); 62 63 64 65 $('#reinitbtn').click(function(e) { 66 e.preventDefault(); 67 newurl = ""; 68 $("#filters li a").removeClass("sel"); 69 }); 70 71 72 73 $('#pagination ul a').click(function(e) { 74 var paginurl = $(this).attr('href'); 75 if(newurl == "") { 76 url = url.replace('?amcall=0', ''); 77 } 78 var finalurl = url + newurl + paginurl; 79 finalurl = finalurl.replace(/\?/g, '&'); 80 finalurl = finalurl.replace('&', '?'); 81 $(this).attr('href', finalurl); 82 }); 83 84 85 86 $('#affichPlus').click(function(e) { 87 e.preventDefault(); 88 $("#filters ul li.btnfilter").toggleClass("hidden"); 89 var text = $(this).text(); 90 if (text == "Voir plus") { 91 $(this).html('Voir moins'); 92 } else { 93 $(this).html('Voir plus'); 94 } 95 }); 96});
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.