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 From 5637a26e9af98a05c76823c85611315cd1a986e0 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 3 Nov 2016 10:02:16 +0100 Subject: Bring navigation (with right, left and enter) on material entries page. Supports going to next and previous page ! Also better indentation for js files (changed editorconfig for them). Signed-off-by: Thomas Citharel --- app/Resources/static/themes/_global/js/shortcuts/main.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/Resources/static/themes/_global/js/shortcuts') diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js index 0bb962d0..1f2c1c52 100644 --- a/app/Resources/static/themes/_global/js/shortcuts/main.js +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js @@ -1,3 +1,6 @@ +import Mousetrap from 'mousetrap'; + + /** Shortcuts **/ /* Go to */ -- cgit v1.2.3 From c930992348d81c70884791ee3edbec4a3cc1d128 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 5 Nov 2016 16:06:13 +0100 Subject: fix next/prev page --- app/Resources/static/themes/_global/js/shortcuts/main.js | 1 - 1 file changed, 1 deletion(-) (limited to 'app/Resources/static/themes/_global/js/shortcuts') diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js index 1f2c1c52..ef6a1b84 100644 --- a/app/Resources/static/themes/_global/js/shortcuts/main.js +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js @@ -1,6 +1,5 @@ import Mousetrap from 'mousetrap'; - /** Shortcuts **/ /* Go to */ -- cgit v1.2.3 From 66e9dde0dc0ba5f554231a7a968ef5b530a0563f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 23 Nov 2016 14:40:00 +0100 Subject: Fixed logout shortcut --- app/Resources/static/themes/_global/js/shortcuts/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Resources/static/themes/_global/js/shortcuts') diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js index ef6a1b84..c81bf869 100644 --- a/app/Resources/static/themes/_global/js/shortcuts/main.js +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js @@ -12,4 +12,4 @@ 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'); }); +Mousetrap.bind('g l', () => { window.location.href = Routing.generate('fos_user_security_logout'); }); -- cgit v1.2.3