summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2012-11-27 15:00:40 -0800
committerScott Main <smain@google.com>2012-11-27 15:00:40 -0800
commit502c939f6d0818d985a45ca54e35c0a3efa1470b (patch)
tree95c8dd6d58fb83aa927146b647fca5a4bd65be22 /tools
parentc69b773506ecf2316059a9fe947bbeb524a402b3 (diff)
downloadbuild-502c939f6d0818d985a45ca54e35c0a3efa1470b.zip
build-502c939f6d0818d985a45ca54e35c0a3efa1470b.tar.gz
build-502c939f6d0818d985a45ca54e35c0a3efa1470b.tar.bz2
docs: add support for an infinite number of nested lists in side nav
Change-Id: I9e0fa672e20067f3e09f56560e7d11847d0b9388
Diffstat (limited to 'tools')
-rw-r--r--tools/droiddoc/templates-sdk/assets/css/default.css2
-rw-r--r--tools/droiddoc/templates-sdk/assets/js/docs.js11
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 4c4cdee..30bdc25 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -320,7 +320,7 @@ video.with-shadow {
background: transparent; }
#nav li.expanded li ul {
/* 3rd level ul */
- padding:0 10px;
+ padding:0 0 0 10px;
}
#nav li.expanded > .nav-section-header:after {
content: '';
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index f1fbfff..376f9b8 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -138,12 +138,13 @@ $(document).ready(function() {
var $selListItem;
if ($selNavLink.length) {
$selListItem = $selNavLink.closest('li');
-
$selListItem.addClass('selected');
- $selListItem.closest('li.nav-section').addClass('expanded');
- $selListItem.closest('li.nav-section').children('ul').show();
- $selListItem.closest('li.nav-section').parent().closest('li.nav-section').addClass('expanded');
- $selListItem.closest('li.nav-section').parent().closest('ul').show();
+
+ // Traverse up the tree and expand all parent nav-sections
+ $selNavLink.parents('li.nav-section').each(function() {
+ $(this).addClass('expanded');
+ $(this).children('ul').show();
+ });
// $selListItem.closest('li.nav-section').closest('li.nav-section').addClass('expanded');