diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.controller.js index 24ed971de04f..08a26ec3408f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.controller.js @@ -68,14 +68,20 @@ if(version && version.versionId) { + vm.loading = true; + const culture = $scope.model.node.variants.length > 1 ? vm.currentVersion.language.culture : null; contentResource.getRollbackVersion(version.versionId, culture) - .then(function(data){ + .then(function(data) { vm.previousVersion = data; vm.previousVersion.versionId = version.versionId; createDiff(vm.currentVersion, vm.previousVersion); + + vm.loading = false; vm.rollbackButtonDisabled = false; + }, function () { + vm.loading = false; }); } else { @@ -118,6 +124,10 @@ tab.properties.forEach((property, propertyIndex) => { var oldProperty = previousVersion.tabs[tabIndex].properties[propertyIndex]; + // copy existing properties, so it doesn't manipulate existing properties on page + oldProperty = angular.copy(oldProperty); + property = angular.copy(property); + // we have to make properties storing values as object into strings (Grid, nested content, etc.) if(property.value instanceof Object) { property.value = JSON.stringify(property.value, null, 1); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.html index e292a946065d..49408d69c362 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/rollback/rollback.html @@ -31,8 +31,8 @@
{{vm.currentVersion.name}} (Created: {{vm.currentVersion.createDate}})
+{{vm.currentVersion.name}} (
Name |
-
+
{{part.value}}
Changes{{property.label}} |
-
+
{{part.value}}
| |