aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes/baggy/js/popupForm.js
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-09-28 10:30:18 +0200
committerThomas Citharel <tcit@tcit.fr>2016-09-28 10:30:18 +0200
commitc146f6940a176142084b4fc3c610d13aca60d90e (patch)
tree7bc4683febcf15a4fd6053bddd49e36c202adeda /app/Resources/static/themes/baggy/js/popupForm.js
parent55345331c47ca6f389e38a842584c3062476601d (diff)
downloadwallabag-c146f6940a176142084b4fc3c610d13aca60d90e.tar.gz
wallabag-c146f6940a176142084b4fc3c610d13aca60d90e.tar.zst
wallabag-c146f6940a176142084b4fc3c610d13aca60d90e.zip
Assets work
* ES6 all the things ! * ESLint checks everything * CSS fixes (use stylelint) * Fix #2231
Diffstat (limited to 'app/Resources/static/themes/baggy/js/popupForm.js')
-rw-r--r--app/Resources/static/themes/baggy/js/popupForm.js101
1 files changed, 0 insertions, 101 deletions
diff --git a/app/Resources/static/themes/baggy/js/popupForm.js b/app/Resources/static/themes/baggy/js/popupForm.js
deleted file mode 100644
index 95ba60ee..00000000
--- a/app/Resources/static/themes/baggy/js/popupForm.js
+++ /dev/null
@@ -1,101 +0,0 @@
1var $ = global.jquery = require('jquery');
2
3$(document).ready(function () {
4 $('#search-form').hide();
5 $('#bagit-form').hide();
6 $('#filter-form').hide();
7 $('#download-form').hide();
8
9 //---------------------------------------------------------------------------
10 // Toggle the 'Search' popup in the sidebar
11 //---------------------------------------------------------------------------
12 function toggleSearch() {
13 $('#search-form').toggle();
14 $('#search').toggleClass('current');
15 $('#search').toggleClass('active-current');
16 $('#search-arrow').toggleClass('arrow-down');
17 if ($('#search').hasClass('current')) {
18 $('#content').addClass('opacity03');
19 } else {
20 $('#content').removeClass('opacity03');
21 }
22 }
23
24 //---------------------------------------------------------------------------
25 // Toggle the 'Filter' popup on entries list
26 //---------------------------------------------------------------------------
27 function toggleFilter() {
28 $('#filter-form').toggle();
29 }
30
31 //---------------------------------------------------------------------------
32 // Toggle the 'Download' popup on entries list
33 //---------------------------------------------------------------------------
34 function toggleDownload() {
35 $('#download-form').toggle();
36 }
37
38 //---------------------------------------------------------------------------
39 // Toggle the 'Save a Link' popup in the sidebar
40 //---------------------------------------------------------------------------
41 function toggleBagit() {
42 $('#bagit-form').toggle();
43 $('#bagit').toggleClass('current');
44 $('#bagit').toggleClass('active-current');
45 $('#bagit-arrow').toggleClass('arrow-down');
46 if ($('#bagit').hasClass('current')) {
47 $('#content').addClass('opacity03');
48 } else {
49 $('#content').removeClass('opacity03');
50 }
51 }
52
53 //---------------------------------------------------------------------------
54 // Close all #links popups in the sidebar
55 //---------------------------------------------------------------------------
56 function closePopups() {
57 $('#links .messages').hide();
58 $('#links > li > a').removeClass('active-current');
59 $('#links > li > a').removeClass('current');
60 $('[id$=-arrow]').removeClass('arrow-down');
61 $('#content').removeClass('opacity03');
62 }
63
64 $('#search').click(function () {
65 closePopups();
66 toggleSearch();
67 $('#searchfield').focus();
68 });
69
70 $('.filter-btn').click(function () {
71 closePopups();
72 toggleFilter();
73 });
74
75 $('.download-btn').click(function () {
76 closePopups();
77 toggleDownload();
78 });
79
80 $('#bagit').click(function () {
81 closePopups();
82 toggleBagit();
83 $('#plainurl').focus();
84 });
85
86 $('#search-form-close').click(function () {
87 toggleSearch();
88 });
89
90 $('#filter-form-close').click(function () {
91 toggleFilter();
92 });
93
94 $('#download-form-close').click(function () {
95 toggleDownload();
96 });
97
98 $('#bagit-form-close').click(function () {
99 toggleBagit();
100 });
101});