autocomplete, continued

This commit is contained in:
Rolux 2010-02-18 20:43:23 +05:30
parent 27cc14db36
commit ab6468cae1

View File

@ -1574,8 +1574,9 @@ requires
});
}
function autocomplete(items) {
var selected = -1;
var selected;
if (items.length) {
selected = items.length == 1 ? 0 : -1;
items = $.map(items, function(title, position) {
if (that.val().toLowerCase() == title.toLowerCase()) {
selected = position;