Fix auto complete for tags and others. Adds search.

This commit is contained in:
James Cole
2018-09-23 07:39:04 +02:00
parent 254a46b54c
commit 0bd818956f
10 changed files with 331 additions and 154 deletions

View File

@@ -32,11 +32,20 @@ $(function () {
return {name: name};
});
}
},
remote: {
url: autoCompleteUri + '?search=%QUERY',
wildcard: '%QUERY',
filter: function (list) {
return $.map(list, function (name) {
return {name: name};
});
}
}
});
transactions.initialize();
var input=$("#link_other");
input.typeahead({}, {source: transactions, displayKey: 'name', autoSelect: false});
input.typeahead({hint: true, highlight: true,}, {source: transactions, displayKey: 'name', autoSelect: false});
input.change(function () {
var current = input.typeahead("getActive");