summaryrefslogtreecommitdiffstats
path: root/src/navtree_js.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/navtree_js.h')
-rw-r--r--src/navtree_js.h48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/navtree_js.h b/src/navtree_js.h
index 9f9e996..e243466 100644
--- a/src/navtree_js.h
+++ b/src/navtree_js.h
@@ -1,11 +1,10 @@
-"var navTreeIndex;\n"
"var navTreeSubIndices = new Array();\n"
"\n"
"function getData(varName)\n"
"{\n"
" var i = varName.lastIndexOf('/');\n"
" var n = i>=0 ? varName.substring(i+1) : varName;\n"
-" return eval(n);\n"
+" return eval(n.replace(/\\-/g,'_'));\n"
"}\n"
"\n"
"function stripPath(uri)\n"
@@ -246,11 +245,13 @@
" if (anchor.parent().attr('class')=='memItemLeft'){\n"
" var rows = $('.memberdecls tr[class$=\"'+\n"
" window.location.hash.substring(1)+'\"]');\n"
-" glowEffect(rows.children(),300);\n"
+" glowEffect(rows.children(),300); // member without details\n"
+" } else if (anchor.parents().slice(2).prop('tagName')=='TR') {\n"
+" glowEffect(anchor.parents('div.memitem'),1000); // enum value\n"
" } else if (anchor.parent().is(\":header\")) {\n"
-" glowEffect(anchor.parent(),1000);\n"
+" glowEffect(anchor.parent(),1000); // section header\n"
" } else {\n"
-" glowEffect(anchor.next(),1000);\n"
+" glowEffect(anchor.next(),1000); // normal member\n"
" }\n"
"}\n"
"\n"
@@ -329,52 +330,43 @@
" }\n"
"}\n"
"\n"
-"function gotoNode(o,subIndex,root,hash)\n"
+"function gotoNode(o,subIndex,root,hash,relpath)\n"
"{\n"
" var nti = navTreeSubIndices[subIndex][root+hash];\n"
" o.breadcrumbs = nti ? nti : navTreeSubIndices[subIndex][root];\n"
-" if (o.breadcrumbs)\n"
-" {\n"
+" if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index\n"
+" navTo(o,NAVTREE[0][1],\"\",relpath);\n"
+" $('.item').removeClass('selected');\n"
+" $('.item').removeAttr('id');\n"
+" }\n"
+" if (o.breadcrumbs) {\n"
" o.breadcrumbs.unshift(0); // add 0 for root node\n"
" showNode(o, o.node, 0);\n"
" }\n"
"}\n"
"\n"
-"function gotoSubIndex(o,root,hash,relpath)\n"
+"function navTo(o,root,hash,relpath)\n"
"{\n"
-" if (hash.match(/^#l\\d+$/)) \n"
-" {\n"
+" if (hash.match(/^#l\\d+$/)) {\n"
+" var anchor=$('a[name='+hash.substring(1)+']');\n"
+" glowEffect(anchor.parent(),1000); // line number\n"
" hash=''; // strip line number anchors\n"
" }\n"
" var url=root+hash;\n"
" var i=-1;\n"
-" while (navTreeIndex[i+1]<=url) i++;\n"
+" while (NAVTREEINDEX[i+1]<=url) i++;\n"
" if (navTreeSubIndices[i]) {\n"
-" gotoNode(o,i,root,hash)\n"
+" gotoNode(o,i,root,hash,relpath)\n"
" } else {\n"
" getScript(relpath+'navtreeindex'+i,function(){\n"
" navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);\n"
" if (navTreeSubIndices[i]) {\n"
-" gotoNode(o,i,root,hash);\n"
+" gotoNode(o,i,root,hash,relpath);\n"
" }\n"
" },true);\n"
" }\n"
"}\n"
"\n"
-"function navTo(o,root,hash,relpath)\n"
-"{\n"
-" if (navTreeIndex){\n"
-" gotoSubIndex(o,root,hash,relpath);\n"
-" } else {\n"
-" getScript(relpath+\"navtreeindex\",function(){\n"
-" navTreeIndex = eval('NAVTREEINDEX');\n"
-" if (navTreeIndex){\n"
-" gotoSubIndex(o,root,hash,relpath);\n"
-" }\n"
-" },true);\n"
-" } \n"
-"}\n"
-"\n"
"function initNavTree(toroot,relpath)\n"
"{\n"
" var o = new Object();\n"