From 16ef7607f43ebc3e0134360b7657af191e14fe12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 2 Nov 2016 16:44:20 +0100 Subject: Reorganized JS folders for shortcuts --- app/Resources/static/themes/_global/js/shortcuts/entry.js | 0 app/Resources/static/themes/_global/js/shortcuts/main.js | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 app/Resources/static/themes/_global/js/shortcuts/entry.js create mode 100644 app/Resources/static/themes/_global/js/shortcuts/main.js (limited to 'app/Resources/static/themes/_global/js/shortcuts') diff --git a/app/Resources/static/themes/_global/js/shortcuts/entry.js b/app/Resources/static/themes/_global/js/shortcuts/entry.js new file mode 100644 index 00000000..e69de29b diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js new file mode 100644 index 00000000..0bb962d0 --- /dev/null +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js @@ -0,0 +1,13 @@ +/** Shortcuts **/ + +/* Go to */ +Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); }); +Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); }); +Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); }); +Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); }); +Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); }); +Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); }); +Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); }); +Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); }); +Mousetrap.bind('?', () => { window.location.href = Routing.generate('howto'); }); +Mousetrap.bind('g l', () => { window.location.href = Routing.generate('logout'); }); -- cgit v1.2.3