From abf34118c3bf14bd4acfde657b3ef8b1fb913bea Mon Sep 17 00:00:00 2001 From: "smain@google.com" Date: Mon, 23 Jun 2014 11:39:02 -0700 Subject: [PATCH] more tweaks fixes to the next/prev logic. Fix the way 'articles' include the links. was broken for design docs, all appeared disabled. also add 'white' style for links that appear on colored background Change-Id: I6f59b91c1429014a90cb887a9e46880ebde0f75a --- tools/droiddoc/templates-sdk/assets/css/default.css | 9 +++++++-- tools/droiddoc/templates-sdk/assets/js/docs.js | 11 +---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css index f529f1698..e3363fb47 100644 --- a/tools/droiddoc/templates-sdk/assets/css/default.css +++ b/tools/droiddoc/templates-sdk/assets/css/default.css @@ -468,8 +468,6 @@ video.with-shadow { position: absolute; } .paging-links a, .training-nav-top a { - font-size: 14px; - line-height: 30px; color: #555555; text-decoration: none; text-transform: uppercase; } @@ -1233,6 +1231,13 @@ a:focus, a:hover, a:active { color: #33B5E5; text-decoration: none; } +a.white { + color: #fff; + text-decoration:underline; +} +a.white:hover, a.white:active { + color: #ccc !important; +} strong, b { font-weight:bold; color: #222; diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index 7ed86cea4..f03fb888f 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -278,7 +278,6 @@ false; // navigate across topic boundaries only in design docs // set up next links var $nextLink = []; var startClass = false; - var training = $(".next-class-link").length; // decides whether to provide "next class" link var isCrossingBoundary = false; if ($selListItem.hasClass('nav-section') && $selListItem.children('div.empty').length == 0) { @@ -305,7 +304,7 @@ false; // navigate across topic boundaries only in design docs if ($nextLink.length == 0) { isCrossingBoundary = true; // no more topics in this section, jump to the first topic in the next section - $nextLink = $selListItem.parents('li:eq(0)').next('li.nav-section').find('a:eq(0)'); + $nextLink = $selListItem.parents('li:eq(0)').next('li').find('a:eq(0)'); if (!$nextLink.length) { // Go up another layer to look for next page (lesson > class > course) $nextLink = $selListItem.parents('li:eq(1)').next('li.nav-section').find('a:eq(0)'); if ($nextLink.length == 0) { @@ -356,14 +355,6 @@ false; // navigate across topic boundaries only in design docs } } - // If this is a training 'article', there should be no prev/next nav - // ... if the grandparent is the "nav" ... and it has no child list items... - if (training && $selListItem.parents('ul').eq(1).is('[id="nav"]') && - !$selListItem.find('li').length) { - $('.next-page-link,.prev-page-link').attr('href','').addClass("disabled") - .click(function() { return false; }); - } - }