Fixes: U4-2703 Content editor save/publish should update modified attributes

This commit is contained in:
Shannon
2013-09-26 12:53:33 +10:00
parent f9055016ff
commit 29d849754c
2 changed files with 18 additions and 9 deletions

View File

@@ -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;
});

View File

@@ -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();
}
});
});