aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/default/js/popupForm.js
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-11-15 20:48:49 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-11-15 20:48:49 +0100
commit153237671001225dea40957e33e67fe16e6124fc (patch)
tree4f5ec06050233f9cd5740904785edcbc65eb2cd9 /themes/default/js/popupForm.js
parent44d35257e805856b4913c63fcbed3c0acb64bae8 (diff)
parentd3122db7b267b384cd70f368328a9ed024719135 (diff)
downloadwallabag-153237671001225dea40957e33e67fe16e6124fc.tar.gz
wallabag-153237671001225dea40957e33e67fe16e6124fc.tar.zst
wallabag-153237671001225dea40957e33e67fe16e6124fc.zip
Merge pull request #932 from wallabag/dev1.8.1
1.8.1
Diffstat (limited to 'themes/default/js/popupForm.js')
-rw-r--r--themes/default/js/popupForm.js61
1 files changed, 56 insertions, 5 deletions
diff --git a/themes/default/js/popupForm.js b/themes/default/js/popupForm.js
index a32e6e70..d233e600 100644
--- a/themes/default/js/popupForm.js
+++ b/themes/default/js/popupForm.js
@@ -1,21 +1,72 @@
1$(document).ready(function() { 1$(document).ready(function() {
2 2
3 $("#search-form").hide(); 3 $("#search-form").hide();
4 $("#bagit-form").hide();
4 5
5 function closeSearch() { 6 //---------------------------------------------------------------------------
7 // Toggle the "Search" popup in the sidebar
8 //---------------------------------------------------------------------------
9 function toggleSearch() {
6 $("#search-form").toggle(); 10 $("#search-form").toggle();
7 $("#search").toggleClass("current"); 11 $("#search").toggleClass("current");
12 $("#search").toggleClass("active-current");
8 $("#search-arrow").toggleClass("arrow-down"); 13 $("#search-arrow").toggleClass("arrow-down");
14 if ($("#search").hasClass("current")) {
15 $("#content").addClass("opacity03");
16 } else {
17 $("#content").removeClass("opacity03");
18 }
19 }
20
21 //---------------------------------------------------------------------------
22 // Toggle the "Save a Link" popup in the sidebar
23 //---------------------------------------------------------------------------
24 function toggleBagit() {
25 $("#bagit-form").toggle();
26 $("#bagit").toggleClass("current");
27 $("#bagit").toggleClass("active-current");
28 $("#bagit-arrow").toggleClass("arrow-down");
29 if ($("#bagit").hasClass("current")) {
30 $("#content").addClass("opacity03");
31 } else {
32 $("#content").removeClass("opacity03");
33 }
34 }
35
36 //---------------------------------------------------------------------------
37 // Close all #links popups in the sidebar
38 //---------------------------------------------------------------------------
39 function closePopups() {
40 $("#links .messages").hide();
41 $("#links > li > a").removeClass("active-current");
42 $("#links > li > a").removeClass("current");
43 $("[id$=-arrow]").removeClass("arrow-down");
44 $("#content").removeClass("opacity03");
9 } 45 }
10 46
11 $("#search").click(function(){ 47 $("#search").click(function(){
12 closeSearch(); 48 closePopups();
13 $('#searchfield').focus(); 49 toggleSearch();
50 $("#searchfield").focus();
51 });
52
53 $("#bagit").click(function(){
54 closePopups();
55 toggleBagit();
56 $("#plainurl").focus();
14 }); 57 });
15 58
16 $("#search-form-close").click(function(){ 59 $("#search-form-close").click(function(){
17 closeSearch(); 60 toggleSearch();
61 });
62
63 $("#bagit-form-close").click(function(){
64 toggleBagit();
18 }); 65 });
19 66
67 // $("#").click(function(){
68 // toggleSearch();
69 // });
70
20 71
21}); \ No newline at end of file 72});