MCPcopy Create free account
hub / github.com/Simsys/qhexedit2 / makeTree

Function makeTree

doc/html/menu.js:26–46  ·  view source on GitHub ↗
(data,relPath)

Source from the content-addressed store, hash-verified

24 */
25function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
26 function makeTree(data,relPath) {
27 var result='';
28 if ('children' in data) {
29 result+='<ul>';
30 for (var i in data.children) {
31 var url;
32 var link;
33 link = data.children[i].url;
34 if (link.substring(0,1)=='^') {
35 url = link.substring(1);
36 } else {
37 url = relPath+link;
38 }
39 result+='<li><a href="'+url+'">'+
40 data.children[i].text+'</a>'+
41 makeTree(data.children[i],relPath)+'</li>';
42 }
43 result+='</ul>';
44 }
45 return result;
46 }
47 var searchBoxHtml;
48 if (searchEnabled) {
49 if (serverSide) {

Callers 1

initMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected