Merge remote-tracking branch 'netcore/dev' into netcore/netcore

This commit is contained in:
Bjarke Berg
2020-08-26 08:05:15 +02:00
parent c561b256bf
commit 3d55dcd3c4
966 changed files with 9352 additions and 4199 deletions

View File

@@ -61,8 +61,7 @@ namespace Umbraco.Web.Models.ContentEditing
/// The path of the entity
/// </summary>
[DataMember(Name = "path")]
public string Path { get; set; }
public string Path { get; set; }
/// <summary>
/// A collection of extra data that is available for this specific entity/entity type
/// </summary>

View File

@@ -7,7 +7,7 @@ using Umbraco.Core.Models.ContentEditing;
namespace Umbraco.Web.Models.ContentEditing
{
/// <summary>
/// A model representing a content item to be displayed in the back office
/// A model representing a media item to be displayed in the back office
/// </summary>
[DataContract(Name = "content", Namespace = "")]
public class MediaItemDisplay : ListViewAwareContentItemDisplayBase<ContentPropertyDisplay>

View File

@@ -18,6 +18,9 @@ namespace Umbraco.Web.Models.ContentEditing
ContentApps = new List<ContentApp>();
}
[DataMember(Name = "contentType")]
public ContentTypeBasic ContentType { get; set; }
[DataMember(Name = "username")]
public string Username { get; set; }

View File

@@ -356,7 +356,7 @@ namespace Umbraco.Web.Models.Mapping
target.Properties = context.MapEnumerable<MemberPropertyTypeBasic, MemberPropertyTypeDisplay>(source.Properties);
}
// Umbraco.Code.MapAll -Editor -View -Config -ContentTypeId -ContentTypeName -Locked
// Umbraco.Code.MapAll -Editor -View -Config -ContentTypeId -ContentTypeName -Locked -DataTypeIcon -DataTypeName
private static void Map(PropertyTypeBasic source, PropertyTypeDisplay target, MapperContext context)
{
target.Alias = source.Alias;
@@ -373,7 +373,7 @@ namespace Umbraco.Web.Models.Mapping
target.Validation = source.Validation;
}
// Umbraco.Code.MapAll -Editor -View -Config -ContentTypeId -ContentTypeName -Locked
// Umbraco.Code.MapAll -Editor -View -Config -ContentTypeId -ContentTypeName -Locked -DataTypeIcon -DataTypeName
private static void Map(MemberPropertyTypeBasic source, MemberPropertyTypeDisplay target, MapperContext context)
{
target.Alias = source.Alias;

View File

@@ -40,6 +40,7 @@ namespace Umbraco.Web.Models.Mapping
target.Trashed = source.Trashed;
target.Udi = Udi.Create(ObjectTypes.GetUdiType(source.NodeObjectType), source.Key);
if (source is IContentEntitySlim contentSlim)
{
source.AdditionalData["ContentTypeAlias"] = contentSlim.ContentTypeAlias;
@@ -52,6 +53,8 @@ namespace Umbraco.Web.Models.Mapping
if (source is IMediaEntitySlim mediaSlim)
{
//pass UpdateDate for MediaPicker ListView ordering
source.AdditionalData["UpdateDate"] = mediaSlim.UpdateDate;
source.AdditionalData["MediaPath"] = mediaSlim.MediaPath;
}
@@ -181,7 +184,8 @@ namespace Umbraco.Web.Models.Mapping
target.Name = source.Values.ContainsKey($"nodeName_{culture}") ? source.Values[$"nodeName_{culture}"] : target.Name;
}
if (source.Values.TryGetValue(UmbracoExamineFieldNames.UmbracoFileFieldName, out var umbracoFile))
if (source.Values.TryGetValue(UmbracoExamineFieldNames.UmbracoFileFieldName, out var umbracoFile) &&
umbracoFile.IsNullOrWhiteSpace() == false)
{
if (umbracoFile != null)
{

View File

@@ -241,6 +241,8 @@ namespace Umbraco.Web.Models.Mapping
Inherited = inherited,
DataTypeId = p.DataTypeId,
DataTypeKey = p.DataTypeKey,
DataTypeName = dataType.Name,
DataTypeIcon = propertyEditor.Icon,
SortOrder = p.SortOrder,
ContentTypeId = contentType.Id,
ContentTypeName = contentType.Name,