Merge branch temp8 into temp8-di2690
This commit is contained in:
@@ -38,6 +38,7 @@ namespace Umbraco.Web.Models.Trees
|
||||
SeperatorBefore = false;
|
||||
Icon = legacyMenu.Icon;
|
||||
Action = legacyMenu;
|
||||
OpensDialog = legacyMenu.OpensDialog;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -71,6 +72,10 @@ namespace Umbraco.Web.Models.Trees
|
||||
|
||||
[DataMember(Name = "cssclass")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[DataMember(Name = "opensDialog")]
|
||||
public bool OpensDialog { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constants
|
||||
|
||||
@@ -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 _isSingleNodeTree;
|
||||
|
||||
/// <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="isSingleNodeTree"></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 isSingleNodeTree = false)
|
||||
{
|
||||
return new TreeRootNode(nodeId, getChildNodesUrl, menuUrl)
|
||||
{
|
||||
Children = children,
|
||||
Name = title
|
||||
Name = title,
|
||||
_isSingleNodeTree = isSingleNodeTree
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 || !_isSingleNodeTree;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user