diff --git a/entity/AnyContact_entity/AnyContact_entity.aod b/entity/AnyContact_entity/AnyContact_entity.aod index 1fa8e83a7e770f9d135690e93ce1c6c2ca90e227..5207437071577773ce2911fc4d98ceb1c6523a24 100644 --- a/entity/AnyContact_entity/AnyContact_entity.aod +++ b/entity/AnyContact_entity/AnyContact_entity.aod @@ -4,7 +4,6 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/AnyContact_entity/documentation.adoc</documentation> <contentTitleProcess>%aditoprj%/entity/AnyContact_entity/contentTitleProcess.js</contentTitleProcess> - <afterUiInit>%aditoprj%/entity/AnyContact_entity/afterUiInit.js</afterUiInit> <initFilterProcess>%aditoprj%/entity/AnyContact_entity/initFilterProcess.js</initFilterProcess> <imageProcess>%aditoprj%/entity/AnyContact_entity/imageProcess.js</imageProcess> <recordContainer>db</recordContainer> diff --git a/entity/AnyContact_entity/afterUiInit.js b/entity/AnyContact_entity/afterUiInit.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/entity/Contact_entity/Contact_entity.aod b/entity/Contact_entity/Contact_entity.aod index 542030903efd6ff494f8df17ed1a6445c8f3f43c..ad05310a9dd5d918ce46a6b17a4ec7564dad10ba 100644 --- a/entity/Contact_entity/Contact_entity.aod +++ b/entity/Contact_entity/Contact_entity.aod @@ -8,7 +8,6 @@ <grantUpdateProcess>%aditoprj%/entity/Contact_entity/grantUpdateProcess.js</grantUpdateProcess> <grantDeleteProcess>%aditoprj%/entity/Contact_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Contact_entity/contentTitleProcess.js</contentTitleProcess> - <afterUiInit>%aditoprj%/entity/Contact_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/Contact_entity/onValidation.js</onValidation> <initFilterProcess>%aditoprj%/entity/Contact_entity/initFilterProcess.js</initFilterProcess> <iconId>VAADIN:USERS</iconId> diff --git a/entity/Contact_entity/afterUiInit.js b/entity/Contact_entity/afterUiInit.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/entity/Organisation_entity/recordcontainers/index/query.js b/entity/Organisation_entity/recordcontainers/index/query.js index 665f7ab71f848408c7d7eef7c16f608ae42b21a8..668b6b227f95a21c730eef997cb908438a3833f7 100644 --- a/entity/Organisation_entity/recordcontainers/index/query.js +++ b/entity/Organisation_entity/recordcontainers/index/query.js @@ -1,3 +1,4 @@ +import("KeywordRegistry_basic"); import("system.translate"); import("system.result"); import("system.vars"); diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index a0fac3286f5a3467d6bb90191a90d23855c2eb41..7eb5a44a80e59067e84e85577ce24818f753e23a 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -1012,7 +1012,6 @@ <title>New task</title> <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/newtask/onActionProcess.js</onActionProcess> <iconId>VAADIN:TASKS</iconId> - <iconIdProcess>%aditoprj%/entity/Person_entity/entityfields/newtask/iconIdProcess.js</iconIdProcess> </entityActionField> <entityActionField> <name>addToCampaign</name> @@ -1141,12 +1140,6 @@ <iconId>VAADIN:ENVELOPE</iconId> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/newletter/stateProcess.js</stateProcess> </entityActionField> - <entityActionField> - <name>openTaskView</name> - <isMenuAction v="false" /> - <isObjectAction v="false" /> - <stateProcess>%aditoprj%/entity/Person_entity/entityfields/opentaskview/stateProcess.js</stateProcess> - </entityActionField> <entityActionField> <name>startWorkflow</name> <title>Start workflow</title> @@ -1583,9 +1576,6 @@ <recordfield>PERSON.PERSONID</recordfield> <aggregateType>COUNT</aggregateType> </aggregateFieldDbMapping> - <dbRecordFieldMapping> - <name>COUNT.value</name> - </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtensionSet> diff --git a/entity/Person_entity/entityfields/newtask/iconIdProcess.js b/entity/Person_entity/entityfields/newtask/iconIdProcess.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/entity/Person_entity/entityfields/opentaskview/stateProcess.js b/entity/Person_entity/entityfields/opentaskview/stateProcess.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/entity/WorkflowTask_entity/WorkflowTask_entity.aod b/entity/WorkflowTask_entity/WorkflowTask_entity.aod index 938fbcdc991e33b51be6bc7134499438ac1fbabd..ceb8ba0d2d1a61688e02801c24a6a4fe8e9b3652 100644 --- a/entity/WorkflowTask_entity/WorkflowTask_entity.aod +++ b/entity/WorkflowTask_entity/WorkflowTask_entity.aod @@ -7,6 +7,7 @@ <grantCreate v="false" /> <grantUpdateProcess>%aditoprj%/entity/WorkflowTask_entity/grantUpdateProcess.js</grantUpdateProcess> <grantDelete v="false" /> + <afterSave>%aditoprj%/entity/WorkflowTask_entity/afterSave.js</afterSave> <imageProcess>%aditoprj%/entity/WorkflowTask_entity/imageProcess.js</imageProcess> <titlePlural>Tasks</titlePlural> <recordContainer>jdito</recordContainer> diff --git a/entity/WorkflowTask_entity/afterSave.js b/entity/WorkflowTask_entity/afterSave.js new file mode 100644 index 0000000000000000000000000000000000000000..68fae8b0d2432769e1c21ae7d594d02fd20cdb87 --- /dev/null +++ b/entity/WorkflowTask_entity/afterSave.js @@ -0,0 +1,38 @@ +import("system.neon"); +import("system.workflow"); +import("system.vars"); + +var entityData = vars.get("$local.entitydata"); + +//open the next workflow task if one exists +if (entityData["FORMRESULT"]) +{ + var processInstanceId = entityData["PROCESSINSTANCE_ID"]; + var createTime = entityData["CREATE_TIME"]; + + var loadConfig = workflow.createConfigForLoadingTasks() + .processInstanceId(processInstanceId); + + var startVal = { + id : null, + createTime : new Date(+createTime).toString() + }; + var newestTask = JSON.parse(workflow.getTasks(loadConfig)).reduce(function (prev, curr) + { + var prevTime = Date.parse(prev.createTime); + var currTime = Date.parse(curr.createTime); + + return prevTime > currTime ? prev : curr; + }, startVal); + + if (newestTask.id !== null) + neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [newestTask.id], neon.OPERATINGSTATE_VIEW, null); + else + { + var params = { + "TaskTitle_param" : rowData["NAME.value"] + }; + //if you try to open the task now, it will display "Task done" + neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [rowData["UID.value"]], neon.OPERATINGSTATE_VIEW, params); + } +} \ No newline at end of file diff --git a/entity/WorkflowTask_entity/recordcontainers/jdito/onUpdate.js b/entity/WorkflowTask_entity/recordcontainers/jdito/onUpdate.js index 9144b8ba06ba1196f6858e0b47fc80ad8a90d103..911cd08a9f37eddcb408944f6b98a038ffe0644a 100644 --- a/entity/WorkflowTask_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/WorkflowTask_entity/recordcontainers/jdito/onUpdate.js @@ -18,39 +18,5 @@ vars.get("$local.changed").forEach(function (field) if (!rowData["ASSIGNEE.value"] && !vars.get("$field.ASSIGNEE")) workflow.setTaskAssignee(taskId, EmployeeUtils.getCurrentUserId()); workflow.completeTaskWithFormData(taskId, JSON.parse(value)); - _openNextTaskIfExists(rowData["PROCESSINSTANCE_ID.value"], rowData["CREATE_TIME.value"]); } }); - -/* - * checks if a new task has been created for that process instance, - * if that's the case the new task will be opened - */ -function _openNextTaskIfExists (pProcessInstanceId, pCreateTime) -{ - var loadConfig = workflow.createConfigForLoadingTasks() - .processInstanceId(pProcessInstanceId); - - var startVal = { - id : null, - createTime : new Date(+pCreateTime).toString() - }; - var newestTask = JSON.parse(workflow.getTasks(loadConfig)).reduce(function (prev, curr) - { - var prevTime = Date.parse(prev.createTime); - var currTime = Date.parse(curr.createTime); - - return prevTime > currTime ? prev : curr; - }, startVal); - - if (newestTask.id !== null) - neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [newestTask.id], neon.OPERATINGSTATE_VIEW, null); - else - { - var params = { - "TaskTitle_param" : rowData["NAME.value"] - }; - //if you try to open the task now, it will display "Task done" - neon.openContext("WorkflowTask", "WorkflowTaskPreview_view", [rowData["UID.value"]], neon.OPERATINGSTATE_VIEW, params); - } -} \ No newline at end of file diff --git a/neonContext/Social/Social.aod b/neonContext/Social/Social.aod index a2e96e0735b239931303269de6032e86769fc4a4..339a5a5470eda10e445766329fe61bbb2fdc9904 100644 --- a/neonContext/Social/Social.aod +++ b/neonContext/Social/Social.aod @@ -3,8 +3,6 @@ <name>Social</name> <title>Social</title> <majorModelMode>DISTRIBUTED</majorModelMode> - <mainView></mainView> - <filterView><null value></filterView> <entity>Social_entity</entity> <references> <neonViewReference> diff --git a/neonView/PersonPreview_view/PersonPreview_view.aod b/neonView/PersonPreview_view/PersonPreview_view.aod index f0f73a44de57c9a4d23dbb9336ceb3406c99f6f8..b1717f65bcff8f9c0493e2da9396beaa829bcf78 100644 --- a/neonView/PersonPreview_view/PersonPreview_view.aod +++ b/neonView/PersonPreview_view/PersonPreview_view.aod @@ -91,9 +91,6 @@ </genericViewTemplate> <scoreCardViewTemplate> <name>Scores</name> - <fieldActions> - <element>openTaskView</element> - </fieldActions> <entityField>#ENTITY</entityField> <fields> <entityFieldLink>