1jQuery(document).ready(function($) { 2 $(document).on("select2:open", () => { 3 if ( $(".select2-search__field").length > 0 ) { 4 document.querySelector('.select2-search__field').focus(); 5 } 6 }); 7 8 // Select2 9 10 $("select:not(#select-equipe):not(#select-theme):not(#select-observatoire)").select2({ 11 language: "fr", 12 width: "100%", 13 placeholder: "Sélectionnez une option", 14 allowClear: true 15 }); 16 17 // Ãquipes 18 19 $("select#select-equipe").select2({ 20 allowClear: true, 21 language: "fr", 22 width: "100%", 23 ajax: { 24 url: '/ajax/equipe.php', 25 dataType: 'json', 26 data: function(params) { 27 return { 28 q: params.term, 29 page: params.page, 30 }; 31 }, 32 } 33 }); 34 35 // Thèmes 36 37 $("select#select-theme").select2({ 38 allowClear: true, 39 language: "fr", 40 width: "100%", 41 ajax: { 42 url: '/ajax/theme.php', 43 dataType: 'json', 44 data: function(params) { 45 return { 46 q: params.term, 47 page: params.page, 48 }; 49 }, 50 } 51 }); 52 53 // Observatoires 54 55 $("select#select-observatoire").select2({ 56 allowClear: true, 57 language: "fr", 58 width: "100%", 59 ajax: { 60 url: '/ajax/observatoire.php', 61 dataType: 'json', 62 data: function(params) { 63 return { 64 q: params.term, 65 page: params.page, 66 }; 67 }, 68 } 69 }); 70});
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.