aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-23 22:55:06 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-03-01 10:49:16 +0100
commit32da2a70ef278bd42f66eb82c3fbf1905a417b87 (patch)
tree587ef3bae1f4881047eb1ceb0c005e7a8287bb71 /src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js
parentfca3c757233940cbe4c431e3e05fe74893225fe0 (diff)
downloadwallabag-32da2a70ef278bd42f66eb82c3fbf1905a417b87.tar.gz
wallabag-32da2a70ef278bd42f66eb82c3fbf1905a417b87.tar.zst
wallabag-32da2a70ef278bd42f66eb82c3fbf1905a417b87.zip
Add LiipThemeBundle
Re-defined the config / user relation to be OneToOne bidirectionnal. ConfigType is now a service so I can inject the list of available themes that are also used by LiipThemeBundle Force sqlite for test In case of people use a different driver in parameter.yml (yes I do :))
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js b/src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js
new file mode 100644
index 00000000..d233e600
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/_global/public/js/popupForm.js
@@ -0,0 +1,72 @@
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});