diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-22 21:31:21 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-22 21:31:21 +0100 |
commit | 0df2a4b021e581c7661968a23e5c8dd5de5273c5 (patch) | |
tree | 40d543e4cc1e17ad4289ca2224413ad88f1c249c /app/Resources/static | |
parent | 7c6b7a40d10f5868f4550a1fd95de7645de3d8fd (diff) | |
download | wallabag-0df2a4b021e581c7661968a23e5c8dd5de5273c5.tar.gz wallabag-0df2a4b021e581c7661968a23e5c8dd5de5273c5.tar.zst wallabag-0df2a4b021e581c7661968a23e5c8dd5de5273c5.zip |
Fixed entry shortcuts available in list view
Diffstat (limited to 'app/Resources/static')
-rw-r--r-- | app/Resources/static/themes/baggy/js/shortcuts/entry.js | 34 | ||||
-rw-r--r-- | app/Resources/static/themes/material/js/shortcuts/entry.js | 34 |
2 files changed, 38 insertions, 30 deletions
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js index 22aa0caf..c87408b9 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/entry.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js | |||
@@ -1,22 +1,26 @@ | |||
1 | import Mousetrap from 'mousetrap'; | 1 | import Mousetrap from 'mousetrap'; |
2 | import $ from 'jquery'; | 2 | import $ from 'jquery'; |
3 | 3 | ||
4 | /* Article view */ | 4 | $(document).ready(() => { |
5 | Mousetrap.bind('o', () => { | 5 | if ($('#article').length > 0) { |
6 | $('div#article_toolbar ul.links a.original')[0].click(); | 6 | /* Article view */ |
7 | }); | 7 | Mousetrap.bind('o', () => { |
8 | $('div#article_toolbar ul.links a.original')[0].click(); | ||
9 | }); | ||
8 | 10 | ||
9 | /* mark as favorite */ | 11 | /* mark as favorite */ |
10 | Mousetrap.bind('f', () => { | 12 | Mousetrap.bind('f', () => { |
11 | $('div#article_toolbar ul.links a.favorite')[0].click(); | 13 | $('div#article_toolbar ul.links a.favorite')[0].click(); |
12 | }); | 14 | }); |
13 | 15 | ||
14 | /* mark as read */ | 16 | /* mark as read */ |
15 | Mousetrap.bind('a', () => { | 17 | Mousetrap.bind('a', () => { |
16 | $('div#article_toolbar ul.links a.markasread')[0].click(); | 18 | $('div#article_toolbar ul.links a.markasread')[0].click(); |
17 | }); | 19 | }); |
18 | 20 | ||
19 | /* delete */ | 21 | /* delete */ |
20 | Mousetrap.bind('del', () => { | 22 | Mousetrap.bind('del', () => { |
21 | $('div#article_toolbar ul.links a.delete')[0].click(); | 23 | $('div#article_toolbar ul.links a.delete')[0].click(); |
24 | }); | ||
25 | } | ||
22 | }); | 26 | }); |
diff --git a/app/Resources/static/themes/material/js/shortcuts/entry.js b/app/Resources/static/themes/material/js/shortcuts/entry.js index 2dcc93d7..e19800bd 100644 --- a/app/Resources/static/themes/material/js/shortcuts/entry.js +++ b/app/Resources/static/themes/material/js/shortcuts/entry.js | |||
@@ -1,22 +1,26 @@ | |||
1 | import Mousetrap from 'mousetrap'; | 1 | import Mousetrap from 'mousetrap'; |
2 | import $ from 'jquery'; | 2 | import $ from 'jquery'; |
3 | 3 | ||
4 | /* open original article */ | 4 | $(document).ready(() => { |
5 | Mousetrap.bind('o', () => { | 5 | if ($('#article').length > 0) { |
6 | $('ul.side-nav a.original i')[0].click(); | 6 | /* open original article */ |
7 | }); | 7 | Mousetrap.bind('o', () => { |
8 | $('ul.side-nav a.original i')[0].click(); | ||
9 | }); | ||
8 | 10 | ||
9 | /* mark as favorite */ | 11 | /* mark as favorite */ |
10 | Mousetrap.bind('f', () => { | 12 | Mousetrap.bind('f', () => { |
11 | $('ul.side-nav a.favorite i')[0].click(); | 13 | $('ul.side-nav a.favorite i')[0].click(); |
12 | }); | 14 | }); |
13 | 15 | ||
14 | /* mark as read */ | 16 | /* mark as read */ |
15 | Mousetrap.bind('a', () => { | 17 | Mousetrap.bind('a', () => { |
16 | $('ul.side-nav a.markasread i')[0].click(); | 18 | $('ul.side-nav a.markasread i')[0].click(); |
17 | }); | 19 | }); |
18 | 20 | ||
19 | /* delete */ | 21 | /* delete */ |
20 | Mousetrap.bind('del', () => { | 22 | Mousetrap.bind('del', () => { |
21 | $('ul.side-nav a.delete i')[0].click(); | 23 | $('ul.side-nav a.delete i')[0].click(); |
24 | }); | ||
25 | } | ||
22 | }); | 26 | }); |