adds dynamic caseinsensitive support for the image cropper model
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Dynamics;
|
||||
|
||||
namespace Umbraco.Web.Models
|
||||
{
|
||||
[DataContract(Name = "imageCropCoordinates")]
|
||||
public class ImageCropCoordinates : IEquatable<ImageCropCoordinates>
|
||||
public class ImageCropCoordinates : CaseInsensitiveDynamicObject<ImageCropCoordinates>, IEquatable<ImageCropCoordinates>
|
||||
{
|
||||
[DataMember(Name = "x1")]
|
||||
public decimal X1 { get; set; }
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Dynamics;
|
||||
|
||||
namespace Umbraco.Web.Models
|
||||
{
|
||||
[DataContract(Name = "imageCropData")]
|
||||
public class ImageCropData : IEquatable<ImageCropData>
|
||||
public class ImageCropData : CaseInsensitiveDynamicObject<ImageCropData>, IEquatable<ImageCropData>
|
||||
{
|
||||
[DataMember(Name = "alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Dynamics;
|
||||
using Umbraco.Core.Serialization;
|
||||
using Umbraco.Web.PropertyEditors.ValueConverters;
|
||||
|
||||
@@ -14,8 +19,9 @@ namespace Umbraco.Web.Models
|
||||
[JsonConverter(typeof(NoTypeConverterJsonConverter<ImageCropDataSet>))]
|
||||
[TypeConverter(typeof(ImageCropDataSetConverter))]
|
||||
[DataContract(Name="imageCropDataSet")]
|
||||
public class ImageCropDataSet : IHtmlString, IEquatable<ImageCropDataSet>
|
||||
{
|
||||
public class ImageCropDataSet : CaseInsensitiveDynamicObject<ImageCropDataSet>, IHtmlString, IEquatable<ImageCropDataSet>
|
||||
{
|
||||
|
||||
[DataMember(Name="src")]
|
||||
public string Src { get; set;}
|
||||
|
||||
@@ -88,6 +94,7 @@ namespace Umbraco.Web.Models
|
||||
{
|
||||
return Crops.Any() ? JsonConvert.SerializeObject(this) : Src;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the current object is equal to another object of the same type.
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Dynamics;
|
||||
|
||||
namespace Umbraco.Web.Models
|
||||
{
|
||||
[DataContract(Name = "imageCropFocalPoint")]
|
||||
public class ImageCropFocalPoint : IEquatable<ImageCropFocalPoint>
|
||||
public class ImageCropFocalPoint : CaseInsensitiveDynamicObject<ImageCropFocalPoint>, IEquatable<ImageCropFocalPoint>
|
||||
{
|
||||
[DataMember(Name = "left")]
|
||||
public decimal Left { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user