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