From 7a0090b316482a2dc6f232ea312e1db63a9e919c Mon Sep 17 00:00:00 2001 From: Scott Main Date: Fri, 16 Apr 2010 09:00:29 -0700 Subject: [PATCH] docs: add script to capture the ctrl+f key event (initiates 'find' search on the page) and expand all inherited members. Also move the appropriate methods from -docs.js into -reference.js where they belong and add some function documentation. Change-Id: I421bbf27d3b41d377776b3d64a97380458fcebd6 --- .../assets/android-developer-docs.js | 37 ----- .../assets/android-developer-reference.js | 138 +++++++++++++++--- tools/droiddoc/templates/class.cs | 25 +--- 3 files changed, 117 insertions(+), 83 deletions(-) diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates/assets/android-developer-docs.js index 4f27e0e28..4c59dd642 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.js +++ b/tools/droiddoc/templates/assets/android-developer-docs.js @@ -434,43 +434,6 @@ function scrollIntoView(nav) { } } -function toggleAllInherited(linkObj, expand) { - var a = $(linkObj); - var table = $(a.parent().parent().parent()); - var expandos = $(".jd-expando-trigger", table); - if ( (expand == null && a.text() == "[Expand]") || expand ) { - expandos.each(function(i) { - toggleInherited(this, true); - }); - a.text("[Collapse]"); - } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) { - expandos.each(function(i) { - toggleInherited(this, false); - }); - a.text("[Expand]"); - } - return false; -} - -function toggleAllSummaryInherited(linkObj) { - var a = $(linkObj); - var content = $(a.parent().parent().parent()); - var toggles = $(".toggle-all", content); - if (a.text() == "[Expand All]") { - toggles.each(function(i) { - toggleAllInherited(this, true); - }); - a.text("[Collapse All]"); - } else { - toggles.each(function(i) { - toggleAllInherited(this, false); - }); - a.text("[Expand All]"); - } - return false; -} - - function changeTabLang(lang) { var nodes = $("#header-tabs").find("."+lang); for (i=0; i < nodes.length; i++) { // for each node in this language diff --git a/tools/droiddoc/templates/assets/android-developer-reference.js b/tools/droiddoc/templates/assets/android-developer-reference.js index 629959661..daddde08c 100644 --- a/tools/droiddoc/templates/assets/android-developer-reference.js +++ b/tools/droiddoc/templates/assets/android-developer-reference.js @@ -34,25 +34,25 @@ function buildApiLevelSelector() { $("#apiLevelCheckbox").attr("checked","checked"); $("#api-level-toggle label").removeClass("disabled"); } - + minLevel = $("body").attr("class"); var select = $("#apiLevelSelector").html("").change(changeApiLevel); for (var i = maxLevel-1; i >= 0; i--) { var option = $("