diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index ca89d7c7f02a9b845fb1ab917969db91f38c2e77..be4e2e234c1e056f42f7e2363b41fe573624b7cb 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -392,7 +392,7 @@ <customBooleanProperty> <name>log</name> <global v="false" /> - <property v="true" /> + <property v="false" /> </customBooleanProperty> </customProperties> </entityFieldDb> diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 5fb7cdb5e2d4356409ee132df2355fd7cb433176..6dbc75f24c8a2c42ac787b0ab19c10ee498a9f0e 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -160,6 +160,7 @@ <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> diff --git a/entity/Attribute_entity/entityfields/dropdowndefinition/dropDownProcess.js b/entity/Attribute_entity/entityfields/dropdowndefinition/dropDownProcess.js index 413cfa7747294ec669a2457c17b562b6a0877c54..23c8a16fb6f2382bdb1dd18ae57bb794268d6ae9 100644 --- a/entity/Attribute_entity/entityfields/dropdowndefinition/dropDownProcess.js +++ b/entity/Attribute_entity/entityfields/dropdowndefinition/dropDownProcess.js @@ -7,15 +7,7 @@ import("Attribute_lib"); var res = []; var type = vars.get("$field.ATTRIBUTE_TYPE").trim(); -if (type == $AttributeTypes.KEYWORD) -{ - res = KeywordUtils.getContainerNames().map(function (e) - { - return [e, e];//currently the first column is ID, second view value - which is the same because there is no ID for keyword-containers - }); -} -else if (type == $AttributeTypes.OBJECTSELECTION) -{ - res = ContextUtils.getContexts(true); -} +var getDropDownFn = type && $AttributeTypes[type] && $AttributeTypes[type].getDropDownDefinitions; +if (getDropDownFn instanceof Function) + res = getDropDownFn.call(); result.object(res); diff --git a/entity/Attribute_entity/entityfields/dropdowndefinition/placeholderProcess.js b/entity/Attribute_entity/entityfields/dropdowndefinition/placeholderProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f00cbd82e67e091c167605b83a160416e4b83853 --- /dev/null +++ b/entity/Attribute_entity/entityfields/dropdowndefinition/placeholderProcess.js @@ -0,0 +1,11 @@ +import("system.translate"); +import("system.neon"); +import("system.vars"); +import("system.result"); +import("Attribute_lib"); + +var type = vars.get("$field.ATTRIBUTE_TYPE").trim(); +if (type == $AttributeTypes.KEYWORD) + result.string(translate.text("Keyword")); +else if (type == $AttributeTypes.OBJECTSELECTION) + result.string(translate.text("Module")); diff --git a/entity/Attribute_entity/entityfields/dropdowndefinition/stateProcess.js b/entity/Attribute_entity/entityfields/dropdowndefinition/stateProcess.js index 8335f36cceeaf1148dfe2e88e50b9ef1d8b565ec..f4447a5915899cbbef6950be1e099aa21a791f89 100644 --- a/entity/Attribute_entity/entityfields/dropdowndefinition/stateProcess.js +++ b/entity/Attribute_entity/entityfields/dropdowndefinition/stateProcess.js @@ -4,7 +4,8 @@ import("system.result"); import("Attribute_lib"); var fieldState; -if ((vars.get("$field.ATTRIBUTE_TYPE").trim() == $AttributeTypes.KEYWORD || vars.get("$field.ATTRIBUTE_TYPE").trim() == $AttributeTypes.OBJECTSELECTION) +var type = vars.get("$field.ATTRIBUTE_TYPE").trim(); +if (type && $AttributeTypes[type] && $AttributeTypes[type].getDropDownDefinitions && !AttributeUtil.hasRelations(vars.get("$field.UID"))) fieldState = neon.COMPONENTSTATE_EDITABLE; else if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW) diff --git a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod index 9971d49489ab93d16ec8b0432438b09fd0eeb3f6..83e42e5652feed76d06e7ce5ed6796bc9a06c74d 100644 --- a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod +++ b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod @@ -59,6 +59,7 @@ <name>NAME</name> <title>Name</title> <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/name/valueProcess.js</valueProcess> </entityField> <entityField> <name>ISOLANGUAGE</name> @@ -70,7 +71,6 @@ <entityField> <name>BINDATA</name> <contentType>FILE</contentType> - <onValueChange>%aditoprj%/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js</onValueChange> </entityField> <entityConsumer> <name>Documents</name> diff --git a/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js b/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js deleted file mode 100644 index 3ccf1ac0d361997eb045d92a3ab014b5da4e4b13..0000000000000000000000000000000000000000 --- a/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js +++ /dev/null @@ -1,17 +0,0 @@ -import("system.vars"); -import("system.neon"); -import("Entity_lib"); -import("Document_lib"); - -var uploadValue = DocumentUtil.getFilenameFromUpload(vars.get("local.value")); - -if(!(vars.get("$field.NAME") != null && vars.get("$field.NAME") != "")) -{ - if(uploadValue.length <= 40) - { - neon.setFieldValue("$field.NAME", uploadValue); - }else{ - var limit = uploadValue.length - 40; - neon.setFieldValue("$field.NAME", uploadValue.substr(0, uploadValue.length - limit)); - } -} \ No newline at end of file diff --git a/entity/DocumentTemplate_entity/entityfields/name/valueProcess.js b/entity/DocumentTemplate_entity/entityfields/name/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..65117fc5b8e553ef7764c9957e30b236b7174229 --- /dev/null +++ b/entity/DocumentTemplate_entity/entityfields/name/valueProcess.js @@ -0,0 +1,15 @@ +import("system.result"); +import("system.vars"); +import("system.neon"); +import("Entity_lib"); +import("Document_lib"); + +if (vars.get("$this.value") == null && vars.get("$field.BINDATA")) +{ + var uploadValue = DocumentUtil.getFilenameFromUpload(vars.get("$field.BINDATA")); + + if (uploadValue.length > 40) + uploadValue = uploadValue.substr(0, 40); + + neon.setFieldValue("$field.NAME", uploadValue); +} \ No newline at end of file diff --git a/entity/ObjectRelationType_entity/entityfields/hierarchy/valueProcess.js b/entity/ObjectRelationType_entity/entityfields/hierarchy/valueProcess.js index b3028ee4f3a3271d9a6603e8d52faf656a4fa484..f85a152fd105b9b800f8ef9a352d078df76ce69b 100644 --- a/entity/ObjectRelationType_entity/entityfields/hierarchy/valueProcess.js +++ b/entity/ObjectRelationType_entity/entityfields/hierarchy/valueProcess.js @@ -2,7 +2,7 @@ import("system.neon"); import("system.vars"); import("system.result"); -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) { result.string("0") } \ No newline at end of file diff --git a/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js b/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js index ee7b68c6f9c712c45af6a147dc23c15d9bc7b1ec..18be71e8d7bce5838f512cda9b43a1f59ebb76d2 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("$field.Type2Enabled_proxy")) +if (vars.get("$this.value") == null) result.string(vars.get("$field.DIRECTION") == "same" ? 0 : 1); \ No newline at end of file diff --git a/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod b/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod index 152b5437f9a591051f8ea345b2e17f3cad373a68..9fb14e2e65bef8e739f6539187aa4900ea1ecbe6 100644 --- a/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod +++ b/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod @@ -33,8 +33,8 @@ <entityField>INFO</entityField> </entityFieldLink> <entityFieldLink> - <name>426a20c1-5d79-417b-bab1-d3100fabb25b</name> - <entityField>STATE</entityField> + <name>07581a02-dc4d-4eaf-835d-b7990bf105f9</name> + <entityField>STATUS</entityField> </entityFieldLink> <entityFieldLink> <name>373ba27b-5f27-4c5d-865e-da50447124fa</name> diff --git a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod index 0dcf8d013552a42667adc634254b51a50126d0bf..228c85ae4af928a2e685c9fb1de4827a2e01a6eb 100644 --- a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod +++ b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod @@ -88,7 +88,7 @@ </neonTableColumn> <neonTableColumn> <name>52a851b0-9059-4d57-8ff5-335c819359e8</name> - <entityField>STATE</entityField> + <entityField>STATUS</entityField> </neonTableColumn> </columns> </tableViewTemplate> diff --git a/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod b/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod index 84b32b4c963c872a01a5b547e5b2a7dd5f147c81..03dbb600f57c8e99a44c21eed5907409a95b6ec5 100644 --- a/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod +++ b/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod @@ -30,8 +30,8 @@ <entityField>RELATION_ID</entityField> </entityFieldLink> <entityFieldLink> - <name>4e3d7a37-f55b-4c18-9ba1-ab4ab0bbb442</name> - <entityField>STATE</entityField> + <name>b3e902de-072f-4a41-8562-f4d30ad9a564</name> + <entityField>STATUS</entityField> </entityFieldLink> <entityFieldLink> <name>2867e662-b824-4bbf-8eaf-bbd34f44598e</name>