Merge "docs: Removed navigation heading for Develop > Preview" into mnc-mr-docs

This commit is contained in:
Quddus Chong 2015-09-22 21:59:30 +00:00 committed by Android (Google) Code Review
commit 439ad8b652
4 changed files with 6 additions and 62 deletions

View File

@ -202,8 +202,6 @@ $(document).ready(function() {
subNavEl.find("li.google > a").addClass("selected");
} else if ($("body").hasClass("samples")) {
subNavEl.find("li.samples > a").addClass("selected");
} else if ($("body").hasClass("preview")) {
subNavEl.find("li.preview > a").addClass("selected");
} else {
parentNavEl.removeClass('has-subnav').addClass("selected");
}
@ -2361,37 +2359,6 @@ function search_changed(e, kd, toroot)
}
}
// Search for Preview Guides
for (var i=0; i<PREVIEW_RESOURCES.length; i++) {
// current search comparison, with counters for tag and title,
// used later to improve ranking
var s = PREVIEW_RESOURCES[i];
s.matched_tag = 0;
s.matched_title = 0;
var matched = false;
// Check if query matches any tags; work backwards toward 1 to assist ranking
for (var j = s.keywords.length - 1; j >= 0; j--) {
// it matches a tag
if (s.keywords[j].toLowerCase().indexOf(queryStr) == 0) {
matched = true;
s.matched_tag = j + 1; // add 1 to index position
}
}
// Check if query matches the doc title, but only for current language
if (s.lang == currentLang) {
// if query matches the doc title
if (s.title.toLowerCase().indexOf(queryStr) == 0) {
matched = true;
s.matched_title = 1;
}
}
if (matched) {
gDocsMatches[matchedCountDocs] = s;
matchedCountDocs++;
}
}
// Rank/sort all the matched pages
rank_autocomplete_doc_results(text, gDocsMatches);
}
@ -3747,7 +3714,7 @@ function showSamples() {
return $el;
}
function createResponsiveFlowColumn(cardSize) {
var cardWidth = parseInt(cardSize.match(/(\d+)/)[1], 10);
var column = $('<div>').addClass('col-' + (cardWidth / 3) + 'of6');
@ -3788,7 +3755,7 @@ function showSamples() {
var cardSize = cardSizes[j++ % cardSizes.length];
cardSize = cardSize.replace(/^\s+|\s+$/,'');
var column = createResponsiveFlowColumn(cardSize).appendTo(cardParent);
// A stack has a third dimension which is the number of stacked items

View File

@ -230,9 +230,6 @@
<a class="dac-nav-link" href="<?cs var:toroot ?>samples/index.html">Samples</a>
</li>
<?cs /if ?>
<li class="dac-nav-item preview">
<a class="dac-nav-link" href="<?cs var:toroot ?>preview/index.html">Preview</a>
</li>
</ul>
</li>
<li class="dac-nav-item distribute">

View File

@ -10,7 +10,7 @@ def:fullpage() ?>
<div id="body-content">
<div>
<?cs /def ?>
<?cs
<?cs
def:sdk_nav() ?>
<div class="wrap clearfix" id="body-content"><div class="cols">
<div class="col-4 dac-toggle dac-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
@ -79,23 +79,6 @@ def:googleplay_nav() ?>
</script>
<?cs /def ?><?cs
def:preview_nav() ?>
<div class="wrap clearfix" id="body-content"><div class="cols">
<div class="col-4 dac-toggle dac-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
<?cs call:mobile_nav_toggle() ?>
<div class="dac-toggle-content" id="devdoc-nav">
<div class="scroll-pane">
<?cs include:"../../../../frameworks/base/docs/html/preview/preview_toc.cs" ?>
</div>
</div>
</div> <!-- end side-nav -->
<script>
$(document).ready(function() {
scrollIntoView("devdoc-nav");
});
</script>
<?cs /def ?><?cs
def:essentials_nav() ?>
<div class="wrap clearfix" id="body-content"><div class="cols">
<div class="col-3 dac-toggle dac-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
@ -297,7 +280,7 @@ def:google_nav() ?>
</div>
<script type="text/javascript">
showGoogleRefTree();
</script>
</div> <!-- end side-nav -->
<script>
@ -528,7 +511,7 @@ def:custom_left_nav() ?><?cs
call:fullpage() ?><?cs
elif:nonavpage ?><?cs
call:no_nav() ?><?cs
elif:guide || reference || samples || downloads ?><?cs
elif:guide || reference || samples || downloads ?><?cs
call:ndk_nav() ?><?cs
else ?><?cs
call:default_left_nav() ?> <?cs
@ -550,8 +533,6 @@ def:custom_left_nav() ?><?cs
call:google_nav() ?><?cs
elif:samples ?><?cs
call:samples_nav() ?><?cs
elif:preview ?><?cs
call:preview_nav() ?><?cs
elif:distribute ?><?cs
if:googleplay ?><?cs
call:googleplay_nav() ?><?cs

View File

@ -13,10 +13,9 @@
if:reference ?> reference<?cs /if ?><?cs
if:downloads ?> downloads<?cs /if ?><?cs
else ?><?cs
if:(guide||develop||training||reference||tools||sdk||google||samples||preview) ?>develop<?cs
if:(guide||develop||training||reference||tools||sdk||google||samples) ?>develop<?cs
if:guide ?> guide<?cs /if ?><?cs
if:samples ?> samples<?cs /if ?><?cs
if:preview ?> preview<?cs /if ?><?cs
elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>distribute<?cs
if:googleplay ?> googleplay<?cs /if ?><?cs
if:essentials ?> essentials<?cs /if ?><?cs