diff --git a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod index 3ff69433612fed1fbafbcdb362f9481bceebd5ca..dabfc60a3fc4050b79aa81c9f375003c01eb3fc6 100644 --- a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod +++ b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod @@ -44,6 +44,7 @@ <node name="KeywordAttribute" kind="10077" /> <node name="ObjectRelationType" kind="10077" /> <node name="ClassificationAdmin" kind="10077" /> + <node name="Classification" kind="10077" /> <node name="Salutation" kind="10077" /> <node name="INTERNAL_ADMINISTRATOR" kind="159" /> </node> diff --git a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod index cdf27e635efb1de8e88f86a48dde7ddb36615a06..c8b013c522fed4b900f7fe6c31d96f29a1add3a9 100644 --- a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod +++ b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod @@ -38,12 +38,6 @@ <entityName>Classification_entity</entityName> <fieldName>ClassificationsAdministration</fieldName> </dependency> - <children> - <entityParameter> - <name>ClassificationType_param</name> - <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationsadmin/children/classificationtype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> </entityConsumer> <entityConsumer> <name>KeywordClassificationTypes</name> diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationsadmin/children/classificationtype_param/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationsadmin/children/classificationtype_param/valueProcess.js deleted file mode 100644 index 16c85500b5355a72548030867e3d300661e9d4aa..0000000000000000000000000000000000000000 --- a/entity/ClassificationAdmin_entity/entityfields/classificationsadmin/children/classificationtype_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(vars.get("$field.UID")); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js index 7ac1682daac72873983e54688cb7fb34ae5ef3a9..04f641a1be6f91691b20d0f11cfe4edc4a818fc3 100644 --- a/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js @@ -1,4 +1,4 @@ import("system.result"); import("system.db"); -result.object(db.table("select distinct CLASSIFICATIONTYPE from CLASSIFICATIONTYPE")); \ No newline at end of file +result.object([[""]]); \ No newline at end of file diff --git a/entity/Classification_entity/Classification_entity.aod b/entity/Classification_entity/Classification_entity.aod index e2d4e933f214d4240c7aabf9f2e5246c9134b09d..a4abf0e44640a2f57c2519e0574781330039613c 100644 --- a/entity/Classification_entity/Classification_entity.aod +++ b/entity/Classification_entity/Classification_entity.aod @@ -13,12 +13,14 @@ </entityProvider> <entityField> <name>CLASSIFICATIONID</name> + <searchable v="false" /> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationid/valueProcess.js</valueProcess> </entityField> <entityField> <name>CLASSIFICATIONSCORE_ID</name> <title>Selection</title> <consumer>ClassificationScores</consumer> + <searchable v="false" /> <titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscore_id/titleProcess.js</titleProcess> <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscore_id/displayValueProcess.js</displayValueProcess> </entityField> @@ -66,12 +68,14 @@ </entityProvider> <entityField> <name>CLASSIFICATIONTYPEID</name> + <searchable v="false" /> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtypeid/valueProcess.js</valueProcess> </entityField> <entityField> <name>SCORETYPE</name> <title>Scoretype</title> <mandatoryProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/mandatoryProcess.js</mandatoryProcess> + <searchable v="false" /> <groupable v="true" /> <stateProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/stateProcess.js</stateProcess> <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess> @@ -83,6 +87,7 @@ <mandatoryProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/mandatoryProcess.js</mandatoryProcess> <dropDownProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js</dropDownProcess> <textInputAllowed v="true" /> + <searchable v="false" /> <groupable v="true" /> <titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/titleProcess.js</titleProcess> <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js</displayValueProcess> @@ -90,18 +95,22 @@ </entityField> <entityField> <name>CLASSIFICATIONTYPE_ID</name> + <searchable v="false" /> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype_id/valueProcess.js</valueProcess> </entityField> <entityField> <name>OBJECT_ROWID</name> + <searchable v="false" /> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/object_rowid/valueProcess.js</valueProcess> </entityField> <entityField> <name>OBJECT_TYPE</name> + <searchable v="false" /> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/object_type/valueProcess.js</valueProcess> </entityField> <entityField> <name>UID</name> + <searchable v="false" /> </entityField> <entityConsumer> <name>ClassificationScores</name> @@ -138,10 +147,13 @@ </entityParameter> <entityField> <name>CLASSIFICATIONTYPE</name> - <consumer>ClassificationTypes</consumer> + <title>Usage</title> + <consumer>KeywordClassificationTypes</consumer> + <searchable v="true" /> <groupable v="true" /> - <state>EDITABLE</state> + <stateProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/displayValueProcess.js</displayValueProcess> </entityField> <entityProvider> <name>ClassificationsAdministration</name> @@ -176,11 +188,13 @@ <name>Info</name> <title>Rating</title> <contentType>HTML</contentType> + <searchable v="false" /> <state>READONLY</state> <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/info/valueProcess.js</valueProcess> </entityField> <entityField> <name>SCORE_RESULTS</name> + <searchable v="false" /> </entityField> <entityConsumer> <name>ClassificationTypes</name> @@ -191,11 +205,28 @@ <fieldName>#PROVIDER</fieldName> </dependency> </entityConsumer> + <entityConsumer> + <name>KeywordClassificationTypes</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <jDitoRecordContainer> <name>jdito</name> <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <isFilterable v="true" /> + <isRequireContainerFiltering v="true" /> <contentProcess>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/contentProcess.js</contentProcess> <onInsert>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onInsert.js</onInsert> <onUpdate>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onUpdate.js</onUpdate> diff --git a/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js b/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js index 9151a529e96fde54b2f6c3b688f1b51f262befc6..dba2ecaa5178ad1e389f7bf58077fca54098f670 100644 --- a/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js +++ b/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js @@ -4,10 +4,12 @@ import("system.neon"); import("system.vars"); import("system.db"); import("system.result"); -logging.log(vars.get("$param.IsAdminMode_param")) if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") { - logging.log(vars.get("$param.ClassificationType_param")) - logging.log(ClassificationUtils.getAllGroups(vars.get("$param.ClassificationType_param"), true).toSource()) - result.object(ClassificationUtils.getAllGroups(vars.get("$param.ClassificationType_param"), true)); + // use param if available or current selectionRows + var classificationType = vars.get("$field.CLASSIFICATIONTYPE") + logging.log("asdf " + vars.get("$field.CLASSIFICATIONTYPE")) + + if (classificationType) + result.object(ClassificationUtils.getAllGroups(classificationType, true)); } \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/classificationgroup/onValidation.js b/entity/Classification_entity/entityfields/classificationgroup/onValidation.js index 4bce0a846ef25ea871b1cae3fc748657caa0b4c5..92e2b5ca5600d35b28d68c43b20a43f97f5aefc3 100644 --- a/entity/Classification_entity/entityfields/classificationgroup/onValidation.js +++ b/entity/Classification_entity/entityfields/classificationgroup/onValidation.js @@ -8,10 +8,21 @@ import("Entity_lib"); if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") { var newGroup = ProcessHandlingUtils.getOnValidationValue(); - var groups = ClassificationUtils.getAllGroups(vars.get("$param.ClassificationType_param"), false) + + // use param if available or current selectionRows + var classificationType = ClassificationUtils.getUsageType("$param.ClassificationType_param", "$sys.selectionRows"); - if (groups.indexOf(newGroup, 0) != -1 && ClassificationUtils.getGroupFromDb(vars.get("$field.CLASSIFICATIONTYPEID")) != newGroup) + if (classificationType) + { + var groups = ClassificationUtils.getAllGroups(classificationType, false) + + if (groups.indexOf(newGroup, 0) != -1 && ClassificationUtils.getGroupFromDb(vars.get("$field.CLASSIFICATIONTYPEID")) != newGroup) + { + result.string(translate.text("The new Classification name already exists.")); + } + } + else { - result.string(translate.text("The new Classification name already exists.")); + result.string(translate.text("Could not determine the current Classification type (usage).")); } } diff --git a/entity/Classification_entity/entityfields/classificationtype/displayValueProcess.js b/entity/Classification_entity/entityfields/classificationtype/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e56601c615178505648345adeb253d9b3dea9e77 --- /dev/null +++ b/entity/Classification_entity/entityfields/classificationtype/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.classificationType(), vars.get("$this.value"))); \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/classificationtype/stateProcess.js b/entity/Classification_entity/entityfields/classificationtype/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..bcc88cc57c128d8971d6880133fb2584129a802e --- /dev/null +++ b/entity/Classification_entity/entityfields/classificationtype/stateProcess.js @@ -0,0 +1,11 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(neon.COMPONENTSTATE_EDITABLE); +} +else +{ + result.string(neon.COMPONENTSTATE_READONLY); +} \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js b/entity/Classification_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b5e82ac38396ff9ccda20b257c1d0820f5294683 --- /dev/null +++ b/entity/Classification_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic") + +result.string($KeywordRegistry.classificationType()) \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js index d0d8001f500e887a572a630a2ead5ebe09d93b72..71b3cab9ca3a467dd513b49dd3aa14674f3116f0 100644 --- a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js @@ -1,3 +1,4 @@ +import("JditoFilter_lib"); import("system.logging"); import("Classification_lib"); import("system.vars"); @@ -8,6 +9,8 @@ import("system.result"); var admin = (vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") var scores = {}; + + if (!admin) { scores = JSON.stringify(ClassificationUtils.getScore(vars.get("$param.ClassificationType_param"), vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowid_param"))); @@ -48,19 +51,21 @@ if (!classificationId) .or("CLASSIFICATION.OBJECT_ROWID is null")) } -logging.log(db.translateStatement(cond.buildSql("select case when CLASSIFICATIONID is not null then 'C,' || CLASSIFICATIONID else 'T,' || CLASSIFICATIONTYPEID end, CLASSIFICATIONID, CLASSIFICATIONGROUP, CLASSIFICATIONSCORE_ID, CLASSIFICATIONTYPEID, CLASSIFICATIONTYPE_ID, OBJECT_TYPE, OBJECT_ROWID, SCORETYPE, CLASSIFICATIONTYPE.CLASSIFICATIONTYPE from CLASSIFICATION \n\ - right join CLASSIFICATIONTYPE on " + db.translateCondition(SqlCondition.begin() - .and("CLASSIFICATIONTYPE_ID = CLASSIFICATIONTYPEID") - .andPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") - .andPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param").build()), (admin ? "1=1" : "1=2"), "order by CLASSIFICATIONGROUP asc"))) +if (vars.exists("$local.userfilter") && vars.get("$local.userfilter")) +{ + var filter = vars.get("$local.userfilter"); + cond.andSqlCondition((JditoFilterUtils.getSqlCondition(filter, "CLASSIFICATION", undefined, { + CLASSIFICATIONTYPE : "CLASSIFICATIONTYPE.CLASSIFICATIONTYPE" + }))); +} result.object(db.table(cond.buildSql("select case when CLASSIFICATIONID is not null then 'C,' || CLASSIFICATIONID else 'T,' || CLASSIFICATIONTYPEID end, CLASSIFICATIONID, CLASSIFICATIONGROUP, CLASSIFICATIONSCORE_ID, CLASSIFICATIONTYPEID, CLASSIFICATIONTYPE_ID, OBJECT_TYPE, OBJECT_ROWID, SCORETYPE, CLASSIFICATIONTYPE.CLASSIFICATIONTYPE from CLASSIFICATION \n\ - right join CLASSIFICATIONTYPE on " + db.translateCondition(SqlCondition.begin() - .and("CLASSIFICATIONTYPE_ID = CLASSIFICATIONTYPEID") - .andPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") - .andPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param").build()), (admin ? "1=1" : "1=2"), "order by CLASSIFICATIONGROUP asc")) - .map(function(pRow) - { - pRow.push(scores); - return pRow; - })); \ No newline at end of file + right join CLASSIFICATIONTYPE on " + db.translateCondition(SqlCondition.begin() + .and("CLASSIFICATIONTYPE_ID = CLASSIFICATIONTYPEID") + .andPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") + .andPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param").build()), (admin ? "1=1" : "1=2"), "order by CLASSIFICATIONGROUP asc")) + .map(function(pRow) + { + pRow.push(scores); + return pRow; + })); \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/onUpdate.js b/entity/Classification_entity/recordcontainers/jdito/onUpdate.js index 9a5b1a4a158ca3645df0f4caecc819c666cc37bd..3040fd59b61a165f784b268c4806985ceda19b11 100644 --- a/entity/Classification_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/Classification_entity/recordcontainers/jdito/onUpdate.js @@ -8,7 +8,6 @@ import("system.vars"); var changed = vars.get("$local.changed"); -logging.log(vars.get("$field.CLASSIFICATIONID")) // check if it already exists. Else it only exists as ScoreType but has no Classification-Entry if (vars.get("$field.CLASSIFICATIONID")) { @@ -42,7 +41,6 @@ if (vars.exists("$param.IsAdminMode_param") && vars.exists("$param.IsAdminMode_p { changed.forEach(function(change) { - logging.log(change) switch (change) { case "CLASSIFICATIONGROUP.value": @@ -50,6 +48,11 @@ if (vars.exists("$param.IsAdminMode_param") && vars.exists("$param.IsAdminMode_p var newGroupName = vars.get("$field.CLASSIFICATIONGROUP"); ClassificationUtils.changeGroupName(oldGroupName, newGroupName, vars.get("$field.CLASSIFICATIONTYPE")) + case "SCORE_TYPE.value": + var scoreId = vars.get("$field.CLASSIFICATIONSCORE_ID"); + var newScoreName = vars.get("$field.SCORE_TYPE"); + + ClassificationUtils.changeScoreName(newScoreName, scoreId); } }) diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod index b4b9660d0b0eae968e4671097549231b0674ffe7..38f57758f109deaa5d737768866b61573f658aa3 100644 --- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod +++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod @@ -392,6 +392,12 @@ <fieldName>KeywordClassificationTypes</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>3a81e886-0d83-47f0-9ec7-c864ffc57cda</name> + <entityName>Classification_entity</entityName> + <fieldName>KeywordClassificationTypes</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/neonContext/ClassificationAdmin/ClassificationAdmin.aod b/neonContext/ClassificationAdmin/ClassificationAdmin.aod index 39b6239be4602b6dca174ef368b0b7bd0facd5c1..26b6e61e6e1c53bb65c9cc95a669895b20393285 100644 --- a/neonContext/ClassificationAdmin/ClassificationAdmin.aod +++ b/neonContext/ClassificationAdmin/ClassificationAdmin.aod @@ -3,13 +3,8 @@ <name>ClassificationAdmin</name> <majorModelMode>DISTRIBUTED</majorModelMode> <mainview>ClassificationAdminMain_view</mainview> - <filterview>ClassificationAdminFilter_view</filterview> <entity>ClassificationAdmin_entity</entity> <references> - <neonViewReference> - <name>e29a0221-6ac6-47d3-bee0-950def1847a8</name> - <view>ClassificationAdminFilter_view</view> - </neonViewReference> <neonViewReference> <name>4a240156-6c62-46d8-890e-b5c239ef8128</name> <view>ClassificationAdminMain_view</view> diff --git a/neonView/ClassificationAdminFilter_view/ClassificationAdminFilter_view.aod b/neonView/ClassificationAdminFilter_view/ClassificationAdminFilter_view.aod deleted file mode 100644 index 3185915eb024af0070a9f5f42c8da43e8ee525ce..0000000000000000000000000000000000000000 --- a/neonView/ClassificationAdminFilter_view/ClassificationAdminFilter_view.aod +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificationAdminFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>Classificationtypes</name> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>44e91668-7947-49e2-8aa4-b9a03bc87842</name> - <entityField>UID</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </children> -</neonView> diff --git a/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod b/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod index 2d44f2e088d71aa9d7e145adfef16733a2efe8c0..423b78a6c95dfa2f33262e2f5e51bf40e3e64aa7 100644 --- a/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod +++ b/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod @@ -2,16 +2,18 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> <name>ClassificationAdminTree_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> <layout> - <noneLayout> + <boxLayout> <name>layout</name> - </noneLayout> + </boxLayout> </layout> <children> <treeViewTemplate> <name>classificationTree</name> <titleField>SCORETYPE</titleField> <defaultGroupFields> + <element>CLASSIFICATIONTYPE</element> <element>CLASSIFICATIONGROUP</element> </defaultGroupFields> <hideContentSearch v="true" /> diff --git a/neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod b/neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod index 208379bfca595f4f872c0fce82564cd3c36ccb96..b0ef52c8a97aa2eab368e78f72d7057ef1f84996 100644 --- a/neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod +++ b/neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod @@ -15,6 +15,10 @@ <drawerCaption>Classification</drawerCaption> <entityField>#ENTITY</entityField> <fields> + <entityFieldLink> + <name>31662c73-7352-4eb2-889d-3f63bff25686</name> + <entityField>CLASSIFICATIONTYPE</entityField> + </entityFieldLink> <entityFieldLink> <name>7fddc4d4-6bdc-4c7a-9d69-bba4a9506707</name> <entityField>CLASSIFICATIONGROUP</entityField> diff --git a/process/Classification_lib/process.js b/process/Classification_lib/process.js index a790e3fa72c155f1d36ee218ddad91a1a68b8d75..a29e03f144e3a4b4f4ed333a92080f7051c7040b 100644 --- a/process/Classification_lib/process.js +++ b/process/Classification_lib/process.js @@ -89,6 +89,32 @@ ClassificationUtils.changeGroupName = function(pOldName, pNewName, pClassificati { var groups = ClassificationUtils.getAllGroups(pClassificationType, false) + if (groups.indexOf(pNewName, 0) == -1) + { + db.updateData("CLASSIFICATIONTYPE", ["CLASSIFICATIONGROUP"], null, [pNewName], SqlCondition.equals("CLASSIFICATIONTYPE.CLASSIFICATIONGROUP", pOldName, "1=2")); + } +} + +ClassificationUtils.getUsageType = function(pParamField, pSelectionField) +{ + if (vars.exists(pParamField) && vars.get(pParamField)) + classificationType = vars.get(pParamField); + else if (vars.exists(pSelectionField) && vars.get(pSelectionField)) + { + var selection = vars.get(pSelectionField); + if (selection.length > 0 && selection[0]["CLASSIFICATIONTYPE"]) + { + classificationType = selection[0]["CLASSIFICATIONTYPE"]; + } + } + + return classificationType; +} + +ClassificationUtils.changeScoreName = function(pOldScoreName, pNewScoreName, pScoreId) +{ + var groups = ClassificationUtils.getAllScores(pClassificationGroup, false) + if (groups.indexOf(pNewName, 0) == -1) { db.updateData("CLASSIFICATIONTYPE", ["CLASSIFICATIONGROUP"], null, [pNewName], SqlCondition.equals("CLASSIFICATIONTYPE.CLASSIFICATIONGROUP", pOldName, "1=2"));