diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-10-27 01:57:27 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-11-15 21:54:41 +0100 |
commit | af61cb80eb600618df95a01a15a08e87fc878c2a (patch) | |
tree | 3e5ba0c9935b5aace5e5c58a8d3fd84621d4b0db /app/Resources/static/themes/_global | |
parent | f9cded7dd2acab3af8ff8481941e0c199daf8270 (diff) | |
download | wallabag-af61cb80eb600618df95a01a15a08e87fc878c2a.tar.gz wallabag-af61cb80eb600618df95a01a15a08e87fc878c2a.tar.zst wallabag-af61cb80eb600618df95a01a15a08e87fc878c2a.zip |
es6 imports
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'app/Resources/static/themes/_global')
-rw-r--r-- | app/Resources/static/themes/_global/js/bookmarklet.js | 1 | ||||
-rw-r--r-- | app/Resources/static/themes/_global/js/tools.js | 52 |
2 files changed, 26 insertions, 27 deletions
diff --git a/app/Resources/static/themes/_global/js/bookmarklet.js b/app/Resources/static/themes/_global/js/bookmarklet.js index 5174ff47..a497628b 100644 --- a/app/Resources/static/themes/_global/js/bookmarklet.js +++ b/app/Resources/static/themes/_global/js/bookmarklet.js | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | top['bookmarklet-url@wallabag.org'] = | 1 | top['bookmarklet-url@wallabag.org'] = |
3 | '<!DOCTYPE html><html><head><title>bag it!</title>' + | 2 | '<!DOCTYPE html><html><head><title>bag it!</title>' + |
4 | '<link rel="icon" href="tpl/img/favicon.ico" />' + | 3 | '<link rel="icon" href="tpl/img/favicon.ico" />' + |
diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js index d6a2d803..96d9fcf6 100644 --- a/app/Resources/static/themes/_global/js/tools.js +++ b/app/Resources/static/themes/_global/js/tools.js | |||
@@ -1,5 +1,5 @@ | |||
1 | const $ = require('jquery'); | 1 | import $ from 'jquery'; |
2 | require('mousetrap'); | 2 | import Mousetrap from 'mousetrap'; |
3 | 3 | ||
4 | /* Allows inline call qr-code call */ | 4 | /* Allows inline call qr-code call */ |
5 | import jrQrcode from 'jr-qrcode'; // eslint-disable-line | 5 | import jrQrcode from 'jr-qrcode'; // eslint-disable-line |
@@ -56,45 +56,45 @@ export { savePercent, retrievePercent, initFilters, initExport }; | |||
56 | /** Shortcuts **/ | 56 | /** Shortcuts **/ |
57 | 57 | ||
58 | /* Go to */ | 58 | /* Go to */ |
59 | Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') }); | 59 | Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); }); |
60 | Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') }); | 60 | Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); }); |
61 | Mousetrap.bind('g r', function() { window.location.href = Routing.generate('archive') }); | 61 | Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); }); |
62 | Mousetrap.bind('g a', function() { window.location.href = Routing.generate('all') }); | 62 | Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); }); |
63 | Mousetrap.bind('g t', function() { window.location.href = Routing.generate('tag') }); | 63 | Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); }); |
64 | Mousetrap.bind('g c', function() { window.location.href = Routing.generate('config') }); | 64 | Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); }); |
65 | Mousetrap.bind('g i', function() { window.location.href = Routing.generate('import') }); | 65 | Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); }); |
66 | Mousetrap.bind('g d', function() { window.location.href = Routing.generate('developer') }); | 66 | Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); }); |
67 | Mousetrap.bind('g h', function() { window.location.href = Routing.generate('howto') }); | 67 | Mousetrap.bind('g h', () => { window.location.href = Routing.generate('howto'); }); |
68 | Mousetrap.bind('g l', function() { window.location.href = Routing.generate('logout') }); | 68 | Mousetrap.bind('g l', () => { window.location.href = Routing.generate('logout'); }); |
69 | 69 | ||
70 | 70 | ||
71 | /* Actions */ | 71 | /* Actions */ |
72 | Mousetrap.bind('g n', function() { | 72 | Mousetrap.bind('g n', () => { |
73 | $("#nav-btn-add").trigger("click"); | 73 | $('#nav-btn-add').trigger('click'); |
74 | }); | 74 | }); |
75 | 75 | ||
76 | Mousetrap.bind('esc', function() { | 76 | Mousetrap.bind('esc', () => { |
77 | $(".close").trigger("click"); | 77 | $('.close').trigger('click'); |
78 | }); | 78 | }); |
79 | 79 | ||
80 | // Display the first element of the current view | 80 | // Display the first element of the current view |
81 | Mousetrap.bind('right', function() { | 81 | Mousetrap.bind('right', () => { |
82 | $("ul.data li:first-child span.dot-ellipsis a")[0].click(); | 82 | $('ul.data li:first-child span.dot-ellipsis a')[0].click(); |
83 | }); | 83 | }); |
84 | 84 | ||
85 | /* Article view */ | 85 | /* Article view */ |
86 | Mousetrap.bind('o', function() { | 86 | Mousetrap.bind('o', () => { |
87 | $("ul.side-nav li:nth-child(2) a i")[0].click(); | 87 | $('ul.side-nav li:nth-child(2) a i')[0].click(); |
88 | }); | 88 | }); |
89 | 89 | ||
90 | Mousetrap.bind('s', function() { | 90 | Mousetrap.bind('s', () => { |
91 | $("ul.side-nav li:nth-child(5) a i")[0].click(); | 91 | $('ul.side-nav li:nth-child(5) a i')[0].click(); |
92 | }); | 92 | }); |
93 | 93 | ||
94 | Mousetrap.bind('a', function() { | 94 | Mousetrap.bind('a', () => { |
95 | $("ul.side-nav li:nth-child(4) a i")[0].click(); | 95 | $('ul.side-nav li:nth-child(4) a i')[0].click(); |
96 | }); | 96 | }); |
97 | 97 | ||
98 | Mousetrap.bind('del', function() { | 98 | Mousetrap.bind('del', () => { |
99 | $("ul.side-nav li:nth-child(6) a i")[0].click(); | 99 | $('ul.side-nav li:nth-child(6) a i')[0].click(); |
100 | }); | 100 | }); |