summaryrefslogtreecommitdiffstats
path: root/client/lib/keyboard.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:52:09 -0500
committerJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:56:51 -0500
commit3eb4d2c341b712268bd321173909e0a7b19a88c9 (patch)
tree25a8fcb088f3984e72a5bd3ded9e6a45376e0693 /client/lib/keyboard.js
parenta0a482aa8efb3255a523de4524c8e09453d5571f (diff)
downloadwekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip
Prettier & eslint project style update
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',
+ },
+ ],
});