Repository: spark Updated Branches: refs/heads/master fbedc8eff -> c86eec584
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 <[email protected]> Closes #3 from mateiz/doc-links and squashes the following commits: e2a3488 [Matei Zaharia] SPARK-1135: fix broken anchors in docs Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c86eec58 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c86eec58 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c86eec58 Branch: refs/heads/master Commit: c86eec584312072e73754a4f1cbe34d2e1968c77 Parents: fbedc8e Author: Matei Zaharia <[email protected]> Authored: Wed Feb 26 11:20:16 2014 -0800 Committer: Aaron Davidson <[email protected]> Committed: Wed Feb 26 11:20:16 2014 -0800 ---------------------------------------------------------------------- docs/js/main.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/c86eec58/docs/js/main.js ---------------------------------------------------------------------- diff --git a/docs/js/main.js b/docs/js/main.js index 1026997..0bd2286 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(); });
