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.h37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/navtree_js.h b/src/navtree_js.h
index c231b6b..63c104b 100644
--- a/src/navtree_js.h
+++ b/src/navtree_js.h
@@ -210,6 +210,21 @@
" }\n"
"}\n"
"\n"
+"function highlightAnchor()\n"
+"{\n"
+" var anchor = $($(location).attr('hash'));\n"
+" if (anchor.parent().attr('class')=='memItemLeft'){\n"
+" var rows = $('.memberdecls tr[class$=\\\"\"'+\n"
+" window.location.hash.substring(1)+'\"\\\"]').children();\n"
+" rows.effect('highlight',{},1500);\n"
+" } else if (anchor.parent().is(\":header\")) {\n"
+" anchor.parent().effect('highlight',{},1500);\n"
+" } else {\n"
+" var targetDiv = anchor.next();\n"
+" $(targetDiv).children('.memproto,.memdoc').effect(\"highlight\",{},1500);\n"
+" }\n"
+"}\n"
+"\n"
"function showNode(o, node, index)\n"
"{\n"
" if (node.childrenData && !node.expanded) {\n"
@@ -249,15 +264,12 @@
" if ($(location).attr('hash')) {\n"
" var link=stripPath($(location).attr('pathname'))+':'+\n"
" $(location).attr('hash').substring(1);\n"
-" a=$('.item a[class*=\\\"\"'+link+'\"\\\"]');\n"
+" a=$('.item a[class$=\\\"\"'+link+'\"\\\"]');\n"
" }\n"
" if (a && a.length) {\n"
" a.parent().parent().addClass('selected');\n"
" a.parent().parent().attr('id','selected');\n"
-" var anchor = $($(location).attr('hash'));\n"
-" var targetDiv = anchor.next();\n"
-" $(targetDiv).children('.memproto,.memdoc').\n"
-" effect(\"highlight\", {}, 1500);\n"
+" highlightAnchor();\n"
" } else {\n"
" $(n.itemDiv).addClass('selected');\n"
" $(n.itemDiv).attr('id','selected');\n"
@@ -302,7 +314,8 @@
" getScript(relpath+\"navtreeindex\",function(){\n"
" var navTreeIndex = eval('NAVTREEINDEX');\n"
" if (navTreeIndex) {\n"
-" o.breadcrumbs = navTreeIndex[toroot];\n"
+" var nti = navTreeIndex[toroot+window.location.hash];\n"
+" o.breadcrumbs = nti ? nti : navTreeIndex[toroot];\n"
" if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex[\"index.html\"];\n"
" o.breadcrumbs.unshift(0);\n"
" showNode(o, o.node, 0);\n"
@@ -311,20 +324,12 @@
"\n"
" $(window).bind('hashchange', function(){\n"
" if (window.location.hash && window.location.hash.length>1){\n"
-" var anchor = $(window.location.hash);\n"
-" if (anchor.parent().attr('class')=='memItemLeft'){\n"
-" var rows = $('.memberdecls tr[class$=\\\"\"'+\n"
-" window.location.hash.substring(1)+'\"\\\"]').children();\n"
-" rows.effect('highlight',{},1500);\n"
-" } else {\n"
-" var targetDiv = anchor.next();\n"
-" $(targetDiv).children('.memproto,.memdoc').effect(\"highlight\",{},1500);\n"
-" }\n"
+" highlightAnchor();\n"
" var a;\n"
" if ($(location).attr('hash')){\n"
" var link=stripPath($(location).attr('pathname'))+':'+\n"
" $(location).attr('hash').substring(1);\n"
-" a=$('.item a[class*=\\\"\"'+link+'\"\\\"]');\n"
+" a=$('.item a[class$=\\\"\"'+link+'\"\\\"]');\n"
" }\n"
" if (a && a.length){\n"
" $('.item').removeClass('selected');\n"