diff options
author | Jay Sitter <jsitter@gmail.com> | 2014-11-18 10:01:37 -0500 |
---|---|---|
committer | Jay Sitter <jsitter@gmail.com> | 2014-11-18 10:01:37 -0500 |
commit | eb365a01fb9b0fa29f88f4cdd0e09b8d4ec76dfd (patch) | |
tree | 53d959e5f96dd8e3dc8ef87e07d121f4dea0e1f8 /themes/default/js/popupForm.js | |
parent | db3bffa284012aec4f96c851c413e435080fed02 (diff) | |
download | wallabag-eb365a01fb9b0fa29f88f4cdd0e09b8d4ec76dfd.tar.gz wallabag-eb365a01fb9b0fa29f88f4cdd0e09b8d4ec76dfd.tar.zst wallabag-eb365a01fb9b0fa29f88f4cdd0e09b8d4ec76dfd.zip |
_global-izing some more js & css
Diffstat (limited to 'themes/default/js/popupForm.js')
-rw-r--r-- | themes/default/js/popupForm.js | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/themes/default/js/popupForm.js b/themes/default/js/popupForm.js deleted file mode 100644 index d233e600..00000000 --- a/themes/default/js/popupForm.js +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | $(document).ready(function() { | ||
2 | |||
3 | $("#search-form").hide(); | ||
4 | $("#bagit-form").hide(); | ||
5 | |||
6 | //--------------------------------------------------------------------------- | ||
7 | // Toggle the "Search" popup in the sidebar | ||
8 | //--------------------------------------------------------------------------- | ||
9 | function toggleSearch() { | ||
10 | $("#search-form").toggle(); | ||
11 | $("#search").toggleClass("current"); | ||
12 | $("#search").toggleClass("active-current"); | ||
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"); | ||
45 | } | ||
46 | |||
47 | $("#search").click(function(){ | ||
48 | closePopups(); | ||
49 | toggleSearch(); | ||
50 | $("#searchfield").focus(); | ||
51 | }); | ||
52 | |||
53 | $("#bagit").click(function(){ | ||
54 | closePopups(); | ||
55 | toggleBagit(); | ||
56 | $("#plainurl").focus(); | ||
57 | }); | ||
58 | |||
59 | $("#search-form-close").click(function(){ | ||
60 | toggleSearch(); | ||
61 | }); | ||
62 | |||
63 | $("#bagit-form-close").click(function(){ | ||
64 | toggleBagit(); | ||
65 | }); | ||
66 | |||
67 | // $("#").click(function(){ | ||
68 | // toggleSearch(); | ||
69 | // }); | ||
70 | |||
71 | |||
72 | }); | ||