aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/baggy/js/init.js
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-27 15:20:01 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-27 15:20:01 +0100
commit61e79d934495ee24bb824e4c26b534ef9cd7fec3 (patch)
tree66f57690221a5ba3077d06d8553b8f1074b12171 /themes/baggy/js/init.js
parenta8464c97197c1ea9c4b3c35d7cec6a5398b7a522 (diff)
parent36a733af8dee1de5a0f81f1efe70e96a435b6a17 (diff)
downloadwallabag-61e79d934495ee24bb824e4c26b534ef9cd7fec3.tar.gz
wallabag-61e79d934495ee24bb824e4c26b534ef9cd7fec3.tar.zst
wallabag-61e79d934495ee24bb824e4c26b534ef9cd7fec3.zip
Merge pull request #510 from mariroz/dev
some baggy theme fixes and enhancement: issue #479
Diffstat (limited to 'themes/baggy/js/init.js')
-rwxr-xr-xthemes/baggy/js/init.js44
1 files changed, 34 insertions, 10 deletions
diff --git a/themes/baggy/js/init.js b/themes/baggy/js/init.js
index c1d3c0ec..4a843548 100755
--- a/themes/baggy/js/init.js
+++ b/themes/baggy/js/init.js
@@ -1,12 +1,36 @@
1document.addEventListener('DOMContentLoaded', function() { 1$(document).ready(function() {
2 var menu = document.getElementById('menu'); 2
3 3 $("#menu").click(function(){
4 menu.addEventListener('click', function(){ 4 $("#links").toggle();
5 if(this.nextElementSibling.style.display === "block") { 5 });
6 this.nextElementSibling.style.display = "none"; 6
7 }else { 7
8 this.nextElementSibling.style.display = "block"; 8 $("#listmode").click(function(){
9 if ( $.cookie("listmode") == 1 ) {
10 $(".entrie").css("width", "");
11 $(".entrie").css("margin-left", "");
12
13 $.removeCookie("listmode");
14 $("#listmode").removeClass("tablemode");
15 $("#listmode").addClass("listmode");
9 } 16 }
10 17 else {
18 $.cookie("listmode", 1, {expires: 365});
19
20 $(".entrie").css("width", "100%");
21 $(".entrie").css("margin-left", "0");
22 $("#listmode").removeClass("listmode");
23 $("#listmode").addClass("tablemode");
24 }
25
11 }); 26 });
12}); \ No newline at end of file 27
28 if ( $.cookie("listmode") == 1 ) {
29 $(".entrie").css("width", "100%");
30 $(".entrie").css("margin-left", "0");
31 $("#listmode").removeClass("listmode");
32 $("#listmode").addClass("tablemode");
33 }
34
35
36});