diff --git a/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod b/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod index bb483a46acd306a1096488ef3a58288d6e768fd0..31f2c0b2265b3191fba0dad99ac417b1b71da198 100644 --- a/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod +++ b/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod @@ -74,6 +74,34 @@ </entityDependency> </dependencies> </entityProvider> + <entityField> + <name>AB_ATTRIBUTE_ID</name> + <title>Attribute</title> + <consumer>SpecificAttribute</consumer> + </entityField> + <entityField> + <name>VALUE</name> + <title>Value</title> + </entityField> + <entityConsumer> + <name>SpecificAttribute</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/specificattribute/children/objecttype_param/valueProcess.js</valueProcess> + <triggerRecalculation v="true" /> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>ATTRIBUTE_TYPE</name> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/AttributeRelationTree_entity/entityfields/specificattribute/children/objecttype_param/valueProcess.js b/entity/AttributeRelationTree_entity/entityfields/specificattribute/children/objecttype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5c2ba1e99bd66da1cbc065319b7644302880879f --- /dev/null +++ b/entity/AttributeRelationTree_entity/entityfields/specificattribute/children/objecttype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.exists("$param.ObjectType_param") ? vars.get("$param.ObjectType_param") : ""); diff --git a/entity/AttributeUsage_entity/AttributeUsage_entity.aod b/entity/AttributeUsage_entity/AttributeUsage_entity.aod index 1d04eaa1faddc57d89dd575a5bd69803b7ae14fa..592e1c543ee3153657b8835c77f89b5ab4a9b33c 100644 --- a/entity/AttributeUsage_entity/AttributeUsage_entity.aod +++ b/entity/AttributeUsage_entity/AttributeUsage_entity.aod @@ -75,6 +75,14 @@ <name>GetAllContexts_param</name> <valueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/context/children/getallcontexts_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>UseExclusives_param</name> + <valueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/context/children/useexclusives_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ExclusiveContexts_param</name> + <valueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/context/children/exclusivecontexts_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> </entityFields> diff --git a/entity/AttributeUsage_entity/entityfields/context/children/exclusivecontexts_param/valueProcess.js b/entity/AttributeUsage_entity/entityfields/context/children/exclusivecontexts_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9ccd8c87e5829b0b4895728bee6a2d184aaa0424 --- /dev/null +++ b/entity/AttributeUsage_entity/entityfields/context/children/exclusivecontexts_param/valueProcess.js @@ -0,0 +1,12 @@ +import("system.result"); + +result.object([ + "Organisation", + "Person", + "Contract", + "Product", + "Activity", + "Offer", + "Employee", + "Salesproject" +]); \ No newline at end of file diff --git a/entity/AttributeUsage_entity/entityfields/context/children/useexclusives_param/valueProcess.js b/entity/AttributeUsage_entity/entityfields/context/children/useexclusives_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cda204045d2aba9ae974e0ce2200ba0cc6c852c0 --- /dev/null +++ b/entity/AttributeUsage_entity/entityfields/context/children/useexclusives_param/valueProcess.js @@ -0,0 +1,2 @@ +import("system.result"); +result.string(true); \ No newline at end of file diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 48ab217a1dca6252d2cb0cc945686232e9059873..c453e2a87ae59728697f2b1beab93517727895b8 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -183,6 +183,12 @@ <fieldName>SpecificAttribute</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>ba3b4d47-7385-49df-bf61-54c99f5b2c81</name> + <entityName>AttributeRelationTree_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -197,6 +203,18 @@ <name>DisplaySimpleName_param</name> <expose v="true" /> </entityParameter> + <entityParameter> + <name>AttrParentId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttrParentType_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>GetGroups_param</name> + <expose v="false" /> + </entityParameter> </children> </entityProvider> <entityField> @@ -278,6 +296,7 @@ </entityField> <entityField> <name>UID</name> + <searchable v="false" /> </entityField> </entityFields> <recordContainers> diff --git a/entity/Attribute_entity/recordcontainers/jdito/onInsert.js b/entity/Attribute_entity/recordcontainers/jdito/onInsert.js index 87565632d7cf592ac1bfe137d87ca62be849a32c..0b179785ecd355f6fa968af68100066ed0ae1d0a 100644 --- a/entity/Attribute_entity/recordcontainers/jdito/onInsert.js +++ b/entity/Attribute_entity/recordcontainers/jdito/onInsert.js @@ -4,7 +4,6 @@ import("system.vars"); var columns = [ "AB_ATTRIBUTEID", "ATTRIBUTE_ACTIVE", - "ATTRIBUTE_LEVEL", "ATTRIBUTE_NAME", "ATTRIBUTE_PARENT_ID", "ATTRIBUTE_TYPE", @@ -13,7 +12,6 @@ var columns = [ var values = [ vars.get("$field.UID"), vars.get("$field.ATTRIBUTE_ACTIVE"), - vars.get("$field.ATTRIBUTE_LEVEL"), vars.get("$field.ATTRIBUTE_NAME"), vars.get("$field.ATTRIBUTE_PARENT_ID"), vars.get("$field.ATTRIBUTE_TYPE"), diff --git a/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js b/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js index 6740df0d149b19858958fbc5b0c9839a721bd4e1..152518a6dc366aea41d1046ad21d913d2b86b537 100644 --- a/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js @@ -4,7 +4,6 @@ import("system.vars"); var columns = [ "ATTRIBUTE_ACTIVE", - "ATTRIBUTE_LEVEL", "ATTRIBUTE_NAME", "ATTRIBUTE_PARENT_ID", "ATTRIBUTE_TYPE", @@ -12,7 +11,6 @@ var columns = [ ]; var values = [ vars.get("$field.ATTRIBUTE_ACTIVE"), - vars.get("$field.ATTRIBUTE_LEVEL"), vars.get("$field.ATTRIBUTE_NAME"), vars.get("$field.ATTRIBUTE_PARENT_ID"), vars.get("$field.ATTRIBUTE_TYPE"), @@ -23,4 +21,4 @@ var condition = SqlCondition.begin() .andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.UID") .build("1=2"); -db.updateData("AB_ATTRIBUTE", columns, null, values, conditon); \ No newline at end of file +db.updateData("AB_ATTRIBUTE", columns, null, values, condition); \ No newline at end of file diff --git a/entity/Context_entity/Context_entity.aod b/entity/Context_entity/Context_entity.aod index ae0b115f7aeb9e8496d700685ebd2bf01c2271c8..f1169026a4f400e22cbff3a169ee330dacb486e0 100644 --- a/entity/Context_entity/Context_entity.aod +++ b/entity/Context_entity/Context_entity.aod @@ -45,13 +45,13 @@ </dependencies> <children> <entityParameter> - <name>excludeContexts_param</name> + <name>ExclusiveContexts_param</name> <expose v="false" /> </entityParameter> </children> </entityProvider> <entityParameter> - <name>excludeContexts_param</name> + <name>ExclusiveContexts_param</name> <expose v="true" /> <description>PARAMETER</description> </entityParameter> @@ -68,8 +68,9 @@ </dependencies> <children> <entityParameter> - <name>excludeContexts_param</name> - <valueProcess>%aditoprj%/entity/Context_entity/entityfields/activitylinkable/children/excludecontexts_param/valueProcess.js</valueProcess> + <name>ExclusiveContexts_param</name> + <valueProcess>%aditoprj%/entity/Context_entity/entityfields/activitylinkable/children/exclusivecontexts_param/valueProcess.js</valueProcess> + <expose v="false" /> </entityParameter> </children> </entityProvider> @@ -86,8 +87,9 @@ </dependencies> <children> <entityParameter> - <name>excludeContexts_param</name> - <valueProcess>%aditoprj%/entity/Context_entity/entityfields/tasklinkable/children/excludecontexts_param/valueProcess.js</valueProcess> + <name>ExclusiveContexts_param</name> + <valueProcess>%aditoprj%/entity/Context_entity/entityfields/tasklinkable/children/exclusivecontexts_param/valueProcess.js</valueProcess> + <expose v="false" /> </entityParameter> </children> </entityProvider> @@ -96,6 +98,11 @@ <expose v="true" /> <description>PARAMETER</description> </entityParameter> + <entityParameter> + <name>UseExclusives_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/Context_entity/entityfields/activitylinkable/children/excludecontexts_param/valueProcess.js b/entity/Context_entity/entityfields/activitylinkable/children/exclusivecontexts_param/valueProcess.js similarity index 100% rename from entity/Context_entity/entityfields/activitylinkable/children/excludecontexts_param/valueProcess.js rename to entity/Context_entity/entityfields/activitylinkable/children/exclusivecontexts_param/valueProcess.js diff --git a/entity/Context_entity/entityfields/tasklinkable/children/excludecontexts_param/valueProcess.js b/entity/Context_entity/entityfields/tasklinkable/children/exclusivecontexts_param/valueProcess.js similarity index 100% rename from entity/Context_entity/entityfields/tasklinkable/children/excludecontexts_param/valueProcess.js rename to entity/Context_entity/entityfields/tasklinkable/children/exclusivecontexts_param/valueProcess.js diff --git a/entity/Context_entity/recordcontainers/jdito/contentProcess.js b/entity/Context_entity/recordcontainers/jdito/contentProcess.js index 6ae2f8ad3cb2027b7ca6d81d5c7a803cf78b2663..29391c90234a2a5d1408843663ae6e6c4c1e4abd 100644 --- a/entity/Context_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Context_entity/recordcontainers/jdito/contentProcess.js @@ -2,9 +2,10 @@ import("system.vars"); import("system.result"); import("Context_lib"); -var excludeContexts = vars.getString("$param.excludeContexts_param"); +var excludeContexts = vars.getString("$param.ExclusiveContexts_param"); if (excludeContexts) excludeContexts = JSON.parse(excludeContexts); var filterContexts = !(vars.exists("$param.GetAllContexts_param") && vars.get("$param.GetAllContexts_param") == "true"); +var useExclusives = vars.exists("$param.UseExclusives_param") && vars.get("$param.UseExclusives_param") == "true"; -result.object(ContextUtils.getContexts(filterContexts, excludeContexts)); \ No newline at end of file +result.object(ContextUtils.getContexts(filterContexts, excludeContexts, useExclusives)); \ No newline at end of file diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 7c6776025bc26887c888cd43a412665e3e0230eb..d3dbd1c345bcb93dd0892cad11e35ad25e293052 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -3025,6 +3025,7 @@ </entry> <entry> <key>Group</key> + <value>Gruppe</value> </entry> <entry> <key>Combobox</key> diff --git a/neonContext/AttributeRelationTree/AttributeRelationTree.aod b/neonContext/AttributeRelationTree/AttributeRelationTree.aod index bcd7bec8f8c74b3791ebdd93a728c950493b2781..9acb4ce97d8d3d086df679b67f01a23ac945eb63 100644 --- a/neonContext/AttributeRelationTree/AttributeRelationTree.aod +++ b/neonContext/AttributeRelationTree/AttributeRelationTree.aod @@ -1,12 +1,16 @@ -<?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>AttributeRelationTree</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <entity>AttributeRelationTree_entity</entity> - <references> - <neonViewReference> - <name>55f89863-72b0-4179-8494-b1e320d79de9</name> - <view>AttributeRelationTree_view</view> - </neonViewReference> - </references> -</neonContext> +<?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>AttributeRelationTree</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>AttributeRelationTree_entity</entity> + <references> + <neonViewReference> + <name>55f89863-72b0-4179-8494-b1e320d79de9</name> + <view>AttributeRelationTree_view</view> + </neonViewReference> + <neonViewReference> + <name>591d27d7-e963-4ff0-9d82-2e24b18e6b5c</name> + <view>AttributeRelationTreeEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/AttributeRelationTreeEdit_view/AttributeRelationTreeEdit_view.aod b/neonView/AttributeRelationTreeEdit_view/AttributeRelationTreeEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..a08a9caf68eae886534365f3357e585d2b79b59a --- /dev/null +++ b/neonView/AttributeRelationTreeEdit_view/AttributeRelationTreeEdit_view.aod @@ -0,0 +1,28 @@ +<?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>AttributeRelationTreeEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Generic</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>e5635cd6-1a95-455a-af89-5baf4259caa0</name> + <entityField>AB_ATTRIBUTE_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>abec86c9-3d77-4129-b34b-d30da0526572</name> + <entityField>VALUE</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index dcb6054d49d0fc2be25a61fefb8426355287155f..ee1242dde2f44628e793fdf78919a49c5a1b9e69 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -42,30 +42,34 @@ ContextUtils.getContextName = function(pContextId) /** * * @param {Boolean} [pFilter=false] filter only for contexts which have a mapping in ContextUtils.getSelectMap - * @param {String[]} [pExcludeContexts] contextIds that shall not be included (so this is a additional filter to the pFiler param) + * @param {String[]} [pExclusiveContexts] contextIds that shall not be included (so this is a additional filter to the pFilter param) + * @param {Boolean} [pUseExclusives=false] decides whether the items in pExclusiveContexts are excluded (false) or + * everything that is not in pExclusiveContexts is excluded (true) * * @return {String[][]} the contexts [[contextId, contextName, contextTitle], [... ], ...] */ -ContextUtils.getContexts = function(pFilter, pExcludeContexts) +ContextUtils.getContexts = function(pFilter, pExclusiveContexts, pUseExclusives) { if (pFilter == undefined) pFilter = false; + if (pUseExclusives == undefined) + pUseExclusives = false; var contexts = project.getDataModels(project.DATAMODEL_KIND_CONTEXT); if (pFilter) { contexts = contexts.filter(function(pContext) { - if (pExcludeContexts && pExcludeContexts.indexOf(pContext[0]) > -1) + if (pExclusiveContexts && pExclusiveContexts.indexOf(pContext[0]) > -1 != pUseExclusives) return false; // filter only contexts which have defined mappings in Context_lib return ContextUtils.getSelectMap ()[pContext[0]] != undefined; }); } - else if (pExcludeContexts) + else if (pExclusiveContexts) { contexts = contexts.filter(function(pContext) { - if (pExcludeContexts && pExcludeContexts.indexOf(pContext[0]) > -1) + if (pExclusiveContexts && pExclusiveContexts.indexOf(pContext[0]) > -1 != pUseExclusives) return false; return true; });