Fixes up the Image cropper extensions, ensures that we don't recursively call Url (this is a special property).
This commit is contained in:
30
src/Umbraco.Web/Models/ContentEditing/ContentBaseItemSave.cs
Normal file
30
src/Umbraco.Web/Models/ContentEditing/ContentBaseItemSave.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// A model representing a content base item to be saved
|
||||
/// </summary>
|
||||
[DataContract(Name = "content", Namespace = "")]
|
||||
public abstract class ContentBaseItemSave<TPersisted> : ContentItemBasic<ContentPropertyBasic, TPersisted>, IHaveUploadedFiles
|
||||
where TPersisted : IContentBase
|
||||
{
|
||||
protected ContentBaseItemSave()
|
||||
{
|
||||
UploadedFiles = new List<ContentItemFile>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The action to perform when saving this content item
|
||||
/// </summary>
|
||||
[DataMember(Name = "action", IsRequired = true)]
|
||||
[Required]
|
||||
public ContentSaveAction Action { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public List<ContentItemFile> UploadedFiles { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// A model representing a content base item to be saved
|
||||
/// </summary>
|
||||
[DataContract(Name = "content", Namespace = "")]
|
||||
public abstract class ContentBaseItemSave<TPersisted> : ContentItemBasic<ContentPropertyBasic, TPersisted>, IHaveUploadedFiles
|
||||
where TPersisted : IContentBase
|
||||
{
|
||||
protected ContentBaseItemSave()
|
||||
{
|
||||
UploadedFiles = new List<ContentItemFile>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The action to perform when saving this content item
|
||||
/// </summary>
|
||||
[DataMember(Name = "action", IsRequired = true)]
|
||||
[Required]
|
||||
public ContentSaveAction Action { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public List<ContentItemFile> UploadedFiles { get; private set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A model representing a media item to be saved
|
||||
/// </summary>
|
||||
[DataContract(Name = "content", Namespace = "")]
|
||||
public class MediaItemSave : ContentBaseItemSave<IMedia>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A model representing a content item to be saved
|
||||
/// </summary>
|
||||
|
||||
14
src/Umbraco.Web/Models/ContentEditing/MediaItemSave.cs
Normal file
14
src/Umbraco.Web/Models/ContentEditing/MediaItemSave.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// A model representing a media item to be saved
|
||||
/// </summary>
|
||||
[DataContract(Name = "content", Namespace = "")]
|
||||
public class MediaItemSave : ContentBaseItemSave<IMedia>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user