aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes
diff options
context:
space:
mode:
Diffstat (limited to 'app/Resources/static/themes')
-rw-r--r--app/Resources/static/themes/_global/js/bookmarklet.js1
-rw-r--r--app/Resources/static/themes/_global/js/tools.js52
-rwxr-xr-xapp/Resources/static/themes/baggy/js/autoCompleteTags.js2
-rwxr-xr-xapp/Resources/static/themes/baggy/js/init.js18
-rw-r--r--app/Resources/static/themes/baggy/js/uiTools.js4
-rwxr-xr-xapp/Resources/static/themes/material/js/init.js6
6 files changed, 44 insertions, 39 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});
diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js
index f287ebfa..64fdaa92 100755
--- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js
+++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js
@@ -5,4 +5,4 @@ function extractLast(term) {
5 return split(term).pop(); 5 return split(term).pop();
6} 6}
7 7
8export { split, extractLast }; 8export default { split, extractLast };
diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js
index dc11043a..b7347f7c 100755
--- a/app/Resources/static/themes/baggy/js/init.js
+++ b/app/Resources/static/themes/baggy/js/init.js
@@ -1,11 +1,17 @@
1import { savePercent, retrievePercent } from '../../_global/js/tools'; 1import $ from 'jquery';
2import { toggleSaveLinkForm } from './uiTools'; 2
3/* eslint-disable no-unused-vars */
4/* jquery has default scope */
5import cookie from 'jquery.cookie';
6import ui from 'jquery-ui-browserify';
7/* eslint-enable no-unused-vars */
3 8
4const $ = global.jquery = require('jquery'); 9import annotator from 'annotator';
5require('jquery.cookie'); 10
6require('jquery-ui-browserify'); 11import { savePercent, retrievePercent } from '../../_global/js/tools';
7const annotator = require('annotator'); 12import toggleSaveLinkForm from './uiTools';
8 13
14global.jquery = $;
9 15
10$.fn.ready(() => { 16$.fn.ready(() => {
11 const $listmode = $('#listmode'); 17 const $listmode = $('#listmode');
diff --git a/app/Resources/static/themes/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js
index 900b2707..713c53f7 100644
--- a/app/Resources/static/themes/baggy/js/uiTools.js
+++ b/app/Resources/static/themes/baggy/js/uiTools.js
@@ -1,4 +1,4 @@
1const $ = require('jquery'); 1import $ from 'jquery';
2 2
3function toggleSaveLinkForm(url, event) { 3function toggleSaveLinkForm(url, event) {
4 $('#add-link-result').empty(); 4 $('#add-link-result').empty();
@@ -32,4 +32,4 @@ function toggleSaveLinkForm(url, event) {
32 plainUrl.focus(); 32 plainUrl.focus();
33} 33}
34 34
35export { toggleSaveLinkForm }; 35export default toggleSaveLinkForm;
diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js
index a68269e0..d8edeed1 100755
--- a/app/Resources/static/themes/material/js/init.js
+++ b/app/Resources/static/themes/material/js/init.js
@@ -1,10 +1,10 @@
1import $ from 'jquery';
2import annotator from 'annotator';
1import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools'; 3import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools';
2 4
3const $ = require('jquery'); 5require('materialize'); // eslint-disable-line
4 6
5global.jQuery = $; 7global.jQuery = $;
6require('materialize'); // eslint-disable-line
7const annotator = require('annotator');
8 8
9$(document).ready(() => { 9$(document).ready(() => {
10 // sideNav 10 // sideNav