diff options
author | Scott Main <smain@google.com> | 2010-01-06 14:18:02 -0800 |
---|---|---|
committer | Scott Main <smain@google.com> | 2010-01-06 14:33:20 -0800 |
commit | a39d3bb0c9001c79f93ae829d564e5fef27a573a (patch) | |
tree | a3b71b2711511083bfa427ac3d744715f0879545 /tools/droiddoc/templates/assets/android-developer-docs.js | |
parent | 1e43c510758439b3195597056121c59b71481254 (diff) | |
download | build-a39d3bb0c9001c79f93ae829d564e5fef27a573a.tar.gz build-a39d3bb0c9001c79f93ae829d564e5fef27a573a.tar.bz2 build-a39d3bb0c9001c79f93ae829d564e5fef27a573a.zip |
docs: fix resizeAll script for IE6 so that the resizeWidth function
is only called when the side navigation is actually resizable
This stops 'width' cookies from being written for the SDK docs
(and any other page that doesn't have resizable nav) and also adds
some security to the init() function to be sure we properly read
cookie names.
Diffstat (limited to 'tools/droiddoc/templates/assets/android-developer-docs.js')
-rw-r--r-- | tools/droiddoc/templates/assets/android-developer-docs.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates/assets/android-developer-docs.js index 08e47fad6..f4da4626a 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.js +++ b/tools/droiddoc/templates/assets/android-developer-docs.js @@ -136,12 +136,13 @@ function init() { sidenav = $("#side-nav"); devdocNav = $("#devdoc-nav"); + var cookiePath = ""; if (location.href.indexOf("/reference/") != -1) { - var cookiePath = "reference_"; + cookiePath = "reference_"; } else if (location.href.indexOf("/guide/") != -1) { - var cookiePath = "guide_"; + cookiePath = "guide_"; } else if (location.href.indexOf("/resources/") != -1) { - var cookiePath = "resources_"; + cookiePath = "resources_"; } if (!isMobile) { @@ -269,7 +270,9 @@ function resizeWidth() { * avoiding this for all browsers provides better performance */ function resizeAll() { resizeHeight(); - resizeWidth(); + if ($(".side-nav-resizable").length) { + resizeWidth(); + } } function getBaseUri(uri) { |