mirror of https://github.com/docker/docs.git
Remove references to toc.txt
This commit is contained in:
parent
4b05d07fb7
commit
d549e4c504
30
js/menu.js
30
js/menu.js
|
@ -1,26 +1,4 @@
|
|||
var tocData;
|
||||
var treeOutput = new Array();
|
||||
function renderTree(tree)
|
||||
{
|
||||
for (var i=0; i < tree.length; i++)
|
||||
{
|
||||
if (tree[i].heading)
|
||||
{
|
||||
// render a heading
|
||||
} else {
|
||||
if (tree[i].sectiontitle) {
|
||||
treeOutput.push('<li class="leaf menu-closed"><a href="#" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>' + tree[i].sectiontitle + '</a>');
|
||||
treeOutput.push('<ul class="nav-sub">');
|
||||
renderTree(tree[i].section);
|
||||
treeOutput.push('</ul>');
|
||||
} else {
|
||||
treeOutput.push('<li class="leaf"><a href="' + tree[i].path +'" class="');
|
||||
if (tree[i].path == window.location.pathname) treeOutput.push('active currentPage');
|
||||
treeOutput.push('">' + tree[i].title + '</a></li>');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function hookupTOCEvents()
|
||||
{
|
||||
// do after tree render
|
||||
|
@ -41,14 +19,6 @@ function hookupTOCEvents()
|
|||
});
|
||||
}
|
||||
jQuery(document).ready(function(){
|
||||
/*
|
||||
$.getJSON( "/toc.txt", function( data ) {
|
||||
tocData = data;
|
||||
renderTree(data.toc);
|
||||
$(".nav-sub").html(treeOutput.join(''));
|
||||
hookupTOCEvents();
|
||||
});
|
||||
*/
|
||||
hookupTOCEvents();
|
||||
$("#TableOfContents ul").empty();
|
||||
|
||||
|
|
Loading…
Reference in New Issue