diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-06-10 09:28:22 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-06-10 09:28:22 (GMT) |
commit | 0ce3aea886f4e95da56d164b3944fd54d3d68f89 (patch) | |
tree | 6709ddc7b1764dc3b20bbac7eb36c05edcc91e03 /src/navtree.js | |
parent | 1983c30b71bf92b3fa6bfedbb98451c3b7f74498 (diff) | |
download | Doxygen-0ce3aea886f4e95da56d164b3944fd54d3d68f89.zip Doxygen-0ce3aea886f4e95da56d164b3944fd54d3d68f89.tar.gz Doxygen-0ce3aea886f4e95da56d164b3944fd54d3d68f89.tar.bz2 |
Release-1.8.1.1
Diffstat (limited to 'src/navtree.js')
-rw-r--r-- | src/navtree.js | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/src/navtree.js b/src/navtree.js index edaaee3..1b4931c 100644 --- a/src/navtree.js +++ b/src/navtree.js @@ -1,11 +1,10 @@ -var navTreeIndex; var navTreeSubIndices = new Array(); function getData(varName) { var i = varName.lastIndexOf('/'); var n = i>=0 ? varName.substring(i+1) : varName; - return eval(n); + return eval(n.replace(/\-/g,'_')); } function stripPath(uri) @@ -246,11 +245,13 @@ function highlightAnchor() if (anchor.parent().attr('class')=='memItemLeft'){ var rows = $('.memberdecls tr[class$="'+ window.location.hash.substring(1)+'"]'); - glowEffect(rows.children(),300); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parents().slice(2).prop('tagName')=='TR') { + glowEffect(anchor.parents('div.memitem'),1000); // enum value } else if (anchor.parent().is(":header")) { - glowEffect(anchor.parent(),1000); + glowEffect(anchor.parent(),1000); // section header } else { - glowEffect(anchor.next(),1000); + glowEffect(anchor.next(),1000); // normal member } } @@ -329,52 +330,43 @@ function getNode(o, po) } } -function gotoNode(o,subIndex,root,hash) +function gotoNode(o,subIndex,root,hash,relpath) { var nti = navTreeSubIndices[subIndex][root+hash]; o.breadcrumbs = nti ? nti : navTreeSubIndices[subIndex][root]; - if (o.breadcrumbs) - { + if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index + navTo(o,NAVTREE[0][1],"",relpath); + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + } + if (o.breadcrumbs) { o.breadcrumbs.unshift(0); // add 0 for root node showNode(o, o.node, 0); } } -function gotoSubIndex(o,root,hash,relpath) +function navTo(o,root,hash,relpath) { - if (hash.match(/^#l\d+$/)) - { + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number hash=''; // strip line number anchors } var url=root+hash; var i=-1; - while (navTreeIndex[i+1]<=url) i++; + while (NAVTREEINDEX[i+1]<=url) i++; if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash) + gotoNode(o,i,root,hash,relpath) } else { getScript(relpath+'navtreeindex'+i,function(){ navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash); + gotoNode(o,i,root,hash,relpath); } },true); } } -function navTo(o,root,hash,relpath) -{ - if (navTreeIndex){ - gotoSubIndex(o,root,hash,relpath); - } else { - getScript(relpath+"navtreeindex",function(){ - navTreeIndex = eval('NAVTREEINDEX'); - if (navTreeIndex){ - gotoSubIndex(o,root,hash,relpath); - } - },true); - } -} - function initNavTree(toroot,relpath) { var o = new Object(); |