A bit more reasonable autocomplete (II)

This commit is contained in:
Marcin Kurczewski 2013-10-21 15:10:25 +02:00
parent 9f5bdc3da0
commit 83355f3789

View file

@ -192,6 +192,9 @@ function getTagItOptions()
var term = request.term.toLowerCase();
var results = $.grep(this.options.availableTags, function(a)
{
if (term.length < 3)
return a.toLowerCase().indexOf(term) == 0;
else
return a.toLowerCase().indexOf(term) != -1;
});
if (!this.options.allowDuplicates)