Index: trunk/core/admin_templates/js/tree.js =================================================================== diff -u -N -r7391 -r7635 --- trunk/core/admin_templates/js/tree.js (.../tree.js) (revision 7391) +++ trunk/core/admin_templates/js/tree.js (.../tree.js) (revision 7635) @@ -1,7 +1,7 @@ var last_hightlighted = null; var last_highlighted_key = null; -function TreeItem(title, url, icon, onclick) +function TreeItem(title, url, icon, onclick, priority) { this.Title = title; this.Url = url; @@ -10,6 +10,7 @@ this.Level = 0; this.Icon = icon; this.Onclick = onclick; + this.Priority = isset(priority) ? priority : false; this.Children = false; } @@ -83,6 +84,9 @@ { var $node_text = document.createElement('span'); $node_text.innerHTML = this.Title; + if (TREE_SHOW_PRIORITY && this.Priority !== false) { + $node_text.innerHTML += '' + this.Priority + ''; + } link = document.createElement('a'); link.nodeValue = this.Title; @@ -240,7 +244,7 @@ /* FOLDER */ -function TreeFolder(parent_id, title, url, icon, late_load_url, onclick) +function TreeFolder(parent_id, title, url, icon, late_load_url, onclick, priority) { var render = false; if (isset(parent_id)) { @@ -264,6 +268,7 @@ this.LateLoadURL = isset(late_load_url) ? late_load_url : false; this.Loaded = false; this.Onclick = onclick; + this.Priority = isset(priority) ? priority : false; this.Children = new Array(); this.ChildIndex = 0; @@ -374,14 +379,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')), 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')), 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')), render) + this.LastFolder.AddItem(new TreeItem(child.firstChild.nodeValue, child.getAttribute('href'), child.getAttribute('icon'), child.getAttribute('onclick'), child.getAttribute('priority')), render) } else if (child.tagName == 'tree') { this.LastFolder = this;