mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-17 10:11:43 +00:00
Deploying to gh-pages from @ EnderIce2/Fennix@2bb997597e 🚀
This commit is contained in:
@@ -94,7 +94,7 @@ function cachedLink()
|
||||
}
|
||||
}
|
||||
|
||||
function getScript(scriptName,func,show)
|
||||
function getScript(scriptName,func)
|
||||
{
|
||||
var head = document.getElementsByTagName("head")[0];
|
||||
var script = document.createElement('script');
|
||||
@@ -124,7 +124,7 @@ function createIndent(o,domNode,node,level)
|
||||
node.plus_img.innerHTML=arrowRight;
|
||||
node.expanded = false;
|
||||
} else {
|
||||
expandNode(o, node, false, false);
|
||||
expandNode(o, node, false, true);
|
||||
}
|
||||
}
|
||||
node.expandToggle.appendChild(imgNode);
|
||||
@@ -265,15 +265,15 @@ function showRoot()
|
||||
})();
|
||||
}
|
||||
|
||||
function expandNode(o, node, imm, showRoot)
|
||||
function expandNode(o, node, imm, setFocus)
|
||||
{
|
||||
if (node.childrenData && !node.expanded) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
expandNode(o, node, imm, showRoot);
|
||||
}, showRoot);
|
||||
expandNode(o, node, imm, setFocus);
|
||||
});
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
@@ -281,6 +281,9 @@ function expandNode(o, node, imm, showRoot)
|
||||
$(node.getChildrenUL()).slideDown("fast");
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
if (setFocus) {
|
||||
$(node.expandToggle).focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -325,11 +328,14 @@ function selectAndHighlight(hash,n)
|
||||
$(n.itemDiv).addClass('selected');
|
||||
$(n.itemDiv).attr('id','selected');
|
||||
}
|
||||
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
|
||||
$('#nav-sync').css('top','30px');
|
||||
} else {
|
||||
$('#nav-sync').css('top','5px');
|
||||
var topOffset=5;
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
topOffset+=$('#top').outerHeight();
|
||||
}
|
||||
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
|
||||
topOffset+=25;
|
||||
}
|
||||
$('#nav-sync').css('top',topOffset+'px');
|
||||
showRoot();
|
||||
}
|
||||
|
||||
@@ -341,7 +347,7 @@ function showNode(o, node, index, hash)
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
showNode(o,node,index,hash);
|
||||
},true);
|
||||
});
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
@@ -359,11 +365,11 @@ function showNode(o, node, index, hash)
|
||||
n.childrenData = getData(varName);
|
||||
node.expanded=false;
|
||||
showNode(o,node,index,hash); // retry with child node expanded
|
||||
},true);
|
||||
});
|
||||
} else {
|
||||
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
|
||||
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
|
||||
expandNode(o, n, true, true);
|
||||
expandNode(o, n, true, false);
|
||||
}
|
||||
selectAndHighlight(hash,n);
|
||||
}
|
||||
@@ -441,7 +447,7 @@ function navTo(o,root,hash,relpath)
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath);
|
||||
}
|
||||
},true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,5 +548,12 @@ function initNavTree(toroot,relpath)
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
}
|
||||
})
|
||||
|
||||
$("div.toc a[href]").click(function(e) {
|
||||
e.preventDefault();
|
||||
var docContent = $('#doc-content');
|
||||
var aname = $(this).attr("href");
|
||||
gotoAnchor($(aname),aname,true);
|
||||
})
|
||||
}
|
||||
/* @license-end */
|
||||
|
Reference in New Issue
Block a user