Fixes tree service from showing that there is children when there isn't, fixes container node issues:

U4-3540 When creating a Container type node - the list view shows all children of the item it's being created underneath
U4-3541 media tree is not catering for container types
Adds container style
This commit is contained in:
Shannon
2013-11-15 16:19:46 +11:00
parent 9774744991
commit 0878de4a8b
6 changed files with 70 additions and 15 deletions

View File

@@ -83,6 +83,14 @@ namespace Umbraco.Web.Trees
return nodes;
}
//before we get the children we need to see if this is a container node
var current = Services.EntityService.Get(int.Parse(id), UmbracoObjectTypes.Document);
if (current != null && current.AdditionalData.ContainsKey("IsContainer") && current.AdditionalData["IsContainer"] is bool && (bool)current.AdditionalData["IsContainer"])
{
//no children!
return new TreeNodeCollection();
}
return PerformGetTreeNodes(id, queryStrings);
}