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:
Shannon
2013-11-12 13:09:24 +11:00
parent acd52d42f4
commit c4bfeeb321
12 changed files with 57 additions and 40 deletions

View File

@@ -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;