aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/baggy/js/init.js
diff options
context:
space:
mode:
authorMaryana Rozhankivska <mariroz@mr.lviv.ua>2014-02-27 16:11:37 +0200
committerMaryana Rozhankivska <mariroz@mr.lviv.ua>2014-02-27 16:11:37 +0200
commit36a733af8dee1de5a0f81f1efe70e96a435b6a17 (patch)
tree4f25c5d071b2e3e29dbfba01d7f6f948bb83b9f2 /themes/baggy/js/init.js
parentcbcae4037c02cd6c1ce7c373c6dae390565b7c51 (diff)
downloadwallabag-36a733af8dee1de5a0f81f1efe70e96a435b6a17.tar.gz
wallabag-36a733af8dee1de5a0f81f1efe70e96a435b6a17.tar.zst
wallabag-36a733af8dee1de5a0f81f1efe70e96a435b6a17.zip
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});