mirror of
https://github.com/wekan/wekan.git
synced 2026-01-03 16:18:49 +01:00
Add keyboard shortcut for search
This commit is contained in:
parent
5e03507eba
commit
69fc2cd8f8
2 changed files with 13 additions and 0 deletions
|
|
@ -45,6 +45,14 @@ Mousetrap.bind('f', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Mousetrap.bind('/', () => {
|
||||||
|
if (Sidebar.isOpen() && Sidebar.getView() === 'search') {
|
||||||
|
Sidebar.toggle();
|
||||||
|
} else {
|
||||||
|
Sidebar.setView('search');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Mousetrap.bind(['down', 'up'], (evt, key) => {
|
Mousetrap.bind(['down', 'up'], (evt, key) => {
|
||||||
if (!Session.get('currentCard')) {
|
if (!Session.get('currentCard')) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -118,6 +126,10 @@ Template.keyboardShortcuts.helpers({
|
||||||
keys: ['f'],
|
keys: ['f'],
|
||||||
action: 'shortcut-toggle-filterbar',
|
action: 'shortcut-toggle-filterbar',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
keys: ['/'],
|
||||||
|
action: 'shortcut-toggle-searchbar',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
keys: ['x'],
|
keys: ['x'],
|
||||||
action: 'shortcut-clear-filters',
|
action: 'shortcut-clear-filters',
|
||||||
|
|
|
||||||
|
|
@ -488,6 +488,7 @@
|
||||||
"shortcut-filter-my-cards": "Filter my cards",
|
"shortcut-filter-my-cards": "Filter my cards",
|
||||||
"shortcut-show-shortcuts": "Bring up this shortcuts list",
|
"shortcut-show-shortcuts": "Bring up this shortcuts list",
|
||||||
"shortcut-toggle-filterbar": "Toggle Filter Sidebar",
|
"shortcut-toggle-filterbar": "Toggle Filter Sidebar",
|
||||||
|
"shortcut-toggle-searchbar": "Toggle Search Sidebar",
|
||||||
"shortcut-toggle-sidebar": "Toggle Board Sidebar",
|
"shortcut-toggle-sidebar": "Toggle Board Sidebar",
|
||||||
"show-cards-minimum-count": "Show cards count if list contains more than",
|
"show-cards-minimum-count": "Show cards count if list contains more than",
|
||||||
"sidebar-open": "Open Sidebar",
|
"sidebar-open": "Open Sidebar",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue