summaryrefslogtreecommitdiffstats
path: root/client/lib/keyboard.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
committerLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
commitb84dc20ded0375d9ab14ec05c78b737398d76b83 (patch)
treec3b91b3657299c779e941a1257df17bb0eade866 /client/lib/keyboard.js
parent100288b3e1bce882ab9923a5bff7b5f620f33ee8 (diff)
parent3eb4d2c341b712268bd321173909e0a7b19a88c9 (diff)
downloadwekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.gz
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.bz2
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.zip
Merge branch 'linting' of https://github.com/justinr1234/wekan into justinr1234-linting
Diffstat (limited to 'client/lib/keyboard.js')
-rwxr-xr-xclient/lib/keyboard.js67
1 files changed, 39 insertions, 28 deletions
diff --git a/client/lib/keyboard.js b/client/lib/keyboard.js
index 7abfa88d..d3f974be 100755
--- a/client/lib/keyboard.js
+++ b/client/lib/keyboard.js
@@ -40,8 +40,10 @@ Mousetrap.bind(['down', 'up'], (evt, key) => {
return;
}
- const nextFunc = (key === 'down' ? 'next' : 'prev');
- const nextCard = $('.js-minicard.is-selected')[nextFunc]('.js-minicard').get(0);
+ const nextFunc = key === 'down' ? 'next' : 'prev';
+ const nextCard = $('.js-minicard.is-selected')
+ [nextFunc]('.js-minicard')
+ .get(0);
if (nextCard) {
const nextCardId = Blaze.getData(nextCard)._id;
Utils.goCardId(nextCardId);
@@ -49,7 +51,7 @@ Mousetrap.bind(['down', 'up'], (evt, key) => {
});
// XXX This shortcut should also work when hovering over a card in board view
-Mousetrap.bind('space', (evt) => {
+Mousetrap.bind('space', evt => {
if (!Session.get('currentCard')) {
return;
}
@@ -69,29 +71,38 @@ Mousetrap.bind('space', (evt) => {
});
Template.keyboardShortcuts.helpers({
- mapping: [{
- keys: ['W'],
- action: 'shortcut-toggle-sidebar',
- }, {
- keys: ['Q'],
- action: 'shortcut-filter-my-cards',
- }, {
- keys: ['F'],
- action: 'shortcut-toggle-filterbar',
- }, {
- keys: ['X'],
- action: 'shortcut-clear-filters',
- }, {
- keys: ['?'],
- action: 'shortcut-show-shortcuts',
- }, {
- keys: ['ESC'],
- action: 'shortcut-close-dialog',
- }, {
- keys: ['@'],
- action: 'shortcut-autocomplete-members',
- }, {
- keys: ['SPACE'],
- action: 'shortcut-assign-self',
- }],
+ mapping: [
+ {
+ keys: ['W'],
+ action: 'shortcut-toggle-sidebar',
+ },
+ {
+ keys: ['Q'],
+ action: 'shortcut-filter-my-cards',
+ },
+ {
+ keys: ['F'],
+ action: 'shortcut-toggle-filterbar',
+ },
+ {
+ keys: ['X'],
+ action: 'shortcut-clear-filters',
+ },
+ {
+ keys: ['?'],
+ action: 'shortcut-show-shortcuts',
+ },
+ {
+ keys: ['ESC'],
+ action: 'shortcut-close-dialog',
+ },
+ {
+ keys: ['@'],
+ action: 'shortcut-autocomplete-members',
+ },
+ {
+ keys: ['SPACE'],
+ action: 'shortcut-assign-self',
+ },
+ ],
});