diff --git a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml index d4d982c2c6de6b8ebd977fd61a23b77b6b0eca7b..b97380ae77faae94a57c4911178d14113d9f815a 100644 --- a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml +++ b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml @@ -158,4 +158,6 @@ <include relativeToChangelogFile="true" file="Attributes/AB_ATTRIBUTE.xml"/> <include relativeToChangelogFile="true" file="Attributes/AB_ATTRIBUTEUSAGE.xml"/> + + <include relativeToChangelogFile="true" file="create_description_translation.xml"/> </databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2019.1.4/create_description_translation.xml b/.liquibase/Data_alias/basic/2019.1.4/create_description_translation.xml new file mode 100644 index 0000000000000000000000000000000000000000..07230bba7ef2d81b2165a00c360d2295255b1483 --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.1.4/create_description_translation.xml @@ -0,0 +1,18 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> +<changeSet author="m.mansour" id="ba354d1e-f161-4b20-aaf2-f7ddf6419f57"> + <createTable tableName="DESCRIPTIONTRANSLATION"> + <column name="DESCRIPTIONTRANSLATIONID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_DESCRIPTIONTRANSLATION_DESCRIPTIONTRANSLATIONID"/> + </column> + <column name="OBJECT_TYPE" type="VARCHAR(50)"> + <constraints nullable="false"/> + </column> + <column name="OBJECT_ROWID" type="CHAR(36)"> + <constraints nullable="false"/> + </column> + <column name="LANG" type="CHAR(36)"/> + <column name="DESCRIPTION" type="NCLOB"/> + </createTable> +</changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index cb33c328630ad40bf1b679eb5ffce476e1a1b315..520aa65dd73f3658a108e2863d3ec291b5556c33 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -10013,6 +10013,256 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>DESCRIPTIONTRANSLATION</name> + <dbName></dbName> + <idColumn>DESCRIPTIONTRANSLATIONID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>OBJECT_ROWID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DESCRIPTIONTRANSLATIONID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DESCRIPTION</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>OBJECT_TYPE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>LANG</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>AB_UNLINKEDMAIL</name> + <dbName></dbName> + <idColumn>AB_UNLINKEDMAILID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>MAIL</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SENDER</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="1000" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SUBJECT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="200" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>AB_UNLINKEDMAILID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>RECIPIENTS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="4000" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SENTDATE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod b/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..071ec6c9a7515e3678da56306ca661ff8f4865bc --- /dev/null +++ b/entity/DescriptionTranslation_entity/DescriptionTranslation_entity.aod @@ -0,0 +1,118 @@ +<?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.9" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.9"> + <name>DescriptionTranslation_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <title>Description</title> + <titlePlural>Descriptions</titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>DESCRIPTIONTRANSLATIONID</name> + </entityField> + <entityField> + <name>OBJECT_TYPE</name> + <title>Type</title> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/DescriptionTranslation_entity/entityfields/object_type/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_ROWID</name> + <title>Object</title> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/DescriptionTranslation_entity/entityfields/object_rowid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>LANG</name> + <title>Language</title> + <consumer>Languages</consumer> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/DescriptionTranslation_entity/entityfields/lang/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>DESCRIPTION</name> + <title>Description</title> + <mandatory v="true" /> + </entityField> + <entityConsumer> + <name>Languages</name> + <dependency> + <name>dependency</name> + <entityName>Language_entity</entityName> + <fieldName>ISO3NameFiltered</fieldName> + </dependency> + <children> + <entityParameter> + <name>ExcludedIds_param</name> + <valueProcess>%aditoprj%/entity/DescriptionTranslation_entity/entityfields/languages/children/excludedids_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>ObjectRowid_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityProvider> + <name>DescriptionTranslations</name> + <dependencies> + <entityDependency> + <name>72298519-6028-4d4b-9ef6-3227fb065bb8</name> + <entityName>Product_entity</entityName> + <fieldName>DescriptionTranslations</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <linkInformation> + <linkInformation> + <name>b12c4b68-b868-45fe-9f72-aa914a19382a</name> + <tableName>DESCRIPTIONTRANSLATION</tableName> + <primaryKey>DESCRIPTIONTRANSLATIONID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DESCRIPTION.value</name> + <recordfield>DESCRIPTIONTRANSLATION.DESCRIPTION</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DESCRIPTIONTRANSLATIONID.value</name> + <recordfield>DESCRIPTIONTRANSLATION.DESCRIPTIONTRANSLATIONID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_ROWID.value</name> + <recordfield>DESCRIPTIONTRANSLATION.OBJECT_ROWID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_TYPE.value</name> + <recordfield>DESCRIPTIONTRANSLATION.OBJECT_TYPE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LANG.value</name> + <recordfield>DESCRIPTIONTRANSLATION.LANG</recordfield> + <expression>%aditoprj%/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.value/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LANG.displayValue</name> + <expression>%aditoprj%/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/DescriptionTranslation_entity/entityfields/lang/displayValueProcess.js b/entity/DescriptionTranslation_entity/entityfields/lang/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ac0f29fc259baae6d6042a83e588737d6c76fd31 --- /dev/null +++ b/entity/DescriptionTranslation_entity/entityfields/lang/displayValueProcess.js @@ -0,0 +1,10 @@ +import("system.db"); +import("system.translate"); +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("Sql_lib"); + +result.string(translate.text(db.cell(SqlCondition.begin().andPrepareVars("AB_LANGUAGE.ISO3", "$this.value") + .buildSql("select NAME_LATIN from AB_LANGUAGE", "1=2")))); \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/entityfields/languages/children/excludedids_param/valueProcess.js b/entity/DescriptionTranslation_entity/entityfields/languages/children/excludedids_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..15bf867229fbf60954c4f5da8528c73dfd8ba5da --- /dev/null +++ b/entity/DescriptionTranslation_entity/entityfields/languages/children/excludedids_param/valueProcess.js @@ -0,0 +1,9 @@ +import("Sql_lib"); +import("system.db"); +import("system.result"); +import("system.neon"); + +result.object(db.array(db.COLUMN, SqlCondition.begin() + .andPrepareVars("DESCRIPTIONTRANSLATION.OBJECT_TYPE", "$param.ObjectType_param") + .andPrepareVars("DESCRIPTIONTRANSLATION.OBJECT_ROWID", "$param.ObjectRowid_param") + .buildSql("select LANG from DESCRIPTIONTRANSLATION", "1=2"))); \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/entityfields/object_rowid/valueProcess.js b/entity/DescriptionTranslation_entity/entityfields/object_rowid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..753abe3b0853ce610cfe25e8b2632e84fa865617 --- /dev/null +++ b/entity/DescriptionTranslation_entity/entityfields/object_rowid/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$param.ObjectRowid_param")); +} \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/entityfields/object_type/valueProcess.js b/entity/DescriptionTranslation_entity/entityfields/object_type/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..55877cba6b885eb12a5f2be9928a7cd5acaa287d --- /dev/null +++ b/entity/DescriptionTranslation_entity/entityfields/object_type/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$param.ObjectType_param")); +} \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js b/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..59b16d3684e1267b5ac40e6cb6bc9e926ffca60c --- /dev/null +++ b/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,9 @@ +import("system.db"); +import("system.result"); +import("Sql_lib"); + +var cond = SqlCondition.begin() + .andPrepareVars("DESCRIPTIONTRANSLATION.OBJECT_TYPE", "$param.ObjectType_param") + .andPrepareVars("DESCRIPTIONTRANSLATION.OBJECT_ROWID", "$param.ObjectRowid_param"); + +result.string(db.translateCondition(cond.build("1 = 2"))) \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.displayvalue/expression.js b/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..66406524c0b9bb6d95b1a4450b1ed61daeb16b4e --- /dev/null +++ b/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.displayvalue/expression.js @@ -0,0 +1,7 @@ +import("system.logging"); +import("system.result"); +import("Keyword_lib"); + +var sql = LanguageKeywordUtils.getResolvedTitleSqlPart("DESCRIPTIONTRANSLATION.LANG"); +logging.log(sql) +result.string(sql); \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.value/expression.js b/entity/DescriptionTranslation_entity/recordcontainers/db/recordfieldmappings/lang.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/Language_entity/Language_entity.aod b/entity/Language_entity/Language_entity.aod index 89843a7e0ba6731d6a87a98ae3ec8a13691cc0ce..439c799ebb507bf1cb787e323fe7ec070a3d9be2 100644 --- a/entity/Language_entity/Language_entity.aod +++ b/entity/Language_entity/Language_entity.aod @@ -74,12 +74,40 @@ <isConsumer v="false" /> </entityDependency> </dependencies> + <children> + <entityParameter> + <name>ExcludedIds_param</name> + <expose v="false" /> + </entityParameter> + </children> </entityProvider> + <entityProvider> + <name>ISO3NameFiltered</name> + <dependencies> + <entityDependency> + <name>2df9d0ed-c26b-4166-9667-786a55146e05</name> + <entityName>DescriptionTranslation_entity</entityName> + <fieldName>Languages</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>ExcludedIds_param</name> + <expose v="true" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>ExcludedIds_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/Language_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <linkInformation> <linkInformation> <name>3cd06d7c-16c3-49e5-87cd-672a7222e613</name> diff --git a/entity/Language_entity/recordcontainers/db/conditionProcess.js b/entity/Language_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ac4edfa282628da0d22242de79ef276414cb7307 --- /dev/null +++ b/entity/Language_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.db"); +import("system.result"); +import("Sql_lib"); + +var cond = SqlCondition.begin() + .andIn("AB_LANGUAGE.ISO3", JSON.parse(vars.getString("$param.ExcludedIds_param")), undefined, true) + +result.string(db.translateCondition(cond.build("1 = 1"))) \ No newline at end of file diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index 8adc4776543990ecd11199ac501e64bc7176529a..d43d263ba277e79dcacbee3d286403474473c755 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -445,6 +445,24 @@ <name>ProductText_param</name> <valueProcess>%aditoprj%/entity/Product_entity/entityfields/producttext_param/valueProcess.js</valueProcess> </entityParameter> + <entityConsumer> + <name>DescriptionTranslations</name> + <dependency> + <name>dependency</name> + <entityName>DescriptionTranslation_entity</entityName> + <fieldName>DescriptionTranslations</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectRowid_param</name> + <valueProcess>%aditoprj%/entity/Product_entity/entityfields/descriptiontranslations/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Product_entity/entityfields/descriptiontranslations/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Product_entity/entityfields/descriptiontranslations/children/objectrowid_param/valueProcess.js b/entity/Product_entity/entityfields/descriptiontranslations/children/objectrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..533f8ec837ea2f9b588ddf05545ac47cdda23d18 --- /dev/null +++ b/entity/Product_entity/entityfields/descriptiontranslations/children/objectrowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$sys.uid")); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/descriptiontranslations/children/objecttype_param/valueProcess.js b/entity/Product_entity/entityfields/descriptiontranslations/children/objecttype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cc6924394ae950c43386275dda2c8db5d7a9c0ed --- /dev/null +++ b/entity/Product_entity/entityfields/descriptiontranslations/children/objecttype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("Context_lib"); +import("system.result"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/neonContext/DescriptionTranslation/DescriptionTranslation.aod b/neonContext/DescriptionTranslation/DescriptionTranslation.aod new file mode 100644 index 0000000000000000000000000000000000000000..63008a00cac677d311e28cd69b5c4b0f37e8d53d --- /dev/null +++ b/neonContext/DescriptionTranslation/DescriptionTranslation.aod @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>DescriptionTranslation</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterview>DescriptionTranslationFilter_view</filterview> + <editview>DescriptionTranslationEdit_view</editview> + <entity>DescriptionTranslation_entity</entity> + <references> + <neonViewReference> + <name>dd74152c-282f-4cde-9ad8-93a027dbbf56</name> + <view>DescriptionTranslationFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>0d8720bb-5bef-4913-a0ea-d426875d8127</name> + <view>DescriptionTranslationEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/DescriptionTranslationEdit_view/DescriptionTranslationEdit_view.aod b/neonView/DescriptionTranslationEdit_view/DescriptionTranslationEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..4069467fa6972ef875ba75412873cedb2765bfc5 --- /dev/null +++ b/neonView/DescriptionTranslationEdit_view/DescriptionTranslationEdit_view.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>DescriptionTranslationEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>translationData</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>9f8ad216-e4da-4973-bf3f-1d24dca765f3</name> + <entityField>LANG</entityField> + </entityFieldLink> + <entityFieldLink> + <name>64dde5e6-d8f7-42f7-bea9-104210ebf08f</name> + <entityField>DESCRIPTION</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod b/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..043efc0bd39b67534eb63122bcf14f71c6a5e293 --- /dev/null +++ b/neonView/DescriptionTranslationFilter_view/DescriptionTranslationFilter_view.aod @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>DescriptionTranslationFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>translation</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>4bdaf352-d5f1-44a1-9cca-7cb877928ba5</name> + <entityField>LANG</entityField> + </neonTableColumn> + <neonTableColumn> + <name>e00000eb-c883-4fd4-854e-c985938392aa</name> + <entityField>DESCRIPTION</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/ProductMain_view/ProductMain_view.aod b/neonView/ProductMain_view/ProductMain_view.aod index 44ff539d6aea525dd5b2f9653fd2b80d7b408649..b5ea26c430afe88e5a505013a5b28d2ce58604eb 100644 --- a/neonView/ProductMain_view/ProductMain_view.aod +++ b/neonView/ProductMain_view/ProductMain_view.aod @@ -1,58 +1,63 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ProductMain_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <masterSlaveLayout> - <name>layout</name> - <master>9ff71d55-84be-411e-9637-5dc0eba6c79e</master> - </masterSlaveLayout> - </layout> - <children> - <neonViewReference> - <name>9ff71d55-84be-411e-9637-5dc0eba6c79e</name> - <entityField>#ENTITY</entityField> - <view>ProductPreview_view</view> - </neonViewReference> - <neonViewReference> - <name>41887933-bb9a-48ce-818d-1db815021a36</name> - <entityField>Activities</entityField> - <view>ActivityFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>754b4efe-3ea7-42de-8e35-c85c3a0b4abf</name> - <entityField>Tasks</entityField> - <view>TaskFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>51f37fe5-91e1-4b76-83b3-be0319e871a4</name> - <entityField>#ENTITY</entityField> - <view>ProductDescription_view</view> - </neonViewReference> - <neonViewReference> - <name>7f416115-ff89-45ca-be10-ed568cac266c</name> - <entityField>ProductLinks</entityField> - <view>Prod2prodFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>11c4c5a0-27fa-4748-a6c6-3a667d2f3d8f</name> - <entityField>Productprices</entityField> - <view>ProductpriceFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>616f7cc3-93e7-41ee-8d38-027dd3d4b299</name> - <entityField>Documents</entityField> - <view>DocumentFilter_view</view> - </neonViewReference> - <neonViewReference> - <name>6ee1258f-b571-45c1-b833-f292361b5a04</name> - <entityField>AttributeTree</entityField> - <view>AttributeRelationTree_view</view> - </neonViewReference> - <neonViewReference> - <name>0faf6a9e-b1f3-452d-b7fd-d0c9e3fc25f8</name> - <entityField>LogHistoryConsumer</entityField> - <view>LogHistoryFilter_view</view> - </neonViewReference> - </children> -</neonView> +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ProductMain_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <masterSlaveLayout> + <name>layout</name> + <master>9ff71d55-84be-411e-9637-5dc0eba6c79e</master> + </masterSlaveLayout> + </layout> + <children> + <neonViewReference> + <name>9ff71d55-84be-411e-9637-5dc0eba6c79e</name> + <entityField>#ENTITY</entityField> + <view>ProductPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>41887933-bb9a-48ce-818d-1db815021a36</name> + <entityField>Activities</entityField> + <view>ActivityFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>754b4efe-3ea7-42de-8e35-c85c3a0b4abf</name> + <entityField>Tasks</entityField> + <view>TaskFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>51f37fe5-91e1-4b76-83b3-be0319e871a4</name> + <entityField>#ENTITY</entityField> + <view>ProductDescription_view</view> + </neonViewReference> + <neonViewReference> + <name>7f416115-ff89-45ca-be10-ed568cac266c</name> + <entityField>ProductLinks</entityField> + <view>Prod2prodFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>11c4c5a0-27fa-4748-a6c6-3a667d2f3d8f</name> + <entityField>Productprices</entityField> + <view>ProductpriceFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>616f7cc3-93e7-41ee-8d38-027dd3d4b299</name> + <entityField>Documents</entityField> + <view>DocumentFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>c647d35b-3535-4acf-b6cb-c9786a353b08</name> + <entityField>DescriptionTranslations</entityField> + <view>DescriptionTranslationFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>6ee1258f-b571-45c1-b833-f292361b5a04</name> + <entityField>AttributeTree</entityField> + <view>AttributeRelationTree_view</view> + </neonViewReference> + <neonViewReference> + <name>0faf6a9e-b1f3-452d-b7fd-d0c9e3fc25f8</name> + <entityField>LogHistoryConsumer</entityField> + <view>LogHistoryFilter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index 1bec33e710bf9e3396cbef4005e1d374ac018527..80de2ad6f59ea933c2d7ea90a37806950ecde558 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -25,15 +25,7 @@ function ContextUtils() {} */ ContextUtils.getCurrentContextId = function() { - var entityName = vars.getString("$sys.currententityname"); - // TODO: replace with Core-method instead of switch-case!!! - - // TODO: workaround: remove "entity" and add "context". This is a Workaround and has to be changed (see above todo)! - return entityName.substr(0, entityName.length-7); - - - - // return vars.getString("$sys.currentcontextname"); + return vars.getString("$sys.currentcontextname"); } /**