svn: /web/php/trunk/ include/shared-manual.inc js/common.js styles/doc.css
| From: | Hannes Magnusson | Date: | Tue, 28 Dec 2010 08:09:04 +0000 |
| Subject: | svn: /web/php/trunk/ include/shared-manual.inc js/common.js styles/doc.css | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-9897@lists.php.net to get a copy of this message | ||
bjori Tue, 28 Dec 2010 08:09:04 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306773
Log:
Generate quick toc for function reference pages (needs new PhD release to
generate the anchors)
Changed paths:
U web/php/trunk/include/shared-manual.inc
U web/php/trunk/js/common.js
U web/php/trunk/styles/doc.css
Modified: web/php/trunk/include/shared-manual.inc
===================================================================
--- web/php/trunk/include/shared-manual.inc 2010-12-28 07:20:35 UTC (rev 306772)
+++ web/php/trunk/include/shared-manual.inc 2010-12-28 08:09:04 UTC (rev 306773)
@@ -530,6 +530,7 @@
$_SERVER["BASE_PAGE"] = "/manual/" . $setup["head"][1] .
"/" . $setup["this"][0];
site_header($setup["this"][1] . " - Manual ", array("current"
=> "docs", "leftmenu" => $menu));
+ echo '<aside id="quicktoc"></aside>';
}
function manual_header_beta(){}
Modified: web/php/trunk/js/common.js
===================================================================
--- web/php/trunk/js/common.js 2010-12-28 07:20:35 UTC (rev 306772)
+++ web/php/trunk/js/common.js 2010-12-28 08:09:04 UTC (rev 306773)
@@ -35,6 +35,18 @@
}
);
});
+ if ($("#quicktoc").length) {
+ var l = "";
+ $(".refsect1 h3").each(function() {
+ var id = $(this).parent().attr("id");
+ l += "<li><a href='#" + id + "'>" +
$(this).text() + "</a></li>";
+ });
+ if (l) {
+ $("#quicktoc").append("<h5>Quick TOC</h5><ul>" +
l + "<li><a href='#usernotes'>User
notes</a></li></ul>");
+ } else {
+ $("#quicktoc").remove();
+ }
+ }
});
Modified: web/php/trunk/styles/doc.css
===================================================================
--- web/php/trunk/styles/doc.css 2010-12-28 07:20:35 UTC (rev 306772)
+++ web/php/trunk/styles/doc.css 2010-12-28 08:09:04 UTC (rev 306773)
@@ -1,3 +1,10 @@
+aside#quicktoc {
+ padding: 10px;
+ width: 125px;
+ border: 1px solid #C3ADD9;
+ position: fixed;
+ right: 0px;
+}
.docs i .parameter {
font-style: normal;
}