revert change title

This commit is contained in:
Niels Lyngsø
2020-05-01 12:50:55 +02:00
parent 138f38d786
commit ef56d9cbe3

View File

@@ -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;