]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - app/Resources/static/themes/baggy/js/popupForm.js
1 $(document
).ready(function() {
3 $("#search-form").hide();
4 $("#bagit-form").hide();
5 $("#filter-form").hide();
6 $("#download-form").hide();
8 //---------------------------------------------------------------------------
9 // Toggle the "Search" popup in the sidebar
10 //---------------------------------------------------------------------------
11 function toggleSearch() {
12 $("#search-form").toggle();
13 $("#search").toggleClass("current");
14 $("#search").toggleClass("active-current");
15 $("#search-arrow").toggleClass("arrow-down");
16 if ($("#search").hasClass("current")) {
17 $("#content").addClass("opacity03");
19 $("#content").removeClass("opacity03");
23 //---------------------------------------------------------------------------
24 // Toggle the "Filter" popup on entries list
25 //---------------------------------------------------------------------------
26 function toggleFilter() {
27 $("#filter-form").toggle();
30 //---------------------------------------------------------------------------
31 // Toggle the "Download" popup on entries list
32 //---------------------------------------------------------------------------
33 function toggleDownload() {
34 $("#download-form").toggle();
37 //---------------------------------------------------------------------------
38 // Toggle the "Save a Link" popup in the sidebar
39 //---------------------------------------------------------------------------
40 function toggleBagit() {
41 $("#bagit-form").toggle();
42 $("#bagit").toggleClass("current");
43 $("#bagit").toggleClass("active-current");
44 $("#bagit-arrow").toggleClass("arrow-down");
45 if ($("#bagit").hasClass("current")) {
46 $("#content").addClass("opacity03");
48 $("#content").removeClass("opacity03");
52 //---------------------------------------------------------------------------
53 // Close all #links popups in the sidebar
54 //---------------------------------------------------------------------------
55 function closePopups() {
56 $("#links .messages").hide();
57 $("#links > li > a").removeClass("active-current");
58 $("#links > li > a").removeClass("current");
59 $("[id$=-arrow]").removeClass("arrow-down");
60 $("#content").removeClass("opacity03");
63 $("#search").click(function(){
66 $("#searchfield").focus();
69 $(".filter-btn").click(function(){
74 $(".download-btn").click(function(){
79 $("#bagit").click(function(){
82 $("#plainurl").focus();
85 $("#search-form-close").click(function(){
89 $("#filter-form-close").click(function(){
93 $("#download-form-close").click(function(){
97 $("#bagit-form-close").click(function(){