summaryrefslogtreecommitdiff
path: root/docs/navtree.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/navtree.js')
-rw-r--r--docs/navtree.js50
1 files changed, 28 insertions, 22 deletions
diff --git a/docs/navtree.js b/docs/navtree.js
index e6d31b0..9df45a7 100644
--- a/docs/navtree.js
+++ b/docs/navtree.js
@@ -1,6 +1,4 @@
var navTreeSubIndices = new Array();
-var arrowDown = '▼';
-var arrowRight = '►';
function getData(varName)
{
@@ -73,17 +71,17 @@ function cachedLink()
function getScript(scriptName,func,show)
{
- var head = document.getElementsByTagName("head")[0];
+ var head = document.getElementsByTagName("head")[0];
var script = document.createElement('script');
script.id = scriptName;
script.type = 'text/javascript';
- script.onload = func;
- script.src = scriptName+'.js';
- if ($.browser.msie && $.browser.version<=8) {
+ script.onload = func;
+ script.src = scriptName+'.js';
+ if ($.browser.msie && $.browser.version<=8) {
// script.onload does not work with older versions of IE
script.onreadystatechange = function() {
- if (script.readyState=='complete' || script.readyState=='loaded') {
- func(); if (show) showRoot();
+ if (script.readyState=='complete' || script.readyState=='loaded') {
+ func(); if (show) showRoot();
}
}
}
@@ -96,17 +94,18 @@ function createIndent(o,domNode,node,level)
var n = node;
while (n.parentNode) { level++; n=n.parentNode; }
if (node.childrenData) {
- var imgNode = document.createElement("span");
- imgNode.className = 'arrow';
+ var imgNode = document.createElement("img");
imgNode.style.paddingLeft=(16*level).toString()+'px';
- imgNode.innerHTML=arrowRight;
+ imgNode.width = 16;
+ imgNode.height = 22;
+ imgNode.border = 0;
node.plus_img = imgNode;
node.expandToggle = document.createElement("a");
node.expandToggle.href = "javascript:void(0)";
node.expandToggle.onclick = function() {
if (node.expanded) {
$(node.getChildrenUL()).slideUp("fast");
- node.plus_img.innerHTML=arrowRight;
+ node.plus_img.src = node.relpath+"arrowright.png";
node.expanded = false;
} else {
expandNode(o, node, false, false);
@@ -114,13 +113,15 @@ function createIndent(o,domNode,node,level)
}
node.expandToggle.appendChild(imgNode);
domNode.appendChild(node.expandToggle);
+ imgNode.src = node.relpath+"arrowright.png";
} else {
var span = document.createElement("span");
- span.className = 'arrow';
+ span.style.display = 'inline-block';
span.style.width = 16*(level+1)+'px';
+ span.style.height = '22px';
span.innerHTML = '&#160;';
domNode.appendChild(span);
- }
+ }
}
var animationInProgress = false;
@@ -194,7 +195,7 @@ function newNode(o, po, text, link, childrenData, lastNode)
var aname = '#'+link.split('#')[1];
var srcPage = stripPath(pathName());
var targetPage = stripPath(link.split('#')[0]);
- a.href = srcPage!=targetPage ? url : "javascript:void(0)";
+ a.href = srcPage!=targetPage ? url : "javascript:void(0)";
a.onclick = function(){
storeLink(link);
if (!$(a).parent().parent().hasClass('selected'))
@@ -212,7 +213,7 @@ function newNode(o, po, text, link, childrenData, lastNode)
a.onclick = function() { storeLink(link); }
}
} else {
- if (childrenData != null)
+ if (childrenData != null)
{
a.className = "nolink";
a.href = "javascript:void(0)";
@@ -261,13 +262,17 @@ function expandNode(o, node, imm, showRoot)
} else {
if (!node.childrenVisited) {
getNode(o, node);
- } if (imm || ($.browser.msie && $.browser.version>8)) {
+ } if (imm || ($.browser.msie && $.browser.version>8)) {
// somehow slideDown jumps to the start of tree for IE9 :-(
$(node.getChildrenUL()).show();
} else {
$(node.getChildrenUL()).slideDown("fast");
}
- node.plus_img.innerHTML = arrowDown;
+ if (node.isLast) {
+ node.plus_img.src = node.relpath+"arrowdown.png";
+ } else {
+ node.plus_img.src = node.relpath+"arrowdown.png";
+ }
node.expanded = true;
}
}
@@ -336,7 +341,7 @@ function showNode(o, node, index, hash)
getNode(o, node);
}
$(node.getChildrenUL()).css({'display':'block'});
- node.plus_img.innerHTML = arrowDown;
+ node.plus_img.src = node.relpath+"arrowdown.png";
node.expanded = true;
var n = node.children[o.breadcrumbs[index]];
if (index+1<o.breadcrumbs.length) {
@@ -473,9 +478,10 @@ function initNavTree(toroot,relpath)
o.node.relpath = relpath;
o.node.expanded = false;
o.node.isLast = true;
- o.node.plus_img = document.createElement("span");
- o.node.plus_img.className = 'arrow';
- o.node.plus_img.innerHTML = arrowRight;
+ o.node.plus_img = document.createElement("img");
+ o.node.plus_img.src = relpath+"arrowright.png";
+ o.node.plus_img.width = 16;
+ o.node.plus_img.height = 22;
if (localStorageSupported()) {
var navSync = $('#nav-sync');