aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes/baggy/js
diff options
context:
space:
mode:
Diffstat (limited to 'app/Resources/static/themes/baggy/js')
-rwxr-xr-xapp/Resources/static/themes/baggy/js/autoCompleteTags.js8
-rw-r--r--app/Resources/static/themes/baggy/js/shortcuts/entry.js26
-rw-r--r--app/Resources/static/themes/baggy/js/shortcuts/main.js10
-rw-r--r--app/Resources/static/themes/baggy/js/uiTools.js35
4 files changed, 0 insertions, 79 deletions
diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js
deleted file mode 100755
index 64fdaa92..00000000
--- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js
+++ /dev/null
@@ -1,8 +0,0 @@
1function split(val) {
2 return val.split(/,\s*/);
3}
4function extractLast(term) {
5 return split(term).pop();
6}
7
8export default { split, extractLast };
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js
deleted file mode 100644
index c87408b9..00000000
--- a/app/Resources/static/themes/baggy/js/shortcuts/entry.js
+++ /dev/null
@@ -1,26 +0,0 @@
1import Mousetrap from 'mousetrap';
2import $ from 'jquery';
3
4$(document).ready(() => {
5 if ($('#article').length > 0) {
6 /* Article view */
7 Mousetrap.bind('o', () => {
8 $('div#article_toolbar ul.links a.original')[0].click();
9 });
10
11 /* mark as favorite */
12 Mousetrap.bind('f', () => {
13 $('div#article_toolbar ul.links a.favorite')[0].click();
14 });
15
16 /* mark as read */
17 Mousetrap.bind('a', () => {
18 $('div#article_toolbar ul.links a.markasread')[0].click();
19 });
20
21 /* delete */
22 Mousetrap.bind('del', () => {
23 $('div#article_toolbar ul.links a.delete')[0].click();
24 });
25 }
26});
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js
deleted file mode 100644
index 43ebf3be..00000000
--- a/app/Resources/static/themes/baggy/js/shortcuts/main.js
+++ /dev/null
@@ -1,10 +0,0 @@
1import $ from 'jquery';
2import Mousetrap from 'mousetrap';
3
4$(document).ready(() => {
5 Mousetrap.bind('s', () => {
6 $('#search').trigger('click');
7 $('#search_entry_term').focus();
8 return false;
9 });
10});
diff --git a/app/Resources/static/themes/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js
deleted file mode 100644
index 713c53f7..00000000
--- a/app/Resources/static/themes/baggy/js/uiTools.js
+++ /dev/null
@@ -1,35 +0,0 @@
1import $ from 'jquery';
2
3function toggleSaveLinkForm(url, event) {
4 $('#add-link-result').empty();
5
6 const $bagit = $('#bagit');
7 const $bagitForm = $('#bagit-form');
8
9 $bagit.toggleClass('active-current');
10
11 // only if bag-it link is not presented on page
12 if ($bagit.length === 0) {
13 if (event !== 'undefined' && event) {
14 $bagitForm.css({ position: 'absolute', top: event.pageY, left: event.pageX - 200 });
15 } else {
16 $bagitForm.css({ position: 'relative', top: 'auto', left: 'auto' });
17 }
18 }
19
20 const searchForm = $('#search-form');
21 const plainUrl = $('#plainurl');
22 if (searchForm.length !== 0) {
23 $('#search').removeClass('current');
24 $('#search-arrow').removeClass('arrow-down');
25 searchForm.hide();
26 }
27 $bagitForm.toggle();
28 $('#content').toggleClass('opacity03');
29 if (url !== 'undefined' && url) {
30 plainUrl.val(url);
31 }
32 plainUrl.focus();
33}
34
35export default toggleSaveLinkForm;