diff options
Diffstat (limited to 'themes')
-rwxr-xr-x | themes/baggy/css/main.css | 3 | ||||
-rwxr-xr-x | themes/baggy/js/init.js | 2 | ||||
-rw-r--r-- | themes/default/js/popupForm.js | 69 | ||||
-rwxr-xr-x | themes/default/js/saveLink.js | 27 |
4 files changed, 75 insertions, 26 deletions
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index f77021aa..028c8b4e 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css | |||
@@ -1002,6 +1002,9 @@ pre code { | |||
1002 | height: auto; | 1002 | height: auto; |
1003 | padding-top: 3em; | 1003 | padding-top: 3em; |
1004 | } | 1004 | } |
1005 | #links.menu--open { | ||
1006 | display: block; | ||
1007 | } | ||
1005 | footer { | 1008 | footer { |
1006 | position: static; | 1009 | position: static; |
1007 | margin-right: 3em; | 1010 | margin-right: 3em; |
diff --git a/themes/baggy/js/init.js b/themes/baggy/js/init.js index 542f1d43..74cbae68 100755 --- a/themes/baggy/js/init.js +++ b/themes/baggy/js/init.js | |||
@@ -8,7 +8,7 @@ $.fn.ready(function() { | |||
8 | ========================================================================== */ | 8 | ========================================================================== */ |
9 | 9 | ||
10 | $("#menu").click(function(){ | 10 | $("#menu").click(function(){ |
11 | $("#links").toggle(); | 11 | $("#links").toggleClass('menu--open'); |
12 | if ($('#content').hasClass('opacity03')) { | 12 | if ($('#content').hasClass('opacity03')) { |
13 | $('#content').removeClass('opacity03'); | 13 | $('#content').removeClass('opacity03'); |
14 | } | 14 | } |
diff --git a/themes/default/js/popupForm.js b/themes/default/js/popupForm.js index eb6d1ae2..d233e600 100644 --- a/themes/default/js/popupForm.js +++ b/themes/default/js/popupForm.js | |||
@@ -1,29 +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 | } | ||
9 | } | 19 | } |
10 | 20 | ||
11 | $("#search").click(function(){ | 21 | //--------------------------------------------------------------------------- |
12 | closeSearch(); | 22 | // Toggle the "Save a Link" popup in the sidebar |
13 | // if other popup is already shown | 23 | //--------------------------------------------------------------------------- |
14 | if ($("#bagit-form").length != 0) { | 24 | function toggleBagit() { |
15 | $("#bagit").removeClass("active-current"); | 25 | $("#bagit-form").toggle(); |
16 | $('#content').removeClass("opacity03"); | 26 | $("#bagit").toggleClass("current"); |
17 | $("#bagit").removeClass("current"); | 27 | $("#bagit").toggleClass("active-current"); |
18 | $("#bagit-arrow").removeClass("arrow-down"); | 28 | $("#bagit-arrow").toggleClass("arrow-down"); |
19 | $("#bagit-form").hide(); | 29 | if ($("#bagit").hasClass("current")) { |
30 | $("#content").addClass("opacity03"); | ||
31 | } else { | ||
32 | $("#content").removeClass("opacity03"); | ||
20 | } | 33 | } |
21 | $('#searchfield').focus(); | 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(); | ||
22 | }); | 57 | }); |
23 | 58 | ||
24 | $("#search-form-close").click(function(){ | 59 | $("#search-form-close").click(function(){ |
25 | closeSearch(); | 60 | toggleSearch(); |
26 | }); | 61 | }); |
27 | 62 | ||
63 | $("#bagit-form-close").click(function(){ | ||
64 | toggleBagit(); | ||
65 | }); | ||
66 | |||
67 | // $("#").click(function(){ | ||
68 | // toggleSearch(); | ||
69 | // }); | ||
70 | |||
28 | 71 | ||
29 | }); \ No newline at end of file | 72 | }); |
diff --git a/themes/default/js/saveLink.js b/themes/default/js/saveLink.js index b52b8a2c..a7acd84c 100755 --- a/themes/default/js/saveLink.js +++ b/themes/default/js/saveLink.js | |||
@@ -36,18 +36,21 @@ $.fn.ready(function() { | |||
36 | $('#plainurl').focus(); | 36 | $('#plainurl').focus(); |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | //--------------------------------------------------------------------------- | |
40 | $bagit.click(function(){ | 40 | // These two functions are now taken care of in popupForm.js |
41 | $bagit.toggleClass("current"); | 41 | //--------------------------------------------------------------------------- |
42 | $("#bagit-arrow").toggleClass("arrow-down"); | 42 | |
43 | toggleSaveLinkForm(); | 43 | // $bagit.click(function(){ |
44 | }); | 44 | // $bagit.toggleClass("current"); |
45 | 45 | // $("#bagit-arrow").toggleClass("arrow-down"); | |
46 | $("#bagit-form-close").click(function(){ | 46 | // toggleSaveLinkForm(); |
47 | $bagit.removeClass("current"); | 47 | // }); |
48 | $("#bagit-arrow").removeClass("arrow-down"); | 48 | |
49 | toggleSaveLinkForm(); | 49 | // $("#bagit-form-close").click(function(){ |
50 | }); | 50 | // $bagit.removeClass("current"); |
51 | // $("#bagit-arrow").removeClass("arrow-down"); | ||
52 | // toggleSaveLinkForm(); | ||
53 | // }); | ||
51 | 54 | ||
52 | 55 | ||
53 | //send "bag it link" form request via ajax | 56 | //send "bag it link" form request via ajax |