aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-10-24 20:37:49 +0200
committerThomas Citharel <tcit@tcit.fr>2016-11-15 21:54:34 +0100
commitf9cded7dd2acab3af8ff8481941e0c199daf8270 (patch)
tree4103cf4c79f81decb82ceac5753481a8ca22ed08 /app
parent49c5d0ad6ef5ceafdc0bec4533afcd27a01bd75f (diff)
downloadwallabag-f9cded7dd2acab3af8ff8481941e0c199daf8270.tar.gz
wallabag-f9cded7dd2acab3af8ff8481941e0c199daf8270.tar.zst
wallabag-f9cded7dd2acab3af8ff8481941e0c199daf8270.zip
Added new shortcuts
Diffstat (limited to 'app')
-rw-r--r--app/Resources/static/themes/_global/js/tools.js37
-rw-r--r--app/config/config.yml1
2 files changed, 36 insertions, 2 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 */
59Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') }); 59Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') });
60Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') }); 60Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') });
61Mousetrap.bind('g r', function() { window.location.href = Routing.generate('archive') });
62Mousetrap.bind('g a', function() { window.location.href = Routing.generate('all') });
63Mousetrap.bind('g t', function() { window.location.href = Routing.generate('tag') });
64Mousetrap.bind('g c', function() { window.location.href = Routing.generate('config') });
65Mousetrap.bind('g i', function() { window.location.href = Routing.generate('import') });
66Mousetrap.bind('g d', function() { window.location.href = Routing.generate('developer') });
67Mousetrap.bind('g h', function() { window.location.href = Routing.generate('howto') });
68Mousetrap.bind('g l', function() { window.location.href = Routing.generate('logout') });
69
61 70
62/* Actions */ 71/* Actions */
63Mousetrap.bind('g a', function() { 72Mousetrap.bind('g n', function() {
64 $("#nav-btn-add").trigger("click"); 73 $("#nav-btn-add").trigger("click");
65}); 74});
75
76Mousetrap.bind('esc', function() {
77 $(".close").trigger("click");
78});
79
80// Display the first element of the current view
81Mousetrap.bind('right', function() {
82 $("ul.data li:first-child span.dot-ellipsis a")[0].click();
83});
84
85/* Article view */
86Mousetrap.bind('o', function() {
87 $("ul.side-nav li:nth-child(2) a i")[0].click();
88});
89
90Mousetrap.bind('s', function() {
91 $("ul.side-nav li:nth-child(5) a i")[0].click();
92});
93
94Mousetrap.bind('a', function() {
95 $("ul.side-nav li:nth-child(4) a i")[0].click();
96});
97
98Mousetrap.bind('del', function() {
99 $("ul.side-nav li:nth-child(6) a i")[0].click();
100});
diff --git a/app/config/config.yml b/app/config/config.yml
index 3cde2377..e0e1ad97 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -363,5 +363,4 @@ fos_js_routing:
363 - import 363 - import
364 - developer 364 - developer
365 - howto 365 - howto
366 - about
367 - logout 366 - logout