mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 13:24:30 -04:00
Refined search hot key
This commit is contained in:
parent
1529b59235
commit
dd9805e5b4
@ -260,8 +260,9 @@
|
|||||||
|
|
||||||
function showSearch() {
|
function showSearch() {
|
||||||
$('#search').typeahead('setQuery', '');
|
$('#search').typeahead('setQuery', '');
|
||||||
$('#search-form').show();
|
|
||||||
$('#navbar-options').hide();
|
$('#navbar-options').hide();
|
||||||
|
$('#search-form').show();
|
||||||
|
|
||||||
if (window.hasOwnProperty('searchData')) {
|
if (window.hasOwnProperty('searchData')) {
|
||||||
$('#search').focus();
|
$('#search').focus();
|
||||||
} else {
|
} else {
|
||||||
@ -299,7 +300,7 @@
|
|||||||
$(".alert-hide").fadeOut();
|
$(".alert-hide").fadeOut();
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
$('#search').blur(function(){
|
$('#search').blur(function(event){
|
||||||
hideSearch();
|
hideSearch();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -354,6 +355,7 @@
|
|||||||
// Focus the search input if the user clicks forward slash
|
// Focus the search input if the user clicks forward slash
|
||||||
$('body').keypress(function(event) {
|
$('body').keypress(function(event) {
|
||||||
if (event.which == 47) {
|
if (event.which == 47) {
|
||||||
|
event.preventDefault();
|
||||||
showSearch();
|
showSearch();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user