diff options
author | Matei Zaharia <matei@databricks.com> | 2014-02-26 11:20:16 -0800 |
---|---|---|
committer | Aaron Davidson <aaron@databricks.com> | 2014-02-26 11:20:16 -0800 |
commit | c86eec584312072e73754a4f1cbe34d2e1968c77 (patch) | |
tree | f5f73955e9970a4c2cc3ca14e65c67c6cd52d15d /docs/js/main.js | |
parent | fbedc8eff2573b31320ad1b11a1826a2e530c16c (diff) | |
download | spark-c86eec584312072e73754a4f1cbe34d2e1968c77.tar.gz spark-c86eec584312072e73754a4f1cbe34d2e1968c77.tar.bz2 spark-c86eec584312072e73754a4f1cbe34d2e1968c77.zip |
SPARK-1135: fix broken anchors in docs
A recent PR that added Java vs Scala tabs for streaming also
inadvertently added some bad code to a document.ready handler, breaking
our other handler that manages scrolling to anchors correctly with the
floating top bar. As a result the section title ended up always being
hidden below the top bar. This removes the unnecessary JavaScript code.
Author: Matei Zaharia <matei@databricks.com>
Closes #3 from mateiz/doc-links and squashes the following commits:
e2a3488 [Matei Zaharia] SPARK-1135: fix broken anchors in docs
Diffstat (limited to 'docs/js/main.js')
-rwxr-xr-x | docs/js/main.js | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/docs/js/main.js b/docs/js/main.js index 102699789a..0bd2286cce 100755 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -1,26 +1,3 @@ - -// From docs.scala-lang.org -function styleCode() { - if (typeof disableStyleCode != "undefined") { - return; - } - $(".codetabs pre code").parent().each(function() { - if (!$(this).hasClass("prettyprint")) { - var lang = $(this).parent().data("lang"); - if (lang == "python") { - lang = "py" - } - if (lang == "bash") { - lang = "bsh" - } - $(this).addClass("prettyprint lang-"+lang+" linenums"); - } - }); - console.log("runningPrettyPrint()") - prettyPrint(); -} - - function codeTabs() { var counter = 0; var langImages = { @@ -97,11 +74,7 @@ function viewSolution() { } -$(document).ready(function() { +$(function() { codeTabs(); viewSolution(); - $('#chapter-toc').toc({exclude: '', context: '.container'}); - $('#chapter-toc').prepend('<p class="chapter-toc-header">In This Chapter</p>'); - makeCollapsable($('#global-toc'), "", "global-toc", "Show Table of Contents"); - //styleCode(); }); |