Qual: flush cache if field is empty
This commit is contained in:
parent
668bc945dd
commit
1a893d4d0d
@ -91,6 +91,7 @@ function ajax_autocompleter($selected='',$htmlname,$url,$option='')
|
|||||||
var cache = {};
|
var cache = {};
|
||||||
jQuery("input#search_'.$htmlname.'").autocomplete({
|
jQuery("input#search_'.$htmlname.'").autocomplete({
|
||||||
source: function( request, response ) {
|
source: function( request, response ) {
|
||||||
|
if (this.length == 0) { jQuery(this).flushCache(); }
|
||||||
if (cache.term == request.term && cache.content) {
|
if (cache.term == request.term && cache.content) {
|
||||||
response(cache.content);
|
response(cache.content);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user