diff options
Diffstat (limited to 'tools/droiddoc/templates/assets/android-developer-docs.js')
-rw-r--r-- | tools/droiddoc/templates/assets/android-developer-docs.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates/assets/android-developer-docs.js index cd9c0b3..a84d5a6 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.js +++ b/tools/droiddoc/templates/assets/android-developer-docs.js @@ -102,7 +102,7 @@ function init() { var cookieHeight = getCookie(cookiePath+'height'); if (cookieWidth) { restoreWidth(cookieWidth); - } else { + } else if ($(".side-nav-resizable").length) { resizeWidth(); } if (cookieHeight) { @@ -127,7 +127,8 @@ function highlightNav(fullPageName) { var htmlPos = fullPageName.lastIndexOf(".html", fullPageName.length); var pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5); var link = $("#devdoc-nav a[href$='"+ pathPageName+"']"); - if ((link.length == 0) && (fullPageName.indexOf("/guide/") != -1)) { // if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide) + if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) || (fullPageName.indexOf("/sdk/") != -1))) { +// if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide and sdk) lastBackstep = pathPageName.lastIndexOf("/"); while (link.length == 0) { backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep); @@ -175,7 +176,9 @@ function resizeWidth() { function resizeAll() { resizeHeight(); - resizeWidth(); + if ($(".side-nav-resizable").length) { + resizeWidth(); + } } function loadLast(cookiePath) { |