Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bd6c862 authored by Scott Main's avatar Scott Main Committed by Android Git Automerger
Browse files

am 3556305e: Merge "docs: hide the "back to top" link when there\'s no...

am 3556305e: Merge "docs: hide the "back to top" link when there\'s no vertical scroll also use local variables for DOM objects (in a slow effort to eventually remove all non-essential global vars)" into eclair

Merge commit '3556305e' into eclair-plus-aosp

* commit '3556305e':
  docs: hide the "back to top" link when there's no vertical scroll
parents acbbba88 3556305e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -220,10 +220,12 @@ function resizePackagesHeight() {
/* Resize the height of the side-nav and doc-content divs,
 * which creates the frame effect */
function resizeHeight() {
  var docContent = $("#doc-content");

  // Get the window height and always resize the doc-content and side-nav divs
  var windowHeight = ($(window).height() - HEADER_HEIGHT);
  content.css({height:windowHeight + "px"});
  sidenav.css({height:windowHeight + "px"});
  docContent.css({height:windowHeight + "px"});
  $("#side-nav").css({height:windowHeight + "px"});

  var href = location.href;
  // If in the reference docs, also resize the "swapper", "classes-nav", and "nav-tree"  divs
@@ -239,6 +241,13 @@ function resizeHeight() {
  } else if (href.indexOf("/resources/") != -1) {
    $("#devdoc-nav").css({height:sidenav.css("height")});
  }

  // Hide the "Go to top" link if there's no vertical scroll
  if ( parseInt($("#jd-content").css("height")) <= parseInt(docContent.css("height")) ) {
    $("a[href='#top']").css({'display':'none'});
  } else {
    $("a[href='#top']").css({'display':'inline'});
  }
}

/* Resize the width of the "side-nav" and the left margin of the "doc-content" div,