From dd51ec0f1fadd719f5ee298c1c40890f6db1815b Mon Sep 17 00:00:00 2001 From: TravisBot <> Date: Thu, 12 Oct 2017 13:59:45 +0000 Subject: Rebuilding documentation --- navtree.js | 156 ++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 98 insertions(+), 58 deletions(-) (limited to 'navtree.js') diff --git a/navtree.js b/navtree.js index e6d31b00..bdf2066a 100644 --- a/navtree.js +++ b/navtree.js @@ -1,6 +1,48 @@ +var NAVTREE = +[ + [ "YAGE", "index.html", [ + [ "Physics Engine", "md_yage_physics_README.html", null ], + [ "Todo List", "todo.html", null ], + [ "Deprecated List", "deprecated.html", null ], + [ "Bug List", "bug.html", null ], + [ "Namespaces", null, [ + [ "Namespace List", "namespaces.html", "namespaces" ], + [ "Namespace Members", "namespacemembers.html", [ + [ "All", "namespacemembers.html", null ], + [ "Functions", "namespacemembers_func.html", null ], + [ "Typedefs", "namespacemembers_type.html", null ], + [ "Enumerations", "namespacemembers_enum.html", null ], + [ "Enumerator", "namespacemembers_eval.html", null ] + ] ] + ] ], + [ "Classes", null, [ + [ "Class List", "annotated.html", "annotated" ], + [ "Class Index", "classes.html", null ], + [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], + [ "Class Members", "functions.html", [ + [ "All", "functions.html", "functions_dup" ], + [ "Functions", "functions_func.html", null ], + [ "Variables", "functions_vars.html", null ], + [ "Related Functions", "functions_rela.html", null ] + ] ] + ] ], + [ "Files", null, [ + [ "File List", "files.html", "files" ] + ] ] + ] ] +]; + +var NAVTREEINDEX = +[ +"annotated.html", +"functions_n.html" +]; + +var SYNCONMSG = 'click to disable panel synchronisation'; +var SYNCOFFMSG = 'click to enable panel synchronisation'; +var SYNCONMSG = 'click to disable panel synchronisation'; +var SYNCOFFMSG = 'click to enable panel synchronisation'; var navTreeSubIndices = new Array(); -var arrowDown = '▼'; -var arrowRight = '►'; function getData(varName) { @@ -22,21 +64,6 @@ function stripPath2(uri) return m ? uri.substring(i-6) : s; } -function hashValue() -{ - return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); -} - -function hashUrl() -{ - return '#'+hashValue(); -} - -function pathName() -{ - return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); -} - function localStorageSupported() { try { @@ -59,7 +86,7 @@ function deleteLink() { if (localStorageSupported()) { window.localStorage.setItem('navpath',''); - } + } } function cachedLink() @@ -73,17 +100,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 +123,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+"ftv2pnode.png"; node.expanded = false; } else { expandNode(o, node, false, false); @@ -114,13 +142,15 @@ function createIndent(o,domNode,node,level) } node.expandToggle.appendChild(imgNode); domNode.appendChild(node.expandToggle); + imgNode.src = node.relpath+"ftv2pnode.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 = ' '; domNode.appendChild(span); - } + } } var animationInProgress = false; @@ -128,13 +158,11 @@ var animationInProgress = false; function gotoAnchor(anchor,aname,updateLocation) { var pos, docContent = $('#doc-content'); - var ancParent = $(anchor.parent()); - if (ancParent.hasClass('memItemLeft') || - ancParent.hasClass('fieldname') || - ancParent.hasClass('fieldtype') || - ancParent.is(':header')) + if (anchor.parent().attr('class')=='memItemLeft' || + anchor.parent().attr('class')=='fieldtype' || + anchor.parent().is(':header')) { - pos = ancParent.position().top; + pos = anchor.parent().position().top; } else if (anchor.position()) { pos = anchor.position().top; } @@ -192,9 +220,9 @@ function newNode(o, po, text, link, childrenData, lastNode) a.className = stripPath(link.replace('#',':')); if (link.indexOf('#')!=-1) { var aname = '#'+link.split('#')[1]; - var srcPage = stripPath(pathName()); + var srcPage = stripPath($(location).attr('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 +240,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 +289,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+"ftv2mlastnode.png"; + } else { + node.plus_img.src = node.relpath+"ftv2mnode.png"; + } node.expanded = true; } } @@ -282,13 +314,14 @@ function glowEffect(n,duration) function highlightAnchor() { - var aname = hashUrl(); + var aname = $(location).attr('hash'); var anchor = $(aname); if (anchor.parent().attr('class')=='memItemLeft'){ - var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + var rows = $('.memberdecls tr[class$="'+ + window.location.hash.substring(1)+'"]'); glowEffect(rows.children(),300); // member without details - } else if (anchor.parent().attr('class')=='fieldname'){ - glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parents().slice(2).prop('tagName')=='TR') { + glowEffect(anchor.parents('div.memitem'),1000); // enum value } else if (anchor.parent().attr('class')=='fieldtype'){ glowEffect(anchor.parent().parent(),1000); // struct field } else if (anchor.parent().is(":header")) { @@ -303,7 +336,7 @@ function selectAndHighlight(hash,n) { var a; if (hash) { - var link=stripPath(pathName())+':'+hash.substring(1); + var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1); a=$('.item a[class$="'+link+'"]'); } if (a && a.length) { @@ -336,7 +369,11 @@ function showNode(o, node, index, hash) getNode(o, node); } $(node.getChildrenUL()).css({'display':'block'}); - node.plus_img.innerHTML = arrowDown; + if (node.isLast) { + node.plus_img.src = node.relpath+"ftv2mlastnode.png"; + } else { + node.plus_img.src = node.relpath+"ftv2mnode.png"; + } node.expanded = true; var n = node.children[o.breadcrumbs[index]]; if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + if (parts.length>1) hash = '#'+parts[1]; else hash=''; } if (hash.match(/^#l\d+$/)) { var anchor=$('a[name='+hash.substring(1)+']'); glowEffect(anchor.parent(),1000); // line number hash=''; // strip line number anchors + //root=root.replace(/_source\./,'.'); // source link to doc link } var url=root+hash; var i=-1; @@ -450,7 +488,7 @@ function toggleSyncButton(relpath) if (navSync.hasClass('sync')) { navSync.removeClass('sync'); showSyncOff(navSync,relpath); - storeLink(stripPath2(pathName())+hashUrl()); + storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash')); } else { navSync.addClass('sync'); showSyncOn(navSync,relpath); @@ -473,9 +511,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+"ftv2pnode.png"; + o.node.plus_img.width = 16; + o.node.plus_img.height = 22; if (localStorageSupported()) { var navSync = $('#nav-sync'); @@ -489,7 +528,7 @@ function initNavTree(toroot,relpath) } $(window).load(function(){ - navTo(o,toroot,hashUrl(),relpath); + navTo(o,toroot,window.location.hash,relpath); showRoot(); }); @@ -497,20 +536,21 @@ function initNavTree(toroot,relpath) if (window.location.hash && window.location.hash.length>1){ var a; if ($(location).attr('hash')){ - var clslink=stripPath(pathName())+':'+hashValue(); - a=$('.item a[class$="'+clslink.replace(/