Reverted changes no longer needed after work on inherited/nested doctypes.

Changed default to allow inherited doctypes.
This commit is contained in:
Claus
2016-01-11 14:04:03 +01:00
parent ffa7a1457a
commit cb05f3fe03
9 changed files with 12 additions and 21 deletions

View File

@@ -288,7 +288,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
return new OptionalInnerTextConfigurationElement<bool>(
(InnerTextConfigurationElement<bool>) this["EnableInheritedDocumentTypes"],
//set the default
false);
true);
}
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.Models
{
@@ -35,10 +34,6 @@ namespace Umbraco.Core.Models
[Obsolete("This method is obsolete, use ContentType(IContentType parent, string alias) instead.", false)]
public ContentType(IContentType parent) : this(parent, null)
{
if (UmbracoConfig.For.UmbracoSettings().Content.EnableInheritedDocumentTypes)
{
AddContentType(parent);
}
}
/// <summary>
@@ -50,10 +45,6 @@ namespace Umbraco.Core.Models
public ContentType(IContentType parent, string alias)
: base(parent, alias)
{
if (UmbracoConfig.For.UmbracoSettings().Content.EnableInheritedDocumentTypes)
{
AddContentType(parent);
}
_allowedTemplates = new List<ITemplate>();
}

View File

@@ -7,13 +7,13 @@ function contentTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
return {
getAvailableCompositeContentTypes: function (contentTypeId, parentId) {
getAvailableCompositeContentTypes: function (contentTypeId) {
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"contentTypeApiBaseUrl",
"GetAvailableCompositeContentTypes",
[{ contentTypeId: contentTypeId }, { parentId: parentId }])),
[{ contentTypeId: contentTypeId }])),
'Failed to retrieve data for content type id ' + contentTypeId);
},

View File

@@ -213,7 +213,7 @@
function init(contentType) {
//get available composite types
contentTypeResource.getAvailableCompositeContentTypes(contentType.id, contentType.parentId).then(function (result) {
contentTypeResource.getAvailableCompositeContentTypes(contentType.id).then(function (result) {
contentType.availableCompositeContentTypes = result;
// convert icons for composite content types
iconHelper.formatContentTypeIcons(contentType.availableCompositeContentTypes);

View File

@@ -104,7 +104,7 @@
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
<!-- Enable inherited document types. This feature will be deprecated in v8 -->
<EnableInheritedDocumentTypes>false</EnableInheritedDocumentTypes>
<EnableInheritedDocumentTypes>true</EnableInheritedDocumentTypes>
</content>
<security>

View File

@@ -93,9 +93,9 @@ namespace Umbraco.Web.Editors
return ApplicationContext.Services.ContentTypeService.GetAllPropertyTypeAliases();
}
public IEnumerable<EntityBasic> GetAvailableCompositeContentTypes(int contentTypeId, int parentId)
public IEnumerable<EntityBasic> GetAvailableCompositeContentTypes(int contentTypeId)
{
return PerformGetAvailableCompositeContentTypes(contentTypeId, parentId, UmbracoObjectTypes.DocumentType);
return PerformGetAvailableCompositeContentTypes(contentTypeId, UmbracoObjectTypes.DocumentType);
}
[UmbracoTreeAuthorize(

View File

@@ -51,7 +51,7 @@ namespace Umbraco.Web.Editors
/// Returns the available composite content types for a given content type
/// </summary>
/// <returns></returns>
protected IEnumerable<EntityBasic> PerformGetAvailableCompositeContentTypes(int contentTypeId, int parentId, UmbracoObjectTypes type)
protected IEnumerable<EntityBasic> PerformGetAvailableCompositeContentTypes(int contentTypeId, UmbracoObjectTypes type)
{
IContentTypeComposition source = null;

View File

@@ -83,9 +83,9 @@ namespace Umbraco.Web.Editors
return Request.CreateResponse(HttpStatusCode.OK);
}
public IEnumerable<EntityBasic> GetAvailableCompositeMediaTypes(int contentTypeId, int parentId)
public IEnumerable<EntityBasic> GetAvailableCompositeMediaTypes(int contentTypeId)
{
return PerformGetAvailableCompositeContentTypes(contentTypeId, parentId, UmbracoObjectTypes.MediaType);
return PerformGetAvailableCompositeContentTypes(contentTypeId, UmbracoObjectTypes.MediaType);
}
public ContentTypeCompositionDisplay GetEmpty(int parentId)

View File

@@ -79,9 +79,9 @@ namespace Umbraco.Web.Editors
return Request.CreateResponse(HttpStatusCode.OK);
}
public IEnumerable<EntityBasic> GetAvailableCompositeMemberTypes(int contentTypeId, int parentId)
public IEnumerable<EntityBasic> GetAvailableCompositeMemberTypes(int contentTypeId)
{
return PerformGetAvailableCompositeContentTypes(contentTypeId, parentId, UmbracoObjectTypes.MemberType);
return PerformGetAvailableCompositeContentTypes(contentTypeId, UmbracoObjectTypes.MemberType);
}
public ContentTypeCompositionDisplay GetEmpty()