diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index e76ac36b20..a9e2616446 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -77,6 +77,8 @@ resetLastListPageNumber($scope.content); + eventsService.emit("content.loaded", { content: $scope.content }); + $scope.page.loading = false; }); @@ -130,6 +132,8 @@ $scope.page.buttonGroupState = "busy"; + eventsService.emit("content.saving", { content: $scope.content, action: args.action }); + contentEditingHelper.contentEditorPerformSave({ statusMessage: args.statusMessage, saveMethod: args.saveMethod, @@ -144,6 +148,9 @@ $scope.page.buttonGroupState = "success"; deferred.resolve(data); + + eventsService.emit("content.saved", { content: $scope.content, action: args.action }); + }, function (err) { //error if (err) { @@ -183,7 +190,9 @@ $scope.page.loading = false; - }); + eventsService.emit("content.newReady", { content: $scope.content }); + + }); } else { @@ -198,6 +207,8 @@ $scope.page.buttonGroupState = "busy"; + eventsService.emit("content.unpublishing", { content: $scope.content }); + contentResource.unPublish($scope.content.id) .then(function (data) { @@ -215,6 +226,8 @@ $scope.page.buttonGroupState = "success"; + eventsService.emit("content.unpublished", { content: $scope.content }); + }, function(err) { formHelper.showNotifications(err.data); $scope.page.buttonGroupState = 'error';