]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: show contents in correct order, expand sections on click
authorAndrew Gerrand <adg@golang.org>
Thu, 4 Oct 2012 01:21:37 +0000 (11:21 +1000)
committerAndrew Gerrand <adg@golang.org>
Thu, 4 Oct 2012 01:21:37 +0000 (11:21 +1000)
R=dsymonds
CC=gobot, golang-dev
https://golang.org/cl/6588079

doc/godocs.js
lib/godoc/package.html

index 8fd32fef0f4b8baaa1019814b505dc6a8750fd41..b1ad3b28c3a81253c9d5fc763c58904c755a3b68 100644 (file)
@@ -208,6 +208,8 @@ function godocs_onload() {
   godocs_bindToggles("toggleVisible");
   godocs_bindToggleLinks("exampleLink", "example_");
   godocs_bindToggleLinks("overviewLink", "");
+  godocs_bindToggleLinks("examplesLink", "");
+  godocs_bindToggleLinks("indexLink", "");
 }
 
 bindEvent(window, 'load', godocs_onload);
index ae574827d67032eb746c4446a2125551efc24ce1..3c0dfa41bf03a947a1db5f11c7ff494cd13f45d2 100644 (file)
                        </dl>
                        <dl>
                        <dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
-                       <dd><a href="#pkg-index">Index</a></dd>
                        {{if $.Examples}}
-                               <dd><a href="#pkg-examples">Examples</a></dd>
+                               <dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
                        {{end}}
+                       <dd><a href="#pkg-index" class="indexLink">Index</a></dd>
                        {{if $.Dirs}}
                                <dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
                        {{end}}