From a100d321f67ec2640124a5922684f7613d09396f Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 16 Oct 2018 18:08:57 +1100 Subject: [PATCH] Fixes group node route --- .../common/directives/components/tree/umbtree.directive.js | 2 ++ src/Umbraco.Web/Models/Trees/SectionRootNode.cs | 5 +++-- src/Umbraco.Web/Trees/ApplicationTreeController.cs | 2 +- 3 files changed, 6 insertions(+), 3 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 3212690bbb..836a5af2a6 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 @@ -80,6 +80,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use // entire tree again since we already still have it in memory. Of course if the section is different we will // reload it. This saves a lot on processing if someone is navigating in and out of the same section many times // since it saves on data retreival and DOM processing. + //TODO: This isn't used!? var lastSection = ""; /** Helper function to emit tree events */ @@ -91,6 +92,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use } } + //TODO: This isn't used!? function clearCache(section) { treeService.clearCache({ section: section }); } diff --git a/src/Umbraco.Web/Models/Trees/SectionRootNode.cs b/src/Umbraco.Web/Models/Trees/SectionRootNode.cs index 4265cbaa7f..cd4fc3e483 100644 --- a/src/Umbraco.Web/Models/Trees/SectionRootNode.cs +++ b/src/Umbraco.Web/Models/Trees/SectionRootNode.cs @@ -34,12 +34,13 @@ namespace Umbraco.Web.Models.Trees /// /// /// - public static TreeRootNode CreateGroupNode(TreeNodeCollection children) + public static TreeRootNode CreateGroupNode(TreeNodeCollection children, string section) { var sectionRoot = new TreeRootNode(RootId, string.Empty, string.Empty) { IsGroup = true, - Children = children + Children = children, + RoutePath = section }; return sectionRoot; diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index b4d217fe62..fd669a1b07 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -133,7 +133,7 @@ namespace Umbraco.Web.Trees if (groupNodeCollection.Count > 0) { - var groupRoot = TreeRootNode.CreateGroupNode(groupNodeCollection); + var groupRoot = TreeRootNode.CreateGroupNode(groupNodeCollection, application); groupRoot.Name = Services.TextService.Localize("treeHeaders/" + treeGroupName); rootNodeGroups.Add(groupRoot);