diff options
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 | }); | ||