From 4e6c4d6f7f32f68f605a89814209b723994f0d27 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 19 Jun 2018 16:08:11 +0200 Subject: [PATCH 1/2] U4-11341 Content node tree collapse on random nodes level 3 or lower after upgrade to 7.10.4 --- .../directives/components/tree/umbtree.directive.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js index cce4e0d792..9189eb785f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js @@ -156,16 +156,6 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat startNodes.push(userData.startMediaIds[j]); } - _.each(startNodes, function (i) { - var found = _.find(args.path, function (p) { - return String(p) === String(i); - }); - if (found) { - args.path = args.path.splice(_.indexOf(args.path, found)); - } - }); - - loadPath(args.path, args.forceReload, args.activate); }); From 9909b10edb7f324e81629bf8179f8d7c4fa89d2f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jun 2018 09:26:09 +0200 Subject: [PATCH 2/2] Removes more unnecessary code from the tree syncing if we don't need to consider the start nodes --- .../components/tree/umbtree.directive.js | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js index 9189eb785f..d36836f440 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js @@ -140,27 +140,7 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat //Filter the path for root node ids (we don't want to pass in -1 or 'init') args.path = _.filter(args.path, function (item) { return (item !== "init" && item !== "-1"); }); - - //Once those are filtered we need to check if the current user has a special start node id, - // if they do, then we're going to trim the start of the array for anything found from that start node - // and previous so that the tree syncs properly. The tree syncs from the top down and if there are parts - // of the tree's path in there that don't actually exist in the dom/model then syncing will not work. - - userService.getCurrentUser().then(function (userData) { - - var startNodes = []; - for (var i = 0; i < userData.startContentIds; i++) { - startNodes.push(userData.startContentIds[i]); - } - for (var j = 0; j < userData.startMediaIds; j++) { - startNodes.push(userData.startMediaIds[j]); - } - - loadPath(args.path, args.forceReload, args.activate); - - }); - - + loadPath(args.path, args.forceReload, args.activate); return deferred.promise; };