diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-24 20:37:49 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-11-15 21:54:34 +0100 |
commit | f9cded7dd2acab3af8ff8481941e0c199daf8270 (patch) | |
tree | 4103cf4c79f81decb82ceac5753481a8ca22ed08 /app/Resources | |
parent | 49c5d0ad6ef5ceafdc0bec4533afcd27a01bd75f (diff) | |
download | wallabag-f9cded7dd2acab3af8ff8481941e0c199daf8270.tar.gz wallabag-f9cded7dd2acab3af8ff8481941e0c199daf8270.tar.zst wallabag-f9cded7dd2acab3af8ff8481941e0c199daf8270.zip |
Added new shortcuts
Diffstat (limited to 'app/Resources')
-rw-r--r-- | app/Resources/static/themes/_global/js/tools.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js index 9a98f0a6..d6a2d803 100644 --- a/app/Resources/static/themes/_global/js/tools.js +++ b/app/Resources/static/themes/_global/js/tools.js | |||
@@ -58,8 +58,43 @@ export { savePercent, retrievePercent, initFilters, initExport }; | |||
58 | /* Go to */ | 58 | /* Go to */ |
59 | Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') }); | 59 | Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') }); |
60 | Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') }); | 60 | Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') }); |
61 | Mousetrap.bind('g r', function() { window.location.href = Routing.generate('archive') }); | ||
62 | Mousetrap.bind('g a', function() { window.location.href = Routing.generate('all') }); | ||
63 | Mousetrap.bind('g t', function() { window.location.href = Routing.generate('tag') }); | ||
64 | Mousetrap.bind('g c', function() { window.location.href = Routing.generate('config') }); | ||
65 | Mousetrap.bind('g i', function() { window.location.href = Routing.generate('import') }); | ||
66 | Mousetrap.bind('g d', function() { window.location.href = Routing.generate('developer') }); | ||
67 | Mousetrap.bind('g h', function() { window.location.href = Routing.generate('howto') }); | ||
68 | Mousetrap.bind('g l', function() { window.location.href = Routing.generate('logout') }); | ||
69 | |||
61 | 70 | ||
62 | /* Actions */ | 71 | /* Actions */ |
63 | Mousetrap.bind('g a', function() { | 72 | Mousetrap.bind('g n', function() { |
64 | $("#nav-btn-add").trigger("click"); | 73 | $("#nav-btn-add").trigger("click"); |
65 | }); | 74 | }); |
75 | |||
76 | Mousetrap.bind('esc', function() { | ||
77 | $(".close").trigger("click"); | ||
78 | }); | ||
79 | |||
80 | // Display the first element of the current view | ||
81 | Mousetrap.bind('right', function() { | ||
82 | $("ul.data li:first-child span.dot-ellipsis a")[0].click(); | ||
83 | }); | ||
84 | |||
85 | /* Article view */ | ||
86 | Mousetrap.bind('o', function() { | ||
87 | $("ul.side-nav li:nth-child(2) a i")[0].click(); | ||
88 | }); | ||
89 | |||
90 | Mousetrap.bind('s', function() { | ||
91 | $("ul.side-nav li:nth-child(5) a i")[0].click(); | ||
92 | }); | ||
93 | |||
94 | Mousetrap.bind('a', function() { | ||
95 | $("ul.side-nav li:nth-child(4) a i")[0].click(); | ||
96 | }); | ||
97 | |||
98 | Mousetrap.bind('del', function() { | ||
99 | $("ul.side-nav li:nth-child(6) a i")[0].click(); | ||
100 | }); | ||