summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/libtoaster.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/libtoaster.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
index 7edd0190f3..c9ff6507ef 100644
--- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
+++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
@@ -19,14 +19,13 @@ var libtoaster = (function (){
19 jQElement.typeahead({ 19 jQElement.typeahead({
20 source: function(query, process){ 20 source: function(query, process){
21 xhrParams.search = query; 21 xhrParams.search = query;
22 xhrParams.format = "json";
23 $.getJSON(xhrUrl, this.options.xhrParams, function(data){ 22 $.getJSON(xhrUrl, this.options.xhrParams, function(data){
24 if (data.error !== "ok") { 23 if (data.error !== "ok") {
25 console.log("Error getting data from server "+data.error); 24 console.log("Error getting data from server "+data.error);
26 return; 25 return;
27 } 26 }
28 27
29 return process (data.rows); 28 return process(data.results);
30 }); 29 });
31 }, 30 },
32 updater: function(item) { 31 updater: function(item) {
@@ -40,7 +39,7 @@ var libtoaster = (function (){
40 return 0; 39 return 0;
41 } 40 }
42 41
43 return ~item.name.toLowerCase().indexOf(this.query.toLowerCase()); 42 return 1;
44 }, 43 },
45 highlighter: function (item) { 44 highlighter: function (item) {
46 if (item.hasOwnProperty('detail')) 45 if (item.hasOwnProperty('detail'))