Typeahead on the main navbar search (for devices only)

This commit is contained in:
Oliver Gorwits
2012-08-27 19:54:31 +01:00
parent 4cd0c06567
commit 8ae1bb1d6d
3 changed files with 19 additions and 0 deletions

View File

@@ -8,4 +8,13 @@
[% IF params.tab %]
$('#[% params.tab %]_form').trigger("submit");
[% END %]
// enable typeahead on the main search box, for device names only
$('#nq').typeahead({
source: function (query, process) {
return $.get('/ajax/data/device/typeahead', { query: query }, function (data) {
return process(data);
});
}
});
});