]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - public/js/popupForm.js
1 $(document
).ready(function() {
3 $("#search-form").hide();
4 $("#bagit-form").hide();
5 $("#filter-form").hide();
7 //---------------------------------------------------------------------------
8 // Toggle the "Search" popup in the sidebar
9 //---------------------------------------------------------------------------
10 function toggleSearch() {
11 $("#search-form").toggle();
12 $("#search").toggleClass("current");
13 $("#search").toggleClass("active-current");
14 $("#search-arrow").toggleClass("arrow-down");
15 if ($("#search").hasClass("current")) {
16 $("#content").addClass("opacity03");
18 $("#content").removeClass("opacity03");
22 //---------------------------------------------------------------------------
23 // Toggle the "Filter" popup on entries list
24 //---------------------------------------------------------------------------
25 function toggleFilter() {
26 $("#filter-form").toggle();
29 //---------------------------------------------------------------------------
30 // Toggle the "Save a Link" popup in the sidebar
31 //---------------------------------------------------------------------------
32 function toggleBagit() {
33 $("#bagit-form").toggle();
34 $("#bagit").toggleClass("current");
35 $("#bagit").toggleClass("active-current");
36 $("#bagit-arrow").toggleClass("arrow-down");
37 if ($("#bagit").hasClass("current")) {
38 $("#content").addClass("opacity03");
40 $("#content").removeClass("opacity03");
44 //---------------------------------------------------------------------------
45 // Close all #links popups in the sidebar
46 //---------------------------------------------------------------------------
47 function closePopups() {
48 $("#links .messages").hide();
49 $("#links > li > a").removeClass("active-current");
50 $("#links > li > a").removeClass("current");
51 $("[id$=-arrow]").removeClass("arrow-down");
52 $("#content").removeClass("opacity03");
55 $("#search").click(function(){
58 $("#searchfield").focus();
61 $("#filter").click(function(){
66 $("#bagit").click(function(){
69 $("#plainurl").focus();
72 $("#search-form-close").click(function(){
76 $("#filter-form-close").click(function(){
80 $("#bagit-form-close").click(function(){