diff options
author | Scott Main <smain@google.com> | 2014-05-09 10:00:14 -0700 |
---|---|---|
committer | Scott Main <smain@google.com> | 2014-05-09 12:16:14 -0700 |
commit | 7a6ab434bc34319f06818d12d3abaf9070630684 (patch) | |
tree | 81b28180af7cf0be791dcd6b576f0d4941450c5a /tools/droiddoc/templates-sdk-dyn/assets/js | |
parent | e21bed28acdd21f6000d1de30538839085ffa890 (diff) | |
download | build-7a6ab434bc34319f06818d12d3abaf9070630684.zip build-7a6ab434bc34319f06818d12d3abaf9070630684.tar.gz build-7a6ab434bc34319f06818d12d3abaf9070630684.tar.bz2 |
update wear header template to support sticky nav.
moved the search and menu markup for the header into a method call.
also update the styles and script so that when a page does not belong
to a primary horizontal-nav link, the header logo is used for the breadcrumb's
first link and text.
Change-Id: I14129fe7657924e2037c103674e09322c4c31db8
Diffstat (limited to 'tools/droiddoc/templates-sdk-dyn/assets/js')
-rw-r--r-- | tools/droiddoc/templates-sdk-dyn/assets/js/docs.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/droiddoc/templates-sdk-dyn/assets/js/docs.js b/tools/droiddoc/templates-sdk-dyn/assets/js/docs.js index 09d5f7a..e6befe3 100644 --- a/tools/droiddoc/templates-sdk-dyn/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk-dyn/assets/js/docs.js @@ -564,6 +564,12 @@ function buildBreadcrumbs() { } // Add the primary horizontal nav var $selectedFirstNav = $("div#header-wrap ul.nav-x a.selected").clone().removeClass("selected"); + // If there's no header nav item, use the logo link and title from alt text + if ($selectedFirstNav.length < 1) { + $selectedFirstNav = $("<a>") + .attr('href', $("div#header .logo a").attr('href')) + .text($("div#header .logo img").attr('alt')); + } $breadcrumbUl.prepend($("<li>").append($selectedFirstNav)); } |