diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index 0b0a3756f..6fec693dc 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -5,9 +5,11 @@ var cookie_namespace = 'android_developer'; var NAV_PREF_TREE = "tree"; var NAV_PREF_PANELS = "panels"; var nav_pref; -var toRoot; var isMobile = false; // true if mobile, so we can adjust some layout +var basePath = getBaseUri(location.pathname); +var SITE_ROOT = toRoot + basePath.substring(1,basePath.indexOf("/",1)); + /****** ON LOAD SET UP STUFF *********/ @@ -30,7 +32,7 @@ $(document).ready(function() { // set search's onkeyup handler here so we can show suggestions // even while search results are visible - $("#search_autocomplete").keyup(function() {return search_changed(event, false, '/')}); + $("#search_autocomplete").keyup(function() {return search_changed(event, false, toRoot)}); // set up the search close button $('.search .close').click(function() { @@ -526,11 +528,6 @@ addLoadEvent( function() { prettyPrint(); } ); -function setToRoot(root) { - toRoot = root; - // note: toRoot also used by carousel.js -} - function init() { //resizeNav(); diff --git a/tools/droiddoc/templates-sdk/assets/js/search_autocomplete.js b/tools/droiddoc/templates-sdk/assets/js/search_autocomplete.js index 1838ccbd9..6b1e525ac 100644 --- a/tools/droiddoc/templates-sdk/assets/js/search_autocomplete.js +++ b/tools/droiddoc/templates-sdk/assets/js/search_autocomplete.js @@ -473,7 +473,7 @@ function hideResults() { // forcefully regain key-up event control (previously jacked by search api) $("#search_autocomplete").keyup(function(event) { - return search_changed(event, false, '/'); + return search_changed(event, false, toRoot); }); // add event listeners to each tab so we can track the browser history diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs index 2003e15fc..39293fbb7 100644 --- a/tools/droiddoc/templates-sdk/components/masthead.cs +++ b/tools/droiddoc/templates-sdk/components/masthead.cs @@ -66,8 +66,8 @@
close diff --git a/tools/droiddoc/templates-sdk/head_tag.cs b/tools/droiddoc/templates-sdk/head_tag.cs index 3f91ad3b8..d03f6f464 100644 --- a/tools/droiddoc/templates-sdk/head_tag.cs +++ b/tools/droiddoc/templates-sdk/head_tag.cs @@ -11,7 +11,7 @@ +href="http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto"> @@ -28,6 +28,9 @@ type="text/css"> + @@ -36,7 +39,7 @@ type="text/css"> - + @@ -48,10 +51,5 @@ type="text/css"> - \ No newline at end of file