diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index 2e1d16f733337a8afac72bade167b2f8821a29b3..fdb6fb795564c093ceb8b381a8792986cb822700 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -487,6 +487,50 @@ <name>Subject_param</name> <expose v="true" /> </entityParameter> + <entityConsumer> + <name>ActivityAtrributes</name> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/activityatrributes/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AttributeTypes_param</name> + <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/activityatrributes/children/attributetypes_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/activityatrributes/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>AttributeTreeIsTheme</name> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>IsTheme_param</name> + <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/attributetreeistheme/children/istheme_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/attributetreeistheme/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/attributetreeistheme/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Activity_entity/entityfields/activityatrributes/children/attributetypes_param/valueProcess.js b/entity/Activity_entity/entityfields/activityatrributes/children/attributetypes_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ad16e0d607228dd4e88a09fdf00e80c9e39261aa --- /dev/null +++ b/entity/Activity_entity/entityfields/activityatrributes/children/attributetypes_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Attribute_lib"); + +result.object([$AttributeTypes.THEME.toString()]); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/activityatrributes/children/objectrowid_param/valueProcess.js b/entity/Activity_entity/entityfields/activityatrributes/children/objectrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..06fe7d36324315ad85bfd6d0099c5aa6b2da98d4 --- /dev/null +++ b/entity/Activity_entity/entityfields/activityatrributes/children/objectrowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.ACTIVITYID")); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/activityatrributes/children/objecttype_param/valueProcess.js b/entity/Activity_entity/entityfields/activityatrributes/children/objecttype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e8b4e72e74a0a4696ff39e83135aa6100ef908c0 --- /dev/null +++ b/entity/Activity_entity/entityfields/activityatrributes/children/objecttype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); diff --git a/entity/Activity_entity/entityfields/attributetreeistheme/children/istheme_param/valueProcess.js b/entity/Activity_entity/entityfields/attributetreeistheme/children/istheme_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..40effa0178464da0c7850912345f19c7fa95975a --- /dev/null +++ b/entity/Activity_entity/entityfields/attributetreeistheme/children/istheme_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(true); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/attributetreeistheme/children/objectrowid_param/valueProcess.js b/entity/Activity_entity/entityfields/attributetreeistheme/children/objectrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a8267b62060b4bd30cedaba4713f4421a6e6f9ff --- /dev/null +++ b/entity/Activity_entity/entityfields/attributetreeistheme/children/objectrowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.ACTIVITYID")); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/attributetreeistheme/children/objecttype_param/valueProcess.js b/entity/Activity_entity/entityfields/attributetreeistheme/children/objecttype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e8b4e72e74a0a4696ff39e83135aa6100ef908c0 --- /dev/null +++ b/entity/Activity_entity/entityfields/attributetreeistheme/children/objecttype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index 1c859024a974f4d7bf3116280656e74d8eeb3101..ca18f8ae389fb1ac7e543ef06470b05aa937e6f8 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -84,6 +84,12 @@ <fieldName>AttributeTree</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>80a034ee-c3fd-45e3-986c-d3854608c148</name> + <entityName>Activity_entity</entityName> + <fieldName>AttributeTreeIsTheme</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -270,6 +276,14 @@ <name>ATTRIBUTE_TYPE</name> <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attribute_type/valueProcess.js</valueProcess> </entityField> + <entityParameter> + <name>AttributeId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>IsTheme_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js b/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js index 6b6e340e293f84eca8876a814e60bcec0ffca4b0..63d07df52b1e62046aad63448e9b1ef1d2b0def9 100644 --- a/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/AttributeRelation_entity/recordcontainers/jdito/contentProcess.js @@ -74,6 +74,15 @@ if (rowId) sqlCondition.and("1=1"); } +var IsTheme = vars.exists("$param.IsTheme_param") && vars.getString("$param.IsTheme_param") == "true"; +if (IsTheme){ + sqlCondition.andPrepare("AB_ATTRIBUTE.ATTRIBUTE_TYPE", 'THEME'); +} +else + { + sqlCondition.andPrepare("AB_ATTRIBUTE.ATTRIBUTE_TYPE", 'THEME', "# != ?"); + } + joinCondition.and("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID"); var defaultFields = [ diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index c95832f4435d49e6740928dc0f303d0f1a8033c0..cc99164ec880429153f2d3fda1eaf2140fb7c9c6 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -1,410 +1,427 @@ -<?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.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11"> - <name>Attribute_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/entity/Attribute_entity/documentation.adoc</documentation> - <title>Attribute</title> - <contentTitleProcess>%aditoprj%/entity/Attribute_entity/contentTitleProcess.js</contentTitleProcess> - <afterUiInit>%aditoprj%/entity/Attribute_entity/afterUiInit.js</afterUiInit> - <onValidation>%aditoprj%/entity/Attribute_entity/onValidation.js</onValidation> - <iconId>VAADIN:TAG</iconId> - <titlePlural>Attributes</titlePlural> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>ATTRIBUTE_NAME</name> - <title>Title (original language)</title> - <mandatory v="true" /> - <state>EDITABLE</state> - </entityField> - <entityField> - <name>ATTRIBUTE_TYPE</name> - <title>Type</title> - <consumer>KeywordAttributeTypes</consumer> - <mandatory v="true" /> - <state>READONLY</state> - <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/displayValueProcess.js</displayValueProcess> - <onValueChange>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/onValueChange.js</onValueChange> - </entityField> - <entityField> - <name>ATTRIBUTE_PARENT_ID</name> - <title>Superordinate Attribute</title> - <consumer>AttributeGroup</consumer> - <linkedContext>Attribute</linkedContext> - <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/displayValueProcess.js</displayValueProcess> - <onValueChangeTypes> - <element>MASK</element> - <element>PROCESS</element> - <element>PROCESS_SETVALUE</element> - </onValueChangeTypes> - </entityField> - <entityConsumer> - <name>AttributeChildren</name> - <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>AttributeParent</fieldName> - </dependency> - <children> - <entityParameter> - <name>AttrParentId_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/children/attrparentid_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AttrParentType_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/children/attrparenttype_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityConsumer> - <entityProvider> - <name>AttributeParent</name> - <dependencies> - <entityDependency> - <name>18bd148d-bed3-429f-ba54-c5eac76c5083</name> - <entityName>Attribute_entity</entityName> - <fieldName>AttributeChildren</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>9fb3569c-7c75-48b1-9dc0-3f707940813a</name> - <entityName>Employee_entity</entityName> - <fieldName>Departments</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>AttrParentType_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>AttrParentId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>AttributeCount_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>GetGroups_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AttributeTypes_param</name> - <expose v="false" /> - </entityParameter> - </children> - </entityProvider> - <entityParameter> - <name>AttrParentId_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityConsumer> - <name>AttributeUsages</name> - <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>AttributeUsage_entity</entityName> - <fieldName>SpecificAttribute</fieldName> - </dependency> - <children> - <entityParameter> - <name>AttributeId_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/attributeid_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>SingleSelection_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/singleselection_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>DisableMinCount_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/disablemincount_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>ATTRIBUTE_ACTIVE</name> - <title>Active</title> - <contentType>BOOLEAN</contentType> - <groupable v="true" /> - <dropDownProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_active/dropDownProcess.js</dropDownProcess> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_active/valueProcess.js</valueProcess> - </entityField> - <entityConsumer> - <name>KeywordAttributeTypes</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/keywordattributetypes/children/containername_param/valueProcess.js</valueProcess> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>WhitelistIds_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/keywordattributetypes/children/whitelistids_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>DROPDOWNDEFINITION</name> - <title>Keyword</title> - <placeholderProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/placeholderProcess.js</placeholderProcess> - <dropDownProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/dropDownProcess.js</dropDownProcess> - <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/stateProcess.js</stateProcess> - <titleProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/titleProcess.js</titleProcess> - </entityField> - <entityParameter> - <name>AttrParentType_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityProvider> - <name>SpecificAttribute</name> - <lookupIdfield>UID</lookupIdfield> - <dependencies> - <entityDependency> - <name>ba3b4d47-7385-49df-bf61-54c99f5b2c81</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>SpecificAttribute</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>FilteredAttributeIds_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <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> - <name>FULL_ATTRIBUTE_NAME</name> - <title>Title</title> - <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/full_attribute_name/valueProcess.js</valueProcess> - </entityField> - <entityParameter> - <name>FilteredAttributeIds_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityActionGroup> - <name>AttributeActions</name> - <children> - <entityActionField> - <name>newChildAttribute</name> - <title>New attribute</title> - <onActionProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/onActionProcess.js</onActionProcess> - <isMenuAction v="true" /> - <isObjectAction v="false" /> - <isSelectionAction v="true" /> - <iconId>VAADIN:FILE_TREE_SMALL</iconId> - <tooltipProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/tooltipProcess.js</tooltipProcess> - </entityActionField> - </children> - </entityActionGroup> - <entityParameter> - <name>GetGroups_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>DisplaySimpleName_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityField> - <name>USAGELIST</name> - <title>Usage</title> - <state>READONLY</state> - </entityField> - <entityProvider> - <name>AttributeGroups</name> - <children> - <entityParameter> - <name>GetGroups_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroups/children/getgroups_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AttrParentId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>AttributeCount_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AttributeTypes_param</name> - <expose v="false" /> - </entityParameter> - </children> - </entityProvider> - <entityConsumer> - <name>AttributeGroup</name> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>AttributeGroups</fieldName> - </dependency> - <children> - <entityParameter> - <name>AttrParentId_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparentid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AttrParentType_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>ICON</name> - <colorProcess>%aditoprj%/entity/Attribute_entity/entityfields/icon/colorProcess.js</colorProcess> - <contentType>IMAGE</contentType> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/icon/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>UID</name> - </entityField> - <entityField> - <name>SORTING</name> - <title>Sorting</title> - </entityField> - <entityParameter> - <name>AttributeCount_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityFieldGroup> - <name>attributeName</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributename/valueProcess.js</valueProcess> - <title>Name</title> - <fields> - <element>ATTRIBUTE_NAME</element> - </fields> - </entityFieldGroup> - <entityField> - <name>expanded</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/expanded/valueProcess.js</valueProcess> - </entityField> - <entityActionField> - <name>openAdminView</name> - <title>Open admin view</title> - <onActionProcess>%aditoprj%/entity/Attribute_entity/entityfields/openadminview/onActionProcess.js</onActionProcess> - <iconId>VAADIN:CURLY_BRACKETS</iconId> - <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/openadminview/stateProcess.js</stateProcess> - </entityActionField> - <entityField> - <name>DROPDOWNFILTER</name> - <title>Filter</title> - <contentType>FILTER_TREE</contentType> - </entityField> - <entityParameter> - <name>AttributeTypes_param</name> - <expose v="true" /> - </entityParameter> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <isFilterable v="true" /> - <isSortable v="true" /> - <contentProcess>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js</onUpdate> - <onDelete>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/onDelete.js</onDelete> - <recordFieldMappings> - <jDitoRecordFieldMapping> - <name>UID.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ATTRIBUTE_PARENT_ID.value</name> - <isFilterable v="true" /> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ATTRIBUTE_NAME.value</name> - <isFilterable v="true" /> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ATTRIBUTE_ACTIVE.value</name> - <isFilterable v="true" /> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>DROPDOWNDEFINITION.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>DROPDOWNFILTER.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>SORTING.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ATTRIBUTE_TYPE.value</name> - <isFilterable v="true" /> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ATTRIBUTE_TYPE.displayValue</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>USAGELIST.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ATTRIBUTE_PARENT_ID.displayValue</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>FULL_ATTRIBUTE_NAME.value</name> - </jDitoRecordFieldMapping> - </recordFieldMappings> - </jDitoRecordContainer> - </recordContainers> -</entity> +<?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.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11"> + <name>Attribute_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/Attribute_entity/documentation.adoc</documentation> + <title>Attribute</title> + <contentTitleProcess>%aditoprj%/entity/Attribute_entity/contentTitleProcess.js</contentTitleProcess> + <afterUiInit>%aditoprj%/entity/Attribute_entity/afterUiInit.js</afterUiInit> + <onValidation>%aditoprj%/entity/Attribute_entity/onValidation.js</onValidation> + <iconId>VAADIN:TAG</iconId> + <titlePlural>Attributes</titlePlural> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + <dependencies> + <entityDependency> + <name>0691a752-4e4e-47b7-a376-f39655c0aa6f</name> + <entityName>Activity_entity</entityName> + <fieldName>ActivityAtrributes</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>ATTRIBUTE_NAME</name> + <title>Title (original language)</title> + <mandatory v="true" /> + <state>EDITABLE</state> + </entityField> + <entityField> + <name>ATTRIBUTE_TYPE</name> + <title>Type</title> + <consumer>KeywordAttributeTypes</consumer> + <mandatory v="true" /> + <state>READONLY</state> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/onValueChange.js</onValueChange> + </entityField> + <entityField> + <name>ATTRIBUTE_PARENT_ID</name> + <title>Superordinate Attribute</title> + <consumer>AttributeGroup</consumer> + <linkedContext>Attribute</linkedContext> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/displayValueProcess.js</displayValueProcess> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + <element>PROCESS_SETVALUE</element> + </onValueChangeTypes> + </entityField> + <entityConsumer> + <name>AttributeChildren</name> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>AttributeParent</fieldName> + </dependency> + <children> + <entityParameter> + <name>AttrParentId_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/children/attrparentid_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttrParentType_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/children/attrparenttype_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> + </entityConsumer> + <entityProvider> + <name>AttributeParent</name> + <dependencies> + <entityDependency> + <name>18bd148d-bed3-429f-ba54-c5eac76c5083</name> + <entityName>Attribute_entity</entityName> + <fieldName>AttributeChildren</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>9fb3569c-7c75-48b1-9dc0-3f707940813a</name> + <entityName>Employee_entity</entityName> + <fieldName>Departments</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>AttrParentType_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>AttrParentId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>AttributeCount_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>GetGroups_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttributeTypes_param</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>AttrParentId_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityConsumer> + <name>AttributeUsages</name> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>AttributeUsage_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + </dependency> + <children> + <entityParameter> + <name>AttributeId_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/attributeid_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>SingleSelection_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/singleselection_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>DisableMinCount_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/disablemincount_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>ATTRIBUTE_ACTIVE</name> + <title>Active</title> + <contentType>BOOLEAN</contentType> + <groupable v="true" /> + <dropDownProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_active/dropDownProcess.js</dropDownProcess> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_active/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>KeywordAttributeTypes</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/keywordattributetypes/children/containername_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>WhitelistIds_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/keywordattributetypes/children/whitelistids_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>DROPDOWNDEFINITION</name> + <title>Keyword</title> + <placeholderProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/placeholderProcess.js</placeholderProcess> + <dropDownProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/dropDownProcess.js</dropDownProcess> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Attribute_entity/entityfields/dropdowndefinition/titleProcess.js</titleProcess> + </entityField> + <entityParameter> + <name>AttrParentType_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityProvider> + <name>SpecificAttribute</name> + <lookupIdfield>UID</lookupIdfield> + <dependencies> + <entityDependency> + <name>ba3b4d47-7385-49df-bf61-54c99f5b2c81</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>FilteredAttributeIds_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <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> + <name>FULL_ATTRIBUTE_NAME</name> + <title>Title</title> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/full_attribute_name/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>FilteredAttributeIds_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityActionGroup> + <name>AttributeActions</name> + <children> + <entityActionField> + <name>newChildAttribute</name> + <title>New attribute</title> + <onActionProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> + <isSelectionAction v="true" /> + <iconId>VAADIN:FILE_TREE_SMALL</iconId> + <tooltipProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/tooltipProcess.js</tooltipProcess> + </entityActionField> + </children> + </entityActionGroup> + <entityParameter> + <name>GetGroups_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>DisplaySimpleName_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityField> + <name>USAGELIST</name> + <title>Usage</title> + <state>READONLY</state> + </entityField> + <entityProvider> + <name>AttributeGroups</name> + <children> + <entityParameter> + <name>GetGroups_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroups/children/getgroups_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttrParentId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>AttributeCount_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttributeTypes_param</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityConsumer> + <name>AttributeGroup</name> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>AttributeGroups</fieldName> + </dependency> + <children> + <entityParameter> + <name>AttrParentId_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparentid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AttrParentType_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>ICON</name> + <colorProcess>%aditoprj%/entity/Attribute_entity/entityfields/icon/colorProcess.js</colorProcess> + <contentType>IMAGE</contentType> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/icon/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>UID</name> + </entityField> + <entityField> + <name>SORTING</name> + <title>Sorting</title> + </entityField> + <entityParameter> + <name>AttributeCount_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityFieldGroup> + <name>attributeName</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributename/valueProcess.js</valueProcess> + <title>Name</title> + <fields> + <element>ATTRIBUTE_NAME</element> + </fields> + </entityFieldGroup> + <entityField> + <name>expanded</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/expanded/valueProcess.js</valueProcess> + </entityField> + <entityActionField> + <name>openAdminView</name> + <title>Open admin view</title> + <onActionProcess>%aditoprj%/entity/Attribute_entity/entityfields/openadminview/onActionProcess.js</onActionProcess> + <iconId>VAADIN:CURLY_BRACKETS</iconId> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/openadminview/stateProcess.js</stateProcess> + </entityActionField> + <entityField> + <name>DROPDOWNFILTER</name> + <title>Filter</title> + <contentType>FILTER_TREE</contentType> + </entityField> + <entityParameter> + <name>AttributeTypes_param</name> + <expose v="true" /> + </entityParameter> + <entityActionField> + <name>openDetails</name> + <onActionProcess>%aditoprj%/entity/Attribute_entity/entityfields/opendetails/onActionProcess.js</onActionProcess> + </entityActionField> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/objectrowid_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <isFilterable v="true" /> + <isSortable v="true" /> + <contentProcess>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <onInsert>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/Attribute_entity/recordcontainers/jdito/onDelete.js</onDelete> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ATTRIBUTE_PARENT_ID.value</name> + <isFilterable v="true" /> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ATTRIBUTE_NAME.value</name> + <isFilterable v="true" /> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ATTRIBUTE_ACTIVE.value</name> + <isFilterable v="true" /> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>DROPDOWNDEFINITION.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>DROPDOWNFILTER.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>SORTING.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ATTRIBUTE_TYPE.value</name> + <isFilterable v="true" /> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ATTRIBUTE_TYPE.displayValue</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>USAGELIST.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ATTRIBUTE_PARENT_ID.displayValue</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>FULL_ATTRIBUTE_NAME.value</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/Attribute_entity/entityfields/objectrowid_param/valueProcess.js b/entity/Attribute_entity/entityfields/objectrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/Attribute_entity/entityfields/opendetails/onActionProcess.js b/entity/Attribute_entity/entityfields/opendetails/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..20ae8eea182052eb33f1e3bc5a6056d28e7fe2a9 --- /dev/null +++ b/entity/Attribute_entity/entityfields/opendetails/onActionProcess.js @@ -0,0 +1,12 @@ +import("Context_lib"); +import("system.vars"); +import("system.neon"); + +var selection = vars.get("$sys.selection"); +var params = { + "AttributeId_param" : selection[0], + "ObjectRowId_param" : vars.get("$param.ObjectRowId_param"), + "ObjectType_param" : vars.get("$param.ObjectType_param") +} + +neon.openContext("AttributeRelation", "AttributeRelationTreeEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file diff --git a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js index 1d8951adf8e9a712b8c1e7b94d120024fe61f653..c5e53826744147cec8a91caf0c046b034a6efb23 100644 --- a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js @@ -44,11 +44,18 @@ users = users.map(function (user) var renderer = new ContactTitleRenderer(Contact.createWithColumnPreset(), ContactTitleRenderer.OPTIONS.NoOption); var selectExpression = renderer.asSql(); -var names = db.table(SqlCondition.begin() - .andIn("CONTACT.CONTACTID", contactIds) - .buildSql("select CONTACTID, " + selectExpression + " from CONTACT \n\ - left join PERSON on (PERSON.PERSONID = CONTACT.PERSON_ID)") -); +var idsPerPage = 1000; +var names = []; +var select = "select CONTACTID, " + selectExpression + " from CONTACT \n\ + left join PERSON on (PERSON.PERSONID = CONTACT.PERSON_ID)"; + +for (let begin = 0, max = contactIds.length; begin < max; begin += idsPerPage) +{ + names = names.concat(db.table(SqlCondition.begin() + .andIn("CONTACT.CONTACTID", contactIds.slice(begin, begin + idsPerPage)) + .buildSql(select) + )); +} var nameMap = {}; for (let i = 0, l = names.length; i < l; i++) nameMap[names[i][0]] = names[i][1]; diff --git a/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js b/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js index 18be71e8d7bce5838f512cda9b43a1f59ebb76d2..76cd3a259e093b7308b52ea448ee3a2ed49fd69f 100644 --- a/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js +++ b/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js @@ -1,5 +1,5 @@ import("system.vars"); import("system.result"); -if (vars.get("$this.value") == null) +if (vars.get("$this.value") == null || vars.get("$this.value") == "") result.string(vars.get("$field.DIRECTION") == "same" ? 0 : 1); \ No newline at end of file diff --git a/entity/PermissionAction_entity/entityfields/permissiondetails/onValidation.js b/entity/PermissionAction_entity/entityfields/permissiondetails/onValidation.js index 17a9427ed7ea706af5dc3efde8f40d9f1c2b0353..ac3912f70bfd69006068a8020a8176bc12bfcdce 100644 --- a/entity/PermissionAction_entity/entityfields/permissiondetails/onValidation.js +++ b/entity/PermissionAction_entity/entityfields/permissiondetails/onValidation.js @@ -1,4 +1,3 @@ -import("system.logging"); import("Sql_lib"); import("system.db"); import("system.vars"); @@ -13,7 +12,6 @@ var permCondInput = vars.get("$param.PermissionCondition_param"); //var deletedRows = vars.get("$field." + pConsumerField + ".deletedRows"); var deletedRows = vars.get("$field.PermissionDetails.deletedRows"); -logging.log("deleted rows: " + deletedRows); if (actionTitle == "null" || actionTitle == undefined || actionTitle == null || actionTitle == "") { result.string(translate.text("Empty actions are not allowed!")); diff --git a/entity/PermissionDetail_entity/entityfields/permissionactions/onValidation.js b/entity/PermissionDetail_entity/entityfields/permissionactions/onValidation.js index 5d4bdb1dbbd2d33d5697b4d6e420bb7201b7b238..1abe9d92bfd3d588a564ea9419fb4c2f9c5019c7 100644 --- a/entity/PermissionDetail_entity/entityfields/permissionactions/onValidation.js +++ b/entity/PermissionDetail_entity/entityfields/permissionactions/onValidation.js @@ -1,4 +1,3 @@ -import("system.logging"); import("Sql_lib"); import("system.db"); import("system.vars"); @@ -25,10 +24,6 @@ var deletedRows = vars.get("$field.PermissionActions.deletedRows"); var changedRows = vars.get("$field.PermissionActions.changedRows"); var insertedRows = vars.get("$field.PermissionActions.insertedRows"); -logging.log("del rows: " + deletedRows.toSource()); -logging.log("cha rows: " + changedRows.toSource()); -logging.log("ins rows: " + insertedRows.toSource()); - if (PermissionUtil.existsPermission(permissionId)) { // old permission // insert nur möglich, wenn gleiche action auch gelöscht wurde, oder zuvor nicht da war diff --git a/entity/PermissionDetail_entity/recordcontainers/jdito/contentProcess.js b/entity/PermissionDetail_entity/recordcontainers/jdito/contentProcess.js index aecbbceea0b47cf2a04eab49eb7815db75ea3efa..894bb06e116e163c11859003cbc0a3f28bd2c6eb 100644 --- a/entity/PermissionDetail_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/PermissionDetail_entity/recordcontainers/jdito/contentProcess.js @@ -105,7 +105,7 @@ if (selectedPermission == null) { } } -result.object(res.sort(sortFunction)); +result.object(res.sort(sortResultsAfterAccessTypes)); function prepareResultArray(pEntry, pRes) { var rootPermission = ""; @@ -118,12 +118,49 @@ function prepareResultArray(pEntry, pRes) { } else rootPermission = PermissionUtil.getRootPermission(pEntry.permissionid); } - pRes.push([pEntry.permissionid, pEntry.entity, pEntry.role, pEntry.field, pEntry.cond, pEntry.action, pEntry.accesstype, pEntry.condtype, rootPermission]); + pRes.push([pEntry.permissionid, pEntry.entity, pEntry.role, pEntry.field, pEntry.cond, sortActions(pEntry.action.split(","), pEntry.accesstype).join(","), pEntry.accesstype, pEntry.condtype, rootPermission]); return pRes; } -// used to sort result array: Entity -> Records -> Fields -function sortFunction(a, b) { +// sorts action csv string +// Entity: view -> create +// Record: read -> update -> delete +// Field: view -> update +function sortActions(actions, accesstype) { + return actions.sort(function(a, b) { + switch (accesstype) { + case "E": + if (a == "view") { + return -1; + } else { + return 1; + } + break; + case "R": + if (a == "read") { + return -1; + } else if (a == "update" && b == "delete") { + return 0; + } else { + return 1; + } + break; + case "F": + if (a == "view") { + return -1; + } else { + return 1; + } + break; + default: + return 0; + break; + } + }) +} + +// sorts result array: Entity -> Records -> Fields +function sortResultsAfterAccessTypes(a, b) { if (a[6] == b[6] && a[6] != "F" && a[6] != "R") return 0; else if (a[6] == "E") diff --git a/neonView/ActivityDetail_view/ActivityDetail_view.aod b/neonView/ActivityDetail_view/ActivityDetail_view.aod index ce4d5a9a6de6b63f4e1dd1b7b27f3e024b04fb41..3e27e5c05feca4c203ceb49506acd40d42f46985 100644 --- a/neonView/ActivityDetail_view/ActivityDetail_view.aod +++ b/neonView/ActivityDetail_view/ActivityDetail_view.aod @@ -6,20 +6,29 @@ <layout> <boxLayout> <name>layout</name> + <direction>HORIZONTAL</direction> + <maxDirectionElements v="2" /> </boxLayout> </layout> <children> + <neonViewReference> + <name>f3e3d589-16a5-45a3-878f-7f00548c4370</name> + <entityField>ActivityAtrributes</entityField> + <view>AttributeTree_view</view> + </neonViewReference> + <neonViewReference> + <name>9a9c4df0-abec-42b8-af90-b9fe57f28337</name> + <entityField>AttributeTreeIsTheme</entityField> + <view>AttributeRelationTree_view</view> + </neonViewReference> <genericViewTemplate> - <name>OfferInfo</name> - <editMode v="false" /> + <name>Generic</name> <showDrawer v="true" /> - <drawerCaption></drawerCaption> <fixedDrawer v="true" /> - <hideLabels v="true" /> <entityField>#ENTITY</entityField> <fields> <entityFieldLink> - <name>c7e75393-4745-478b-9f89-878b9a19b722</name> + <name>ca781b9b-9e93-41c3-9373-cb559c347194</name> <entityField>INFO</entityField> </entityFieldLink> </fields> diff --git a/neonView/AttributeTree_view/AttributeTree_view.aod b/neonView/AttributeTree_view/AttributeTree_view.aod index 724e8b8dd6891e9db5f63dfbacefd5eb2f47d2fc..4ae97a5345fa9c9edb737b8180dff19243b3ee16 100644 --- a/neonView/AttributeTree_view/AttributeTree_view.aod +++ b/neonView/AttributeTree_view/AttributeTree_view.aod @@ -13,7 +13,11 @@ <parentField>ATTRIBUTE_PARENT_ID</parentField> <titleField>ATTRIBUTE_NAME</titleField> <descriptionField>ATTRIBUTE_TYPE</descriptionField> + <entryAction>openDetails</entryAction> <entityField>#ENTITY</entityField> + <isCreatable v="false" /> + <isEditable v="false" /> + <isDeletable v="false" /> </treeViewTemplate> </children> </neonView>