Merge branch 'AndyButland-u4-4972' into 7.2.0

Conflicts:
	src/Umbraco.Web/Editors/MediaTypeController.cs
This commit is contained in:
Shannon
2014-09-10 15:35:57 +10:00
35 changed files with 941 additions and 82 deletions

View File

@@ -29,6 +29,7 @@ namespace Umbraco.Core.Models
private int _creatorId;
private bool _allowedAsRoot;
private bool _isContainer;
private string _containerConfig;
private bool _trashed;
private PropertyGroupCollection _propertyGroups;
private PropertyTypeCollection _propertyTypes;
@@ -72,6 +73,7 @@ namespace Umbraco.Core.Models
private static readonly PropertyInfo CreatorIdSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, int>(x => x.CreatorId);
private static readonly PropertyInfo AllowedAsRootSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, bool>(x => x.AllowedAsRoot);
private static readonly PropertyInfo IsContainerSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, bool>(x => x.IsContainer);
private static readonly PropertyInfo ContainerConfigSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, string>(x => x.ContainerConfig);
private static readonly PropertyInfo TrashedSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, bool>(x => x.Trashed);
private static readonly PropertyInfo AllowedContentTypesSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, IEnumerable<ContentTypeSort>>(x => x.AllowedContentTypes);
private static readonly PropertyInfo PropertyGroupCollectionSelector = ExpressionHelper.GetPropertyInfo<ContentTypeBase, PropertyGroupCollection>(x => x.PropertyGroups);
@@ -303,6 +305,23 @@ namespace Umbraco.Core.Models
}
}
/// <summary>
/// Gets or Sets a JSON string defining the configuration for this ContentType if set as a container
/// </summary>
[DataMember]
public virtual string ContainerConfig
{
get { return _containerConfig; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_containerConfig = value;
return _containerConfig;
}, _containerConfig, ContainerConfigSelector);
}
}
/// <summary>
/// Boolean indicating whether this ContentType is Trashed or not.
/// If ContentType is Trashed it will be located in the Recyclebin.

View File

@@ -43,6 +43,11 @@ namespace Umbraco.Core.Models
/// </remarks>
bool IsContainer { get; set; }
/// <summary>
/// Gets or Sets a JSON string defining the configuration for this ContentType if set as a container
/// </summary>
string ContainerConfig { get; set; }
/// <summary>
/// Gets or Sets a list of integer Ids of the ContentTypes allowed under the ContentType
/// </summary>

View File

@@ -39,6 +39,10 @@ namespace Umbraco.Core.Models.Rdbms
[Constraint(Default = "0")]
public bool IsContainer { get; set; }
[Column("containerConfig")]
[NullSetting(NullSetting = NullSettings.Null)]
public string ContainerConfig { get; set; }
[Column("allowAtRoot")]
[Constraint(Default = "0")]
public bool AllowAtRoot { get; set; }

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.DatabaseAnnotations;
namespace Umbraco.Core.Models.Rdbms
{
@@ -62,6 +63,10 @@ namespace Umbraco.Core.Models.Rdbms
[Column("isContainer")]
public bool IsContainer { get; set; }
[Column("containerConfig")]
[NullSetting(NullSetting = NullSettings.Null)]
public string ContainerConfig { get; set; }
[Column("allowAtRoot")]
public bool AllowAtRoot { get; set; }