diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 4ffbcecb9997e552d82e0beec3c133749ac077c3..81ed998586bd298aa9203da5bcbb1f50c2da615f 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -323,6 +323,8 @@ <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>VAADIN:FILE_TREE_SMALL</iconId> + <state>AUTO</state> + <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/stateProcess.js</stateProcess> </entityActionField> </children> </entityActionGroup> diff --git a/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/stateProcess.js b/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8d1104b5aaa31e686a00a58b47dba81fe63ead08 --- /dev/null +++ b/entity/Attribute_entity/entityfields/attributeactions/children/newchildattribute/stateProcess.js @@ -0,0 +1,9 @@ +import("Attribute_lib"); +import("system.result"); +import("system.vars"); +import("system.neon"); + +if(vars.get("$sys.selection").length == 1 && vars.get("$field.ATTRIBUTE_TYPE") == $AttributeTypes.GROUP.toString()) + result.string(neon.COMPONENTSTATE_EDITABLE) +else + result.string(neon.COMPONENTSTATE_DISABLED) \ No newline at end of file