aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes/_global
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-10-27 01:57:27 +0200
committerThomas Citharel <tcit@tcit.fr>2016-11-15 21:54:41 +0100
commitaf61cb80eb600618df95a01a15a08e87fc878c2a (patch)
tree3e5ba0c9935b5aace5e5c58a8d3fd84621d4b0db /app/Resources/static/themes/_global
parentf9cded7dd2acab3af8ff8481941e0c199daf8270 (diff)
downloadwallabag-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.js1
-rw-r--r--app/Resources/static/themes/_global/js/tools.js52
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
2top['bookmarklet-url@wallabag.org'] = 1top['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 @@
1const $ = require('jquery'); 1import $ from 'jquery';
2require('mousetrap'); 2import Mousetrap from 'mousetrap';
3 3
4/* Allows inline call qr-code call */ 4/* Allows inline call qr-code call */
5import jrQrcode from 'jr-qrcode'; // eslint-disable-line 5import 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 */
59Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') }); 59Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); });
60Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') }); 60Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); });
61Mousetrap.bind('g r', function() { window.location.href = Routing.generate('archive') }); 61Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); });
62Mousetrap.bind('g a', function() { window.location.href = Routing.generate('all') }); 62Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); });
63Mousetrap.bind('g t', function() { window.location.href = Routing.generate('tag') }); 63Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); });
64Mousetrap.bind('g c', function() { window.location.href = Routing.generate('config') }); 64Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); });
65Mousetrap.bind('g i', function() { window.location.href = Routing.generate('import') }); 65Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); });
66Mousetrap.bind('g d', function() { window.location.href = Routing.generate('developer') }); 66Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); });
67Mousetrap.bind('g h', function() { window.location.href = Routing.generate('howto') }); 67Mousetrap.bind('g h', () => { window.location.href = Routing.generate('howto'); });
68Mousetrap.bind('g l', function() { window.location.href = Routing.generate('logout') }); 68Mousetrap.bind('g l', () => { window.location.href = Routing.generate('logout'); });
69 69
70 70
71/* Actions */ 71/* Actions */
72Mousetrap.bind('g n', function() { 72Mousetrap.bind('g n', () => {
73 $("#nav-btn-add").trigger("click"); 73 $('#nav-btn-add').trigger('click');
74}); 74});
75 75
76Mousetrap.bind('esc', function() { 76Mousetrap.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
81Mousetrap.bind('right', function() { 81Mousetrap.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 */
86Mousetrap.bind('o', function() { 86Mousetrap.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
90Mousetrap.bind('s', function() { 90Mousetrap.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
94Mousetrap.bind('a', function() { 94Mousetrap.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
98Mousetrap.bind('del', function() { 98Mousetrap.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});