make warnings an array that angularJS can watch

This commit is contained in:
Niels Lyngsø
2019-03-11 12:37:53 +01:00
parent 502794aae9
commit b237e4a55e
2 changed files with 6 additions and 1 deletions

View File

@@ -348,7 +348,7 @@
var tokens = [iVariant.language.name];
localizationService.localize("publish_contentPublishedFailedByMissingName", tokens).then(function (value) {
iVariant.warnings = {"message": value};
iVariant.warnings = [{"message": value}];
});
return $q(function(resolve, reject) {

View File

@@ -105,6 +105,11 @@
vm.variants = $scope.model.variants;
// create warnings array for each variant. This is needed for angular to watch the array.
_.forEach(vm.variants, function(varaint) {
varaint.warnings = [];
});
if (!$scope.model.title) {
localizationService.localize("content_readyToPublish").then(function (value) {