aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static
diff options
context:
space:
mode:
Diffstat (limited to 'app/Resources/static')
-rw-r--r--app/Resources/static/themes/_global/js/tools.js37
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 */
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});