add Ctrl+F shortcut for the search bar

This commit is contained in:
Hendrik Leppelsack 2015-09-21 11:01:19 +02:00
parent 2479363492
commit 089cd56e00
1 changed files with 7 additions and 0 deletions

View File

@ -343,6 +343,13 @@
}
});
$(document).keydown(function(event) {
if ((event.ctrlKey || event.metaKey) && !event.shiftKey && event.keyCode === 70) { // Ctrl+F
$searchBox.focus();
event.preventDefault();
}
});
$searchResults.on('click', 'tr.result', function (event) {
var $row = $(this);
var item = $row.data('result');