Skip to content
Snippets Groups Projects
Commit ae1b9126 authored by S.Listl's avatar S.Listl
Browse files

Attribute parent selection bugfix

parent 5c86e935
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<name>OBJECT_TYPE</name> <name>OBJECT_TYPE</name>
<title>Module</title> <title>Module</title>
<consumer>Context</consumer> <consumer>Context</consumer>
<mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess>
<onValueChangeTypes> <onValueChangeTypes>
<element>MASK</element> <element>MASK</element>
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</entityField> </entityField>
<entityParameter> <entityParameter>
<name>ChildId_param</name> <name>ChildId_param</name>
<expose v="true" />
<description>PARAMETER</description> <description>PARAMETER</description>
</entityParameter> </entityParameter>
<entityConsumer> <entityConsumer>
...@@ -119,6 +120,7 @@ ...@@ -119,6 +120,7 @@
</entityField> </entityField>
<entityParameter> <entityParameter>
<name>ChildType_param</name> <name>ChildType_param</name>
<expose v="true" />
<description>PARAMETER</description> <description>PARAMETER</description>
</entityParameter> </entityParameter>
<entityParameter> <entityParameter>
...@@ -163,6 +165,14 @@ ...@@ -163,6 +165,14 @@
<name>GetGroups_param</name> <name>GetGroups_param</name>
<expose v="false" /> <expose v="false" />
</entityParameter> </entityParameter>
<entityParameter>
<name>ChildId_param</name>
<expose v="false" />
</entityParameter>
<entityParameter>
<name>ChildType_param</name>
<expose v="false" />
</entityParameter>
</children> </children>
</entityProvider> </entityProvider>
<entityField> <entityField>
...@@ -189,14 +199,6 @@ ...@@ -189,14 +199,6 @@
<entityProvider> <entityProvider>
<name>AttributeGroups</name> <name>AttributeGroups</name>
<children> <children>
<entityParameter>
<name>ChildId_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>ChildType_param</name>
<expose v="true" />
</entityParameter>
<entityParameter> <entityParameter>
<name>ThemeObjectRowId_param</name> <name>ThemeObjectRowId_param</name>
<expose v="false" /> <expose v="false" />
...@@ -212,12 +214,12 @@ ...@@ -212,12 +214,12 @@
</dependency> </dependency>
<children> <children>
<entityParameter> <entityParameter>
<name>AttrParentId_param</name> <name>ChildId_param</name>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparentid_param/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/childid_param/valueProcess.js</valueProcess>
</entityParameter> </entityParameter>
<entityParameter> <entityParameter>
<name>AttrParentType_param</name> <name>ChildType_param</name>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/childtype_param/valueProcess.js</valueProcess>
</entityParameter> </entityParameter>
</children> </children>
</entityConsumer> </entityConsumer>
...@@ -330,6 +332,14 @@ ...@@ -330,6 +332,14 @@
<name>AttributeCount_param</name> <name>AttributeCount_param</name>
<expose v="false" /> <expose v="false" />
</entityParameter> </entityParameter>
<entityParameter>
<name>ChildId_param</name>
<expose v="false" />
</entityParameter>
<entityParameter>
<name>ChildType_param</name>
<expose v="false" />
</entityParameter>
</children> </children>
</entityProvider> </entityProvider>
</entityFields> </entityFields>
......
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
result.string(vars.getString("$field.ATTRIBUTE_TYPE").trim()); result.string(vars.get("$field.ATTRIBUTE_TYPE").trim());
\ No newline at end of file
...@@ -952,7 +952,7 @@ AttributeTypeUtil.getGroupTypes = function (pChildType) ...@@ -952,7 +952,7 @@ AttributeTypeUtil.getGroupTypes = function (pChildType)
var groupTypes = []; var groupTypes = [];
for (let type in $AttributeTypes) for (let type in $AttributeTypes)
{ {
if (AttributeUtil.isGroupType(type) && (!AttributeTypeUtil.getPossibleChildren(type) || AttributeTypeUtil.getPossibleChildren(type).indexOf(pChildType) !== -1)) if (AttributeTypeUtil.isGroupType(type) && (!AttributeTypeUtil.getPossibleChildren(type) || AttributeTypeUtil.getPossibleChildren(type).indexOf(pChildType) !== -1))
groupTypes.push(type); groupTypes.push(type);
} }
return groupTypes; return groupTypes;
...@@ -1368,7 +1368,7 @@ AttributeRelationQuery.prototype.getSingleAttributeValue = function () ...@@ -1368,7 +1368,7 @@ AttributeRelationQuery.prototype.getSingleAttributeValue = function ()
AttributeRelationQuery.prototype.getAttributeCount = function () AttributeRelationQuery.prototype.getAttributeCount = function ()
{ {
return parseInt(AttributeRelationUtils.getAttributeSqlBuilder("count(*)", this._rowId, this._objectType) return parseInt(AttributeRelationUtils.getAttributeSqlBuilder("count(*)", this._rowId, this._objectType)
.andIfSet("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", this._attributeId) .andIfSet("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", this._attributeIds)
.cell() || 0); .cell() || 0);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment