[bitbake-devel] [PATCH 13/22] bitbake: toastergui: libtoaster Make sure we always pass format=json

Ed Bartosh ed.bartosh at linux.intel.com
Fri Jul 31 12:09:14 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

The new API for typeahead requires that we pass this parameter in to make
sure we get a JSON response.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 lib/toaster/toastergui/static/js/libtoaster.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/toaster/toastergui/static/js/libtoaster.js b/lib/toaster/toastergui/static/js/libtoaster.js
index 079bbcb..115df80 100644
--- a/lib/toaster/toastergui/static/js/libtoaster.js
+++ b/lib/toaster/toastergui/static/js/libtoaster.js
@@ -19,6 +19,7 @@ var libtoaster = (function (){
     jQElement.typeahead({
         source: function(query, process){
           xhrParams.search = query;
+          xhrParams.format = "json";
           $.getJSON(xhrUrl, this.options.xhrParams, function(data){
             if (data.error !== "ok") {
               console.log("Error getting data from server "+data.error);
-- 
2.1.4




More information about the bitbake-devel mailing list