ignores some properties from being updated after saving otherwise we get duplicate tabs, etc...
This commit is contained in:
@@ -52,8 +52,20 @@ function contentEditingHelper($location, $routeParams, notificationsService, ser
|
||||
});
|
||||
}
|
||||
|
||||
//a method to ignore built-in prop changes
|
||||
var shouldIgnore = function(propName) {
|
||||
return _.some(["tabs", "notifications", "ModelState", "tabs", "properties"], function(i) {
|
||||
return i === propName;
|
||||
});
|
||||
};
|
||||
//check for changed built-in properties of the content
|
||||
for (var o in origContent) {
|
||||
|
||||
//ignore the ones listed in the array
|
||||
if (shouldIgnore(o)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!_.isEqual(origContent[o], newContent[o])) {
|
||||
origContent[o] = newContent[o];
|
||||
}
|
||||
|
||||
@@ -14,9 +14,6 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataContract(Name = "content", Namespace = "")]
|
||||
public class ContentItemDisplay : ContentItemDisplayBase<ContentPropertyDisplay, IContent>
|
||||
{
|
||||
[DataMember(Name = "path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[DataMember(Name = "publishDate")]
|
||||
public DateTime? PublishDate { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user