Changes the CreateTreeNode to ensure that a parentId is always passed in - now all tree node models have a parentId property based on the server side data. Changes the JS tree node model to not have a 'parent' property and instead changes this to a parent() method - this allows us to serialize the tree model because otherwise it has cyclical references.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
@@ -33,7 +34,7 @@ namespace Umbraco.Web.Models.Trees
|
||||
}
|
||||
|
||||
private SectionRootNode(string nodeId, string getChildNodesUrl, string menuUrl)
|
||||
: base(nodeId, getChildNodesUrl, menuUrl)
|
||||
: base(nodeId, null, getChildNodesUrl, menuUrl)
|
||||
{
|
||||
//default to false
|
||||
IsContainer = false;
|
||||
|
||||
Reference in New Issue
Block a user