diff --git a/entity/BulkMail_entity/entityfields/content/stateProcess.js b/entity/BulkMail_entity/entityfields/content/stateProcess.js index 6911573910aa6d2463383bc76c6ef536b3dd4a5d..237d5230c079ee05a93f0912552006defdd2d06b 100644 --- a/entity/BulkMail_entity/entityfields/content/stateProcess.js +++ b/entity/BulkMail_entity/entityfields/content/stateProcess.js @@ -3,15 +3,20 @@ import("system.vars"); import("system.neon"); import("DocumentTemplate_lib"); +// in edit mode if (vars.get("$sys.recordstate") != neon.OPERATINGSTATE_VIEW && (vars.get("$context.currentTemplateType") == DocumentTemplate.types.EML || vars.get("$context.currentTemplateType") == DocumentTemplate.types.HTML)) // TODO: invisible for html as there are problems with images which are removed by the html-editor { result.string(neon.COMPONENTSTATE_INVISIBLE); } -// keep in invisible mode to prevent a visible editor directly after save which needs much time to initiate (for eml) -// somehow the edit view is in view mode and the editor doesn't know anything about it and initializes itself... -else if (vars.get("$context.currentTemplateType") == DocumentTemplate.types.EML || vars.get("$context.currentTemplateType") == DocumentTemplate.types.HTML) +// in view mode disable for eml +else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW && + (vars.get("$context.currentTemplateType") == DocumentTemplate.types.EML + // in view mode also disable for html to work around missing image-support for the html-editor + || vars.get("$context.currentTemplateType") == DocumentTemplate.types.HTML)) result.string(neon.COMPONENTSTATE_INVISIBLE); else - result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file +{ + result.string(neon.COMPONENTSTATE_EDITABLE); +} \ No newline at end of file diff --git a/neonView/BulkMailContent_view/BulkMailContent_view.aod b/neonView/BulkMailContent_view/BulkMailContent_view.aod index 83d2fdaa7b9013c602ed68d980cab7a13e1cd1c3..06a0bc7b789a9e24b71be96c619ef3d9e41445ff 100644 --- a/neonView/BulkMailContent_view/BulkMailContent_view.aod +++ b/neonView/BulkMailContent_view/BulkMailContent_view.aod @@ -35,6 +35,10 @@ <name>af0d45a2-a96f-4031-a93d-62ac177efb43</name> <entityField>content</entityField> </entityFieldLink> + <entityFieldLink> + <name>5ae4212f-4107-447e-af57-9ab60fb8075a</name> + <entityField>preview</entityField> + </entityFieldLink> </fields> </genericViewTemplate> </children>