diff options
Diffstat (limited to 'lib/toaster/toastergui/static/js/libtoaster.js')
-rw-r--r-- | lib/toaster/toastergui/static/js/libtoaster.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/static/js/libtoaster.js b/lib/toaster/toastergui/static/js/libtoaster.js index 8d1d20f13..43930a2c3 100644 --- a/lib/toaster/toastergui/static/js/libtoaster.js +++ b/lib/toaster/toastergui/static/js/libtoaster.js @@ -21,6 +21,9 @@ var libtoaster = (function (){ var xhrReq; jQElement.typeahead({ + // each time the typeahead's choices change, a + // "typeahead-choices-change" event is fired with an object + // containing the available choices in a "choices" property source: function(query, process){ xhrParams.search = query; @@ -36,6 +39,8 @@ var libtoaster = (function (){ xhrReq = null; + jQElement.trigger("typeahead-choices-change", {choices: data.results}); + return process(data.results); }); }, |