diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-11-03 10:02:16 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-11-15 21:55:10 +0100 |
commit | 5637a26e9af98a05c76823c85611315cd1a986e0 (patch) | |
tree | 862469ed65589c18dca9f69914eda94ddf221cde /app/Resources/static/themes/material/js/shortcuts/entry.js | |
parent | 16ef7607f43ebc3e0134360b7657af191e14fe12 (diff) | |
download | wallabag-5637a26e9af98a05c76823c85611315cd1a986e0.tar.gz wallabag-5637a26e9af98a05c76823c85611315cd1a986e0.tar.zst wallabag-5637a26e9af98a05c76823c85611315cd1a986e0.zip |
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 <tcit@tcit.fr>
Diffstat (limited to 'app/Resources/static/themes/material/js/shortcuts/entry.js')
-rw-r--r-- | app/Resources/static/themes/material/js/shortcuts/entry.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Resources/static/themes/material/js/shortcuts/entry.js b/app/Resources/static/themes/material/js/shortcuts/entry.js index 900a8214..674253b5 100644 --- a/app/Resources/static/themes/material/js/shortcuts/entry.js +++ b/app/Resources/static/themes/material/js/shortcuts/entry.js | |||
@@ -1,19 +1,22 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | import $ from 'jquery'; | ||
3 | |||
1 | /* open original article */ | 4 | /* open original article */ |
2 | Mousetrap.bind('o', () => { | 5 | Mousetrap.bind('o', () => { |
3 | $('ul.side-nav li:nth-child(2) a i')[0].click(); | 6 | $('ul.side-nav li:nth-child(2) a i')[0].click(); |
4 | }); | 7 | }); |
5 | 8 | ||
6 | /* mark as favorite */ | 9 | /* mark as favorite */ |
7 | Mousetrap.bind('s', () => { | 10 | Mousetrap.bind('s', () => { |
8 | $('ul.side-nav li:nth-child(5) a i')[0].click(); | 11 | $('ul.side-nav li:nth-child(5) a i')[0].click(); |
9 | }); | 12 | }); |
10 | 13 | ||
11 | /* mark as read */ | 14 | /* mark as read */ |
12 | Mousetrap.bind('a', () => { | 15 | Mousetrap.bind('a', () => { |
13 | $('ul.side-nav li:nth-child(4) a i')[0].click(); | 16 | $('ul.side-nav li:nth-child(4) a i')[0].click(); |
14 | }); | 17 | }); |
15 | 18 | ||
16 | /* delete */ | 19 | /* delete */ |
17 | Mousetrap.bind('del', () => { | 20 | Mousetrap.bind('del', () => { |
18 | $('ul.side-nav li:nth-child(6) a i')[0].click(); | 21 | $('ul.side-nav li:nth-child(6) a i')[0].click(); |
19 | }); | 22 | }); |