Index: branches/RC/core/admin_templates/js/tree.js =================================================================== diff -u -r9045 -r9242 --- branches/RC/core/admin_templates/js/tree.js (.../tree.js) (revision 9045) +++ branches/RC/core/admin_templates/js/tree.js (.../tree.js) (revision 9242) @@ -198,8 +198,17 @@ } } -TreeItem.prototype.expand = function() { this.display() } +TreeItem.prototype.expandParentNode = function() { + if (this.ParentFolder != null && !this.ParentFolder.Expanded) { + this.ParentFolder.expand(); + } +} +TreeItem.prototype.expand = function() { + this.expandParentNode(); + this.display(); +} + TreeItem.prototype.collapse = function() { this.hide() } TreeItem.prototype.updateLastNodes = function(is_last, lines_pattern) @@ -279,7 +288,6 @@ } else { - } this.Title = title; @@ -542,6 +550,8 @@ } this.Expanding = true; + this.expandParentNode(); + if (!isset(mode)) mode = 0; this.display(); if (mode == 0 || this.Expanded ) { @@ -584,7 +594,7 @@ function TreeManager() {} -TreeManager.ExpandStatus = []; +TreeManager.ExpandStatus = new Array (); TreeManager.markStatus = function(id, status) { @@ -616,20 +626,18 @@ document.cookie = 'TreeExpandStatus=' + cookieString.join(':'); } -TreeManager.loadStatus = function () -{ - var doc_cookies = document.cookie.split('; '); +TreeManager.loadStatus = function () { + var $tree_status = getCookie('TreeExpandStatus'); + if (!$tree_status) { + return ; + } - for (var i=0; i < doc_cookies.length; i++) { - var pair = doc_cookies[i].split('='); - if ('TreeExpandStatus' == pair[0] && pair[1]) { - var expandedBranches = pair[1].split(':'); - for (var j=0; j