Fixes: U4-7347 Document type editor template name and alias get set to null

This commit is contained in:
Mads Rasmussen
2015-11-03 19:49:00 +01:00
parent 6f6b7d5772
commit 2f16aa25c3
2 changed files with 0 additions and 25 deletions

View File

@@ -240,26 +240,6 @@ function contentTypeHelper(contentTypeResource, dataTypeResource, $filter) {
return array;
},
updateTemplatePlaceholder: function(contentType) {
// update default template
if(contentType.defaultTemplate !== null && contentType.defaultTemplate.placeholder) {
contentType.defaultTemplate.name = contentType.name;
contentType.defaultTemplate.alias = contentType.alias;
}
// update allowed template
angular.forEach(contentType.allowedTemplates, function(allowedTemplate){
if(allowedTemplate.placeholder) {
allowedTemplate.name = contentType.name;
allowedTemplate.alias = contentType.alias;
}
});
return contentType;
}
};

View File

@@ -149,11 +149,6 @@
// reformat allowed content types to array if id's
vm.contentType.allowedContentTypes = contentTypeHelper.createIdArray(vm.contentType.allowedContentTypes);
// update placeholder template information on new doc types
if (!$routeParams.notemplate && vm.contentType.id === 0) {
vm.contentType = contentTypeHelper.updateTemplatePlaceholder(vm.contentType);
}
contentEditingHelper.contentEditorPerformSave({
statusMessage: "Saving...",
saveMethod: contentTypeResource.save,