1$( document ).ready( function () { 2 // 21/03/2020 by punglas Migration vers Jquery-UI 1.12 _autocomplete depreciated 3 4 var source = sites_rivieres; 5 6 $( '.site-cherche' ).click( function ( e ) { 7 var target = e.target, 8 source_text = $( target ).data( 'source' ); 9 10 if ( source_text == 'rivieres' ) { 11 source = sites_rivieres; 12 } 13 else if ( source_text == 'spots' ) { 14 source = sites_spots; 15 } 16 else if ( source_text == 'bassins' ) { 17 source = sites_bassins; 18 } 19 $( '#recherche-rapide-box-'+source_text+' .site-cherche' ).autocomplete( { 20 minLength: 0, 21 source: source, 22 focus: function ( event, ui ) { 23 $( this ).val( ui.item.label ); 24 console.log( ui ); 25 return false; 26 }, 27 select: function ( event, ui ) { 28 var id_site = ui.item.id; 29 var slug = ui.item.slug; 30 //console.debug('ID site = ', id_site, ', slug = "', slug, '".'); 31 //var url_site = 'http://www.eauxvives.org/rivieres/voir/' + slug; 32 var url_site = 'voir/' + slug; 33 window.open( url_site ); 34 //window.location.assign(url_site); 35 return false; 36 } 37 } ) 38 .data( 'ui-autocomplete' )._renderItem = function ( ul, item ) { 39 return $( '<li></li>' ).data( 'ui-autocomplete-item', item ) 40 .append( '<a>' + item.label + '<br><span class="recherche-site-details">' + item.details + '</span></a>' ) 41 .appendTo( ul ); 42 }; 43 44 } ); 45 46} ) 47 48//$('#site-cherche').focus(); 49 50 51/* $('#site-cherche').autocomplete({ 52 minLength: 0, 53 source: sites, 54 focus: function(event, ui) { 55 $('#site-cherche').val(ui.item.label); 56 return false; 57 }, 58 select: function(event, ui) { 59 var id_site = ui.item.id; 60 var slug = ui.item.slug; 61 //console.debug('ID site = ', id_site, ', slug = "', slug, '".'); 62 //var url_site = 'http://www.eauxvives.org/rivieres/voir/' + slug; 63 var url_site = 'voir/' + slug; 64 window.open(url_site); 65 //window.location.assign(url_site); 66 return false; 67 } 68 }) 69 .data('ui-autocomplete')._renderItem = function(ul, item) { 70 return $('<li></li>').data('ui-autocomplete-item', item) 71 .append('<a>' + item.label + '<br><span class="recherche-site-details">' + item.details + '</span></a>') 72 .appendTo(ul); 73 }; 74 75 $('#site-cherche').focus();*/
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.