cleaning and formatting.
This commit is contained in:
@@ -1,24 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Security;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
using System.Web.Http;
|
||||
using System.Net;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using Umbraco.Web.WebApi;
|
||||
using ContentType = System.Net.Mime.ContentType;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models;
|
||||
|
||||
namespace Umbraco.Web.Editors
|
||||
{
|
||||
@@ -92,16 +84,18 @@ namespace Umbraco.Web.Editors
|
||||
/// Returns the avilable compositions for this content type
|
||||
/// This has been wrapped in a dto instead of simple parameters to support having multiple parameters in post request body
|
||||
/// </summary>
|
||||
/// <param name="contentTypeId"></param>
|
||||
/// <param name="filterContentTypes">
|
||||
/// <param name="filter.contentTypeId"></param>
|
||||
/// <param name="filter.ContentTypes">
|
||||
/// This is normally an empty list but if additional content type aliases are passed in, any content types containing those aliases will be filtered out
|
||||
/// along with any content types that have matching property types that are included in the filtered content types
|
||||
/// </param>
|
||||
/// <param name="filterPropertyTypes">
|
||||
/// <param name="filter.PropertyTypes">
|
||||
/// This is normally an empty list but if additional property type aliases are passed in, any content types that have these aliases will be filtered out.
|
||||
/// This is required because in the case of creating/modifying a content type because new property types being added to it are not yet persisted so cannot
|
||||
/// be looked up via the db, they need to be passed in.
|
||||
/// </param>
|
||||
/// <param name="filter">
|
||||
/// Filter applied when resolving compositions</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public HttpResponseMessage GetAvailableCompositeMediaTypes(GetAvailableCompositionsFilter filter)
|
||||
@@ -117,8 +111,7 @@ namespace Umbraco.Web.Editors
|
||||
|
||||
public MediaTypeDisplay GetEmpty(int parentId)
|
||||
{
|
||||
var ct = new MediaType(parentId);
|
||||
ct.Icon = "icon-picture";
|
||||
var ct = new MediaType(parentId) {Icon = "icon-picture"};
|
||||
|
||||
var dto = Mapper.Map<IMediaType, MediaTypeDisplay>(ct);
|
||||
return dto;
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using umbraco;
|
||||
using umbraco.BusinessLogic.Actions;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.EntityBase;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Umbraco.Core.Services;
|
||||
@@ -98,8 +94,7 @@ namespace Umbraco.Web.Trees
|
||||
else
|
||||
{
|
||||
var ct = Services.ContentTypeService.GetMediaType(int.Parse(id));
|
||||
IMediaType parent = null;
|
||||
parent = ct == null ? null : Services.ContentTypeService.GetMediaType(ct.ParentId);
|
||||
var parent = ct == null ? null : Services.ContentTypeService.GetMediaType(ct.ParentId);
|
||||
|
||||
if (enableInheritedMediaTypes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user