Index: branches/5.1.x/core/admin_templates/js/tree.js =================================================================== diff -u -r12657 -r13401 --- branches/5.1.x/core/admin_templates/js/tree.js (.../tree.js) (revision 12657) +++ branches/5.1.x/core/admin_templates/js/tree.js (.../tree.js) (revision 13401) @@ -1,7 +1,7 @@ var last_hightlighted = null; var last_highlighted_key = null; -function TreeItem(title, url, icon, onclick, priority) +function TreeItem(title, url, icon, onclick, priority, debug_only) { this.Title = title; this.Url = url; @@ -11,6 +11,7 @@ this.Icon = icon; this.Onclick = onclick; this.Priority = isset(priority) ? priority : false; + this.debugOnly = isset(debug_only) ? debug_only : false; this.Children = false; } @@ -106,6 +107,11 @@ link = document.createElement('a'); link.nodeValue = this.Title; + + if (this.debugOnly) { + link.className = 'debug-only-item'; + } + link.href = this.Url; link.target = 'main'; link.appendChild($node_text); @@ -289,7 +295,7 @@ /* FOLDER */ -function TreeFolder(parent_id, title, url, icon, late_load_url, onclick, priority, container) +function TreeFolder(parent_id, title, url, icon, late_load_url, onclick, priority, container, debug_only) { var render = false; if (isset(parent_id)) { @@ -313,6 +319,7 @@ this.Loaded = false; this.Onclick = onclick; this.Priority = isset(priority) ? priority : false; + this.debugOnly = isset(debug_only) ? debug_only : false; this.Container = isset(container) ? parseInt(container) : false; this.Children = new Array(); @@ -437,14 +444,14 @@ child = node.childNodes.item(i); if (child.tagName == 'folder') { var backupLastFolder = this.LastFolder; - this.LastFolder = this.LastFolder.AddItem(new TreeFolder(null, child.getAttribute('name'), child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('load_url'), child.getAttribute('onclick'), child.getAttribute('priority'), child.getAttribute('container')), render); + this.LastFolder = this.LastFolder.AddItem(new TreeFolder(null, child.getAttribute('name'), child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('load_url'), child.getAttribute('onclick'), child.getAttribute('priority'), child.getAttribute('container'), child.getAttribute('debug_only')), render); if (child.hasChildNodes) { this.ProcessXMLNode(child); } this.LastFolder = backupLastFolder; } else if (child.tagName == 'item') { - this.LastFolder.AddItem(new TreeItem(child.firstChild.nodeValue, child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('onclick'), child.getAttribute('priority')), render) + this.LastFolder.AddItem(new TreeItem(child.firstChild.nodeValue, child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('onclick'), child.getAttribute('priority'), child.getAttribute('debug_only')), render) } else if (child.tagName == 'tree') { this.LastFolder = this;