From b505ca6db57d9d090be78268e154b84fcfd8991b Mon Sep 17 00:00:00 2001 From: Scott Main Date: Thu, 26 Jul 2012 18:00:14 -0700 Subject: [PATCH] add script to create links on topic landing page for first doc that use the doc's title Change-Id: Iec86a5b9fa7dcd9246d6e8958f17e0022e0963a8 --- tools/droiddoc/templates-sdk/assets/js/docs.js | 6 +++++- tools/droiddoc/templates-sdk/docpage.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index 6fec693dc..ba32d2597 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -195,11 +195,15 @@ false; // navigate across topic boundaries only in design docs if ($selListItem.hasClass('nav-section')) { // we're on an index page, jump to the first topic - $nextLink = $selListItem.find('ul').find('a:eq(0)'); + $nextLink = $selListItem.find('ul:eq(0)').find('a:eq(0)'); // if there aren't any children, go to the next section (required for About pages) if($nextLink.length == 0) { $nextLink = $selListItem.next('li').find('a'); + } else if ($('.topic-start-link').length) { + // as long as there's a child link and there is a "topic start link" (we're on a landing) + // then set the landing page "start link" text to be the first doc title + $('.topic-start-link').text($nextLink.text().toUpperCase()); } // Handle some Training specialties diff --git a/tools/droiddoc/templates-sdk/docpage.cs b/tools/droiddoc/templates-sdk/docpage.cs index 181f777d4..963e9cf95 100644 --- a/tools/droiddoc/templates-sdk/docpage.cs +++ b/tools/droiddoc/templates-sdk/docpage.cs @@ -53,7 +53,7 @@

-

LEARN MORE

+