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

+
Current version
+

{{vm.currentVersion.name}} (Created: {{vm.currentVersion.createDate}})

-
+
-
Changes
+
Changes
@@ -54,7 +54,7 @@
Changes
Name - + {{part.value}} {{part.value}} {{part.value}} @@ -64,7 +64,7 @@
Changes
{{property.label}} - + {{part.value}} {{part.value}} {{part.value}} diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index a876b1a6b767..59ce327d4d53 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -1094,10 +1094,13 @@ Mange hilsner fra Umbraco robotten Brugerdefineret + Ændringer + Oprettet Vælg en version at sammenligne med den nuværende version Nuværende version Rød tekst vil ikke blive vist i den valgte version. Grøn betyder tilføjet]]> Dokument tilbagerullet + Vælg en version at sammenligne med den nuværende version Her vises den valgte version som html. Hvis du ønsker at se forskellen mellem de 2 versioner på samme tid, brug 'diff'-oversigten Tilbagerulning til Vælg version diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index e96ef754c43c..0150a5542d1b 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -1336,10 +1336,12 @@ To manage your website, simply open the Umbraco back office and start adding con User defined - Select a version to compare with the current version + Changes + Created Current version Red text will not be shown in the selected version. , green means added]]> Document has been rolled back + Select a version to compare with the current version This displays the selected version as HTML, if you wish to see the difference between 2 versions at the same time, use the diff view Rollback to Select version diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 2bb649597742..6700818ee09a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -1345,10 +1345,13 @@ To manage your website, simply open the Umbraco back office and start adding con User defined + Changes + Created Select a version to compare with the current version Current version Red text will not be shown in the selected version. , green means added]]> Document has been rolled back + Select a version to compare with the current version This displays the selected version as HTML, if you wish to see the difference between 2 versions at the same time, use the diff view Rollback to Select version