Set focus to navbar search on initial login or when changing to home (closes #24)

This commit is contained in:
Oliver Gorwits
2012-08-27 20:50:45 +01:00
parent f41a5a58ce
commit 52468b0ac0
4 changed files with 12 additions and 9 deletions

View File

@@ -121,6 +121,15 @@ if (window.History && window.History.enabled) {
}
$(document).ready(function() {
// activate 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);
});
}
});
// activate tooltips
$("[rel=tooltip]").tooltip({live: true});