From 73c887e30f4e618b44170ae6954985ce54f468a3 Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Tue, 16 Aug 2011 19:42:51 -0400 Subject: [PATCH] The default theme actually does use this file. --- lib/shimmie.js | 1 - themes/default/layout.class.php | 1 + themes/default/sidebar.js | 83 +++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 themes/default/sidebar.js diff --git a/lib/shimmie.js b/lib/shimmie.js index 3b26466e..14af3ce7 100644 --- a/lib/shimmie.js +++ b/lib/shimmie.js @@ -15,7 +15,6 @@ window.onload = function(e) { } } - function initGray(boxname, text) { var box = byId(boxname); if(!box) return; diff --git a/themes/default/layout.class.php b/themes/default/layout.class.php index eed06b9b..290d1a8c 100644 --- a/themes/default/layout.class.php +++ b/themes/default/layout.class.php @@ -56,6 +56,7 @@ class Layout { {$page->title} + $header_html diff --git a/themes/default/sidebar.js b/themes/default/sidebar.js new file mode 100644 index 00000000..585f8ca8 --- /dev/null +++ b/themes/default/sidebar.js @@ -0,0 +1,83 @@ +/* + * This script shamelessly stolen from wakachan.org d(^_^)b + */ + +var cookie_name="shimmie_sidebar"; +var default_sections=["upload", "edit_tags"]; + +function toggle(id) +{ + var e=document.getElementById(id); + if(!e) return; + if(e.style.display) + { + remove_section(id); + e.style.display=""; + + var e2 = document.getElementById(id+"-toggle"); + if(e2) { + e2.style.color = "#000"; + } + } + else + { + add_section(id); + e.style.display="none"; + + var e2 = document.getElementById(id+"-toggle"); + if(e2) { + e2.style.color = "#AAA"; + } + } +} + +function add_section(id) +{ + var sections=get_sections(); + for(var i=0;i