Merge pull request #3420 from dawoe/temp-3419

V8- #3419 - Fix dictionary tree
This commit is contained in:
Shannon Deminick
2018-10-26 13:39:42 +11:00
committed by GitHub
7 changed files with 24 additions and 18 deletions

View File

@@ -28,6 +28,7 @@ namespace Umbraco.Web.Models.Trees
{
private static readonly string RootId = Core.Constants.System.Root.ToString(CultureInfo.InvariantCulture);
private bool _isGroup;
private bool _alwaysShow;
/// <summary>
/// Creates a group node for grouped multiple trees
@@ -87,13 +88,15 @@ namespace Umbraco.Web.Models.Trees
/// <param name="menuUrl"></param>
/// <param name="title"></param>
/// <param name="children"></param>
/// <param name="alwaysShowRootNode"></param>
/// <returns></returns>
public static TreeRootNode CreateSingleTreeRoot(string nodeId, string getChildNodesUrl, string menuUrl, string title, TreeNodeCollection children)
public static TreeRootNode CreateSingleTreeRoot(string nodeId, string getChildNodesUrl, string menuUrl, string title, TreeNodeCollection children, bool alwaysShowRootNode = false)
{
return new TreeRootNode(nodeId, getChildNodesUrl, menuUrl)
{
Children = children,
Name = title
Name = title,
_alwaysShow = alwaysShowRootNode
};
}
@@ -150,6 +153,6 @@ namespace Umbraco.Web.Models.Trees
/// This is used in the UI to configure a full screen section/app
/// </remarks>
[DataMember(Name = "containsTrees")]
public bool ContainsTrees => Children.Count > 0;
public bool ContainsTrees => Children.Count > 0 || _alwaysShow;
}
}