1 2 3$(function(){ 4 onresize = (event) => { 5 changerPlaceholderMobile('antidote-11'); 6 }; 7 changerPlaceholderMobile('antidote-11'); 8 9 if (!$('body').hasClass('assistance')) { 10 if (donneParam('q')) { 11 $('body').addClass('champ-recherche-actif'); 12 } 13 14 $('.icone-loupe:not(.colonne-recherche)').click(function() { 15 activerRechercheBarreMenu(); 16 $('.search-input:not(.colonne-recherche)').val('').focus(); 17 }); 18 } 19 20 $('.search-input:not(.colonne-recherche)').on('keyup',activerRechercheBarreMenu); 21 22 $('.icone-annule:not(.colonne-recherche)').click(desactiverRechercheBarreMenu); 23 24 $('main aside input.colonne-recherche').click(activerRechercheColonne); 25 26 $('main aside input.colonne-recherche').on('keydown', activerRechercheColonne); 27 28 $('.icone-annule.colonne-recherche').click(desactiverRechercheColonne); 29}); 30 31// champ de recherche barre-menu 32function activerRechercheBarreMenu() { 33 var boiteRecherche = $('.boite-recherche:not(.colonne-recherche)'); 34 var barreMenu = $('#barre-menu'); 35 boiteRecherche.addClass('actif'); 36 boiteRecherche.parents('.secondaire').first().addClass('recherche-active'); 37 boiteRecherche.find('#barre-menu input:not(.colonne-recherche)').focus(); 38 barreMenu.addClass('bloc-recherche-visible'); 39 $('body').addClass('champ-recherche-actif'); 40 if ($('main aside .boite-recherche.colonne-recherche').hasClass('actif')) { 41 $('.search-input:not(.colonne-recherche)').val(''); 42 $('.icone-annule.colonne-recherche').trigger('click'); 43 } 44} 45 46function desactiverRechercheBarreMenu() { 47 var boiteRecherche = $(this).closest('.boite-recherche:not(.colonne-recherche)'); 48 var barreMenu = $('#barre-menu'); 49 document.getElementById('meilisearch-search-box').value = ""; 50 if (search !== undefined) 51 search.helper.setQuery('').search(); 52 boiteRecherche.removeClass('actif'); 53 boiteRecherche.parents('.secondaire').first().removeClass('recherche-active'); 54 barreMenu.removeClass('bloc-recherche-visible'); 55 $('body').removeClass('champ-recherche-actif'); 56 if (typeof updateRechercheEstActive !== "undefined") { 57 updateRechercheEstActive(); 58 } 59} 60 61// champ de recherche colonne (aside) 62function activerRechercheColonne() { 63 if (!($('.boite-recherche.colonne-recherche').length)) 64 return; 65 66 var boiteRecherche = $('.boite-recherche.colonne-recherche'); 67 boiteRecherche.addClass('actif'); 68 $(this).focus(); 69 $('aside > section.arborescence').hide('fast'); 70 if ($('body').hasClass('champ-recherche-actif recherche-active')) { 71 $('.icone-annule:not(.colonne-recherche)').trigger('click'); 72 } 73 $('aside *').css('transition','none'); 74} 75 76function desactiverRechercheColonne() { 77 if (!($('.boite-recherche.colonne-recherche').length)) 78 return; 79 80 $('aside > section.arborescence').removeClass('invisible'); 81 var boiteRecherche = $(this).closest('.boite-recherche.colonne-recherche'); 82 document.querySelector('input.colonne-recherche').value = ""; 83 if (search !== undefined) 84 search.helper.setQuery('').search(); 85 boiteRecherche.removeClass('actif'); 86 $('.bloc-documentation').find('section, nav').removeClass('invisible'); 87 $('aside > section.arborescence').show('fast'); 88} 89 90// Changer le placeholder pour les champs de recherche en mobile 91function changerPlaceholderMobile(parent) { 92 let $champRecherche = $("div[id=barre-menu] .boite-recherche input"); 93 let $nestPasColonneRecherche = $("body.documentation." + parent + " .search-input:not(.colonne-recherche)").length 94 95 if (($(this).width() <= 500) && $nestPasColonneRecherche && !$champRecherche.hasClass("ph-mobile")) { 96 $champRecherche.attr('placeholder', $champRecherche.data("placeholder-mobile")).addClass("ph-mobile"); 97 } else if (($(this).width() > 500) && $nestPasColonneRecherche && $champRecherche.hasClass("ph-mobile")) { 98 $champRecherche.attr('placeholder', $champRecherche.data("placeholder-desktop")).removeClass("ph-mobile"); 99 } 100}
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.