Skip to content
Snippets Groups Projects
Commit 81aa6d7b authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

Merge branch 'm_1085867_mosaico_link_anbindung' into '2021.2.0'

M 1085867 mosaico link anbindung

See merge request xrm/basic!1292
parents 0d2eae09 65113550
No related branches found
No related tags found
No related merge requests found
Showing
with 380 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.22" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.22">
<name>MosaicoTemplate_entity</name>
<title>Mosaico</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/MosaicoTemplate_entity/documentation.adoc</documentation>
<icon>VAADIN:EXTERNAL_BROWSER</icon>
<contentTitleProcess>%aditoprj%/entity/MosaicoTemplate_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/MosaicoTemplate_entity/afterUiInit.js</afterUiInit>
<imageProcess>%aditoprj%/entity/MosaicoTemplate_entity/imageProcess.js</imageProcess>
<titlePlural>Mosaico</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityField>
<name>CONTENT</name>
</entityField>
<entityField>
<name>DATE_EDIT</name>
<contentType>DATE</contentType>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/date_edit/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>DATE_NEW</name>
<title>DATE_NEW</title>
<contentType>DATE</contentType>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/date_new/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>METADATA</name>
</entityField>
<entityField>
<name>MOSAICOTEMPLATEID</name>
</entityField>
<entityField>
<name>NAME</name>
<title>Name</title>
<mandatory v="true" />
</entityField>
<entityField>
<name>USER_EDIT</name>
<contentType>TEXT</contentType>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/user_edit/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_NEW</name>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/user_new/valueProcess.js</valueProcess>
</entityField>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityField>
<name>BASETEMPLATE</name>
<title>Base Template</title>
<consumer>KeywordMosaicoBaseTemplate</consumer>
<mandatory v="true" />
<stateProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/basetemplate/stateProcess.js</stateProcess>
</entityField>
<entityConsumer>
<name>KeywordMosaicoBaseTemplate</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/keywordmosaicobasetemplate/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>Documents</name>
<dependency>
<name>dependency</name>
<entityName>Document_entity</entityName>
<fieldName>SingleDocument</fieldName>
</dependency>
<children>
<entityParameter>
<name>AssignmentRowId_param</name>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>AssignmentTable_param</name>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityActionField>
<name>OpenInMosaico</name>
<title>Open in mosaico</title>
<onActionProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/openinmosaico/onActionProcess.js</onActionProcess>
<iconId>NEON:WRENCH</iconId>
<tooltipProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/openinmosaico/tooltipProcess.js</tooltipProcess>
</entityActionField>
<entityActionField>
<name>CopyTemplate</name>
<title>Copy template</title>
<onActionProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/copytemplate/onActionProcess.js</onActionProcess>
<iconId>VAADIN:COPY</iconId>
</entityActionField>
<entityActionField>
<name>newBulkMail</name>
<title>Write bulk mail</title>
<onActionProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/newbulkmail/onActionProcess.js</onActionProcess>
<iconId>VAADIN:AT</iconId>
</entityActionField>
<entityActionField>
<name>newDocumentTemplate</name>
<title>New document template</title>
<onActionProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/newdocumenttemplate/onActionProcess.js</onActionProcess>
<iconId>VAADIN:FILE_FONT</iconId>
</entityActionField>
<entityParameter>
<name>CopyMosaicoTemplateIdParam</name>
<expose v="true" />
</entityParameter>
<entityField>
<name>ISOLANGUAGE</name>
<title>Language</title>
<consumer>Languages</consumer>
<groupable v="true" />
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/isolanguage/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/isolanguage/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
<name>Languages</name>
<dependency>
<name>dependency</name>
<entityName>Language_entity</entityName>
<fieldName>ISO3Name</fieldName>
</dependency>
</entityConsumer>
<entityConsumer>
<name>KeywordMosaicoTemplateCategory</name>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/keywordmosaicotemplatecategory/children/containername_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>CATEGORY</name>
<title>Classification</title>
<consumer>KeywordMosaicoTemplateCategory</consumer>
<groupable v="true" />
<mandatory v="true" />
</entityField>
<entityActionField>
<name>openAdminView</name>
<documentation>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/openadminview/documentation.adoc</documentation>
<title>Open admin view</title>
<onActionProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/openadminview/onActionProcess.js</onActionProcess>
<iconId>VAADIN:CURLY_BRACKETS</iconId>
<stateProcess>%aditoprj%/entity/MosaicoTemplate_entity/entityfields/openadminview/stateProcess.js</stateProcess>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<orderClauseProcess>%aditoprj%/entity/MosaicoTemplate_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<onDBInsert>%aditoprj%/entity/MosaicoTemplate_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
<onDBDelete>%aditoprj%/entity/MosaicoTemplate_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<alias>Data_alias</alias>
<recordFieldMappings>
<dbRecordFieldMapping>
<name>CONTENT.value</name>
<recordfield>MOSAICOTEMPLATE.CONTENT</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>DATE_EDIT.value</name>
<recordfield>MOSAICOTEMPLATE.DATE_EDIT</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>DATE_NEW.value</name>
<recordfield>MOSAICOTEMPLATE.DATE_NEW</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>METADATA.value</name>
<recordfield>MOSAICOTEMPLATE.METADATA</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>MOSAICOTEMPLATEID.value</name>
<recordfield>MOSAICOTEMPLATE.MOSAICOTEMPLATEID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>NAME.value</name>
<recordfield>MOSAICOTEMPLATE.NAME</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>USER_EDIT.value</name>
<recordfield>MOSAICOTEMPLATE.USER_EDIT</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>USER_NEW.value</name>
<recordfield>MOSAICOTEMPLATE.USER_NEW</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>BASETEMPLATE.value</name>
<recordfield>MOSAICOTEMPLATE.BASETEMPLATE</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>BASETEMPLATE.displayValue</name>
<expression>%aditoprj%/entity/MosaicoTemplate_entity/recordcontainers/db/recordfieldmappings/basetemplate.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ISOLANGUAGE.value</name>
<recordfield>MOSAICOTEMPLATE.ISOLANGUAGE</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CATEGORY.value</name>
<recordfield>MOSAICOTEMPLATE.CATEGORY</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CATEGORY.displayValue</name>
<expression>%aditoprj%/entity/MosaicoTemplate_entity/recordcontainers/db/recordfieldmappings/category.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ISOLANGUAGE.displayValue</name>
<expression>%aditoprj%/entity/MosaicoTemplate_entity/recordcontainers/db/recordfieldmappings/isolanguage.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
<name>79f97860-53dd-42ef-b636-76ba5710e1cb</name>
<tableName>MOSAICOTEMPLATE</tableName>
<primaryKey>MOSAICOTEMPLATEID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
</linkInformation>
</dbRecordContainer>
</recordContainers>
</entity>
import("system.vars");
import("Sql_lib");
import("system.neon")
if (vars.get("$param.CopyMosaicoTemplateIdParam"))
{
var [metadata,content,basetemplate,isolanguage,category] = newSelect(["METADATA","CONTENT","BASETEMPLATE","ISOLANGUAGE","CATEGORY"])
.from("MOSAICOTEMPLATE")
.whereIfSet("MOSAICOTEMPLATE.MOSAICOTEMPLATEID","$param.CopyMosaicoTemplateIdParam")
.arrayRow(true);
neon.setFieldValues({
"$field.METADATA":metadata,
"$field.CONTENT":content,
"$field.BASETEMPLATE":basetemplate,
"$field.ISOLANGUAGE": isolanguage,
"$field.CATEGORY": category
});
}
\ No newline at end of file
import("system.result");
import("system.vars");
result.string(vars.getString("$field.NAME"));
\ No newline at end of file
= MosaicoTemplate_entity
This entity is used to store templates used in the mosaico email editor and load them again in mosaico for changes.
The datatransfer between mosaico and adito uses the mosaico_rest webservice.
\ No newline at end of file
import("system.result");
import("system.vars");
import("system.neon");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
result.string(neon.COMPONENTSTATE_EDITABLE) ;
}
else
{
result.string(neon.COMPONENTSTATE_READONLY);
}
\ No newline at end of file
import("system.vars");
import("system.neon");
var params = {
"copyMosaicoTemplateIdParam" : vars.get("$field.MOSAICOTEMPLATEID")
};
neon.openContext("MosaicoTemplate", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
result.string(vars.get("$sys.date"));
}
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
result.string(vars.get("$sys.date"));
}
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.MOSAICOTEMPLATEID"));
\ No newline at end of file
import("system.result");
result.string("MOSAICOTEMPLATE");
\ No newline at end of file
import("system.translate");
import("system.result");
import("system.vars");
import("Sql_lib");
var latinName = newSelect("NAME_LATIN")
.from("AB_LANGUAGE")
.whereIfSet("AB_LANGUAGE.ISO3", "$field.ISOLANGUAGE")
.cell(true)
result.string(translate.text(latinName));
import("system.neon");
import("system.vars");
import("system.result");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
{
result.string("deu");
}
\ No newline at end of file
import("system.result");
import("KeywordRegistry_basic")
result.string($KeywordRegistry.mosaicoBaseTemplate());
\ No newline at end of file
import("system.result");
import("KeywordRegistry_basic")
result.string($KeywordRegistry.mosaicoTemplateCategory());
\ No newline at end of file
import("system.vars");
import("Bulkmail_lib");
BulkMailUtils.createFromMosaicoTemplate(vars.get("$field.MOSAICOTEMPLATEID"));
\ No newline at end of file
import("system.vars");
import("system.neon");
var params = {
"CreateFromMosaicoTemplateId_param" : vars.get("$field.MOSAICOTEMPLATEID")
};
neon.openContext("DocumentTemplate", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
= MosaicoTemplate_entity
stores the data from the mosaico email editor in adito and provides basic functions for them.
\ No newline at end of file
import("system.vars");
import("Context_lib");
AdminViewUtils.open("MOSAICOTEMPLATEID", [
["DATE_NEW", vars.get("$field.DATE_NEW"), "DATE"],
["DATE_EDIT", vars.get("$field.DATE_EDIT"), "DATE"],
["USER_NEW", vars.get("$field.USER_NEW")],
["USER_EDIT", vars.get("$field.USER_EDIT")]
]);
\ No newline at end of file
import("Context_lib");
import("system.result");
result.string(AdminViewUtils.getActionState());
\ No newline at end of file
import("system.vars");
import("MosaicoTemplate_lib");
MosaicoUtils.openInMosaico(vars.get("$field.MOSAICOTEMPLATEID"));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment