Fixes: U4-2703 Content editor save/publish should update modified attributes
This commit is contained in:
@@ -46,10 +46,7 @@ function contentEditingHelper($location, $routeParams, notificationsService, ser
|
||||
var allOrigProps = this.getAllProps(origContent);
|
||||
var allNewProps = this.getAllProps(newContent);
|
||||
|
||||
function getNewProp(alias) {
|
||||
if (alias.startsWith("_umb_")) {
|
||||
return null;
|
||||
}
|
||||
function getNewProp(alias) {
|
||||
return _.find(allNewProps, function (item) {
|
||||
return item.alias === alias;
|
||||
});
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
angular.module('umbraco').controller("Umbraco.Editors.UrlListController",
|
||||
function($rootScope, $scope, $filter) {
|
||||
|
||||
$scope.renderModel = _.map($scope.model.value.split(","), function(item) {
|
||||
return {
|
||||
url: item,
|
||||
urlTarget : ($scope.config && $scope.config.target) ? $scope.config.target : "_blank"
|
||||
};
|
||||
function formatDisplayValue() {
|
||||
$scope.renderModel = _.map($scope.model.value.split(","), function (item) {
|
||||
return {
|
||||
url: item,
|
||||
urlTarget: ($scope.config && $scope.config.target) ? $scope.config.target : "_blank"
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
formatDisplayValue();
|
||||
|
||||
//we need to put a watch on the real model because when it changes we have to update our renderModel
|
||||
$scope.$watch("model.value", function (newVal, oldVal) {
|
||||
if (newVal !== null && newVal !== undefined && newVal !== oldVal) {
|
||||
//update the display val again
|
||||
formatDisplayValue();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user