From 3ce1956feec453e176414a1896c8faf3668148a8 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Thu, 23 Jul 2009 22:42:33 +0000 Subject: Apply patch by Volker Mische to improve the sidebar toggle animation. Really closes COUCHDB-425 now. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@797252 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/futon.js | 14 ++++++++------ share/www/style/layout.css | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'share/www') diff --git a/share/www/script/futon.js b/share/www/script/futon.js index 78c2cb8e..f6b1d9f6 100644 --- a/share/www/script/futon.js +++ b/share/www/script/futon.js @@ -107,17 +107,19 @@ var sidebar = $("#sidebar").stop(true, true); var hidden = !$(sidebar).is(".hidden"); - sidebar.toggleClass("hidden").animate({ - width: hidden ? 26 : 210, - height: hidden ? $("h1").outerHeight() - 1 : "100%", - right: hidden ? 0 : -210 - }, speed).children(":not(#sidebar-toggle)").toggle(speed * 1.2); - $("h1").animate({marginRight: hidden ? 26 : 0}, speed); $("#wrap").animate({ marginRight: hidden ? 0 : 210 }, speed, function() { $(document.body).toggleClass("fullwidth", hidden); }); + sidebar.toggleClass("hidden").animate({ + width: hidden ? 26 : 210, + height: hidden ? $("h1").outerHeight() - 1 : "100%", + right: hidden ? 0 : -210 + }, speed).children(":not(#sidebar-toggle)").animate({ + opacity: "toggle" + }, speed); + $("h1").animate({marginRight: hidden ? 26 : 0}, speed); $("#sidebar-toggle") .attr("title", hidden ? "Show Sidebar" : "Hide Sidebar"); diff --git a/share/www/style/layout.css b/share/www/style/layout.css index 8b6f172b..0b513cd3 100644 --- a/share/www/style/layout.css +++ b/share/www/style/layout.css @@ -215,7 +215,6 @@ body.fullwidth #wrap { margin-right: 0; } #content { padding: 1em 16px 3em 10px; overflow: auto; position: absolute; top: 33px; bottom: 0; left: 0; right: 0; } -body.fullwidth #content { padding-right: 26px; } /* Toolbar */ -- cgit v1.2.3