Gets notification msgs on the server side to be displayed. Fixes property existence checking... was checking on id before but that is incorrect, needs to be on alias since a new property id is gen'd on each save and we're not re-wiring them back up. Fixes YSOD messaging for content as well. Changes the ModelState to modelState to be consistent in js.
This commit is contained in:
@@ -32,7 +32,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// still save the item but it cannot be published. So we need a way of returning validation errors as well as the
|
||||
/// updated model.
|
||||
/// </remarks>
|
||||
[DataMember(Name = "ModelState")]
|
||||
[DataMember(Name = "modelState")]
|
||||
public IDictionary<string, object> Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -20,22 +20,5 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[Required(AllowEmptyStrings = false)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
protected bool Equals(ContentPropertyBasic other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
var other = obj as ContentPropertyBasic;
|
||||
return other != null && Equals(other);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user