Update ajax.lib.php

Add a delay before making request, may avoid multiple request to server when typing search request
This commit is contained in:
Frédéric FRANCE 2014-10-24 10:40:48 +02:00
parent 1bbdd3798e
commit b2a9b48a78

View File

@ -173,6 +173,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
}
$("#search_'.$htmlname.'").trigger("change"); // To tell that input text field was modified
}
,delay: 1000
}).data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )