Getting media picker working
This commit is contained in:
@@ -11,10 +11,10 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// A model representing a basic content item
|
||||
/// </summary>
|
||||
[DataContract(Name = "content", Namespace = "")]
|
||||
public abstract class ContentItemBasic<T>
|
||||
where T: ContentPropertyBase
|
||||
public class ContentItemBasic<T>
|
||||
where T: ContentPropertyBasic
|
||||
{
|
||||
protected ContentItemBasic()
|
||||
public ContentItemBasic()
|
||||
{
|
||||
//ensure its not null
|
||||
_properties = new List<T>();
|
||||
|
||||
@@ -7,6 +7,8 @@ using System.Linq;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A model representing a content item to be displayed in the back office
|
||||
/// </summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// <summary>
|
||||
/// A model representing a content item to be saved
|
||||
/// </summary>
|
||||
public class ContentItemSave : ContentItemBasic<ContentPropertyBase>
|
||||
public class ContentItemSave : ContentItemBasic<ContentPropertyBasic>
|
||||
{
|
||||
public ContentItemSave()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// Represents a content property to be saved
|
||||
/// </summary>
|
||||
[DataContract(Name = "property", Namespace = "")]
|
||||
public class ContentPropertyBase
|
||||
public class ContentPropertyBasic
|
||||
{
|
||||
[DataMember(Name = "id", IsRequired = true)]
|
||||
[Required]
|
||||
@@ -16,7 +16,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "value")]
|
||||
public string Value { get; set; }
|
||||
|
||||
protected bool Equals(ContentPropertyBase other)
|
||||
protected bool Equals(ContentPropertyBasic other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
var other = obj as ContentPropertyBase;
|
||||
var other = obj as ContentPropertyBasic;
|
||||
return other != null && Equals(other);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// <summary>
|
||||
/// Represents a content property that is displayed in the UI
|
||||
/// </summary>
|
||||
public class ContentPropertyDisplay : ContentPropertyBase
|
||||
public class ContentPropertyDisplay : ContentPropertyBasic
|
||||
{
|
||||
[DataMember(Name = "label", IsRequired = true)]
|
||||
[Required]
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// <summary>
|
||||
/// Represents a content property from the database
|
||||
/// </summary>
|
||||
internal class ContentPropertyDto : ContentPropertyBase
|
||||
internal class ContentPropertyDto : ContentPropertyBasic
|
||||
{
|
||||
public IDataTypeDefinition DataType { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user