Proper show/hide of help sections.

This commit is contained in:
Tom Preston-Werner
2010-07-20 13:29:12 -05:00
parent 69420cb184
commit 5f86d4e983
3 changed files with 18 additions and 10 deletions
+8 -6
View File
@@ -8,6 +8,10 @@
font-size: 13px; font-size: 13px;
} }
#editbar .current {
display: block !important;
}
#editbar .menu { #editbar .menu {
overflow: hidden; overflow: hidden;
background: white; background: white;
@@ -101,7 +105,9 @@
width: 100%; width: 100%;
overflow: visible; overflow: visible;
border-top: 1px solid #888; border-top: 1px solid #888;
height: 1750px; height: 175px;
background-color: #E0EEF7;
display: none;
} }
#editbar .sections .toc { #editbar .sections .toc {
@@ -128,17 +134,13 @@
background-color: white; background-color: white;
float: right; float: right;
width: 80%; width: 80%;
height: 1750px; height: 175px;
} }
#editbar .sections .page { #editbar .sections .page {
display: none; display: none;
} }
#editbar .sections .page.current {
display: block;
}
#editbar .sections .pages th { #editbar .sections .pages th {
color: #999; color: #999;
font-weight: bold; font-weight: bold;
@@ -149,11 +149,17 @@ $(function(){
Gollum.prefix(el, format, 'ol') Gollum.prefix(el, format, 'ol')
}) })
$('#editbar .tab a').click(function() { $('#editbar .tab.help a').click(function() {
if ($(this).hasClass("open")) { if ($(this).hasClass("open")) {
$(this).removeClass("open") $(this).removeClass("open")
$('#editbar .sections').slideUp()
} else { } else {
$(this).addClass("open") $(this).addClass("open")
if (!$('#editbar .sections .toc .current').get(0)) {
var target = $('#editbar .sections .toc .headers').get(0)
sectionItemClick.call(target)
}
$('#editbar .sections').slideDown()
} }
}) })
@@ -24,7 +24,7 @@
<div class="links gollum">Links</div> <div class="links gollum">Links</div>
<div class="images gollum">Images</div> <div class="images gollum">Images</div>
<div class="code gollum">Code</div> <div class="code gollum">Code</div>
<div class="formatting current">Formatting</div> <div class="formatting">Formatting</div>
<div class="lists">Lists</div> <div class="lists">Lists</div>
</div> </div>
<div class="pages"> <div class="pages">