Skip to content
Snippets Groups Projects
Commit 6f3b982c authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

fix displayValue for simple attribute name

parent 14e63f16
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,6 @@ import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(AttributeUtil.getFullAttributeName(vars.get("$field.AB_ATTRIBUTE_ID")));
\ No newline at end of file
result.string(AttributeUtil.getFullAttributeName(
vars.get("$field.AB_ATTRIBUTE_ID"),
vars.exists("$param.DisplaySimpleName_param") ? vars.get("$param.DisplaySimpleName_param") : false ));
\ No newline at end of file
......@@ -219,6 +219,7 @@
<name>Attributes</name>
<title>Attributes</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<state>DISABLED</state>
<dependency>
<name>dependency</name>
<entityName>AttributeRelation_entity</entityName>
......
......@@ -51,10 +51,5 @@
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
<name>cba34c27-9abf-416b-99fc-f7e91bd3669c</name>
<entityField>Attributes</entityField>
<view>AttributeRelationEdit_view</view>
</neonViewReference>
</children>
</neonView>
......@@ -61,11 +61,15 @@ AttributeUtil.getPossibleAttributes = function (pObjectType, pIncludeGroups, pFi
* returns the name of an attribute with all parent attribute names
*
* @param {String} pAttributeId the id of the attribute
* @param {Boolean} [pSimpleName=false] Use only the name of the attribute and not the names of the parents.
*
* @return {String} the name of the attribute
*/
AttributeUtil.getFullAttributeName = function (pAttributeId)
AttributeUtil.getFullAttributeName = function (pAttributeId, pSimpleName)
{
if (pSimpleName == undefined)
pSimpleName = false;
if (!pAttributeId)
return "";
var attributeNames = [];
......@@ -83,8 +87,8 @@ AttributeUtil.getFullAttributeName = function (pAttributeId)
}
else
pAttributeId = "";
} while (pAttributeId);
} while (pAttributeId && !pSimpleName);
return attributeNames.reverse().join(" / ");
}
......
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