From ef56d9cbe33766ece18a35fb6e174231f57fa8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 1 May 2020 12:50:55 +0200 Subject: [PATCH] revert change title --- .../editor/umbeditorcontentheader.directive.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js index d09ba9696b..170657773e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js @@ -2,8 +2,7 @@ 'use strict'; function EditorContentHeader(serverValidationManager, localizationService, editorState) { - - function link(scope) { + function link(scope) { var unsubscribe = []; @@ -19,19 +18,24 @@ localizationService.localizeMany( [ scope.isNew ? "placeholders_a11yCreateItem" : "placeholders_a11yEdit", - "placeholders_a11yName" + "placeholders_a11yName", + scope.isNew ? "general_new" : "general_edit" ] ).then(function (data) { scope.a11yMessage = data[0]; scope.a11yName = data[1]; + var title = data[2] + ": "; if (!scope.isNew) { scope.a11yMessage += " " + scope.editor.content.name; - + title += scope.content.name; } else { var name = editorState.current.contentTypeName; scope.a11yMessage += " " + name; scope.a11yName = name + " " + scope.a11yName; + title += name; } + + scope.$emit("$changeTitle", title); }); scope.vm = {}; scope.vm.hasVariants = false;