diff --git a/source/java/org/alfresco/web/bean/workflow/ManageTaskDialog.java b/source/java/org/alfresco/web/bean/workflow/ManageTaskDialog.java index 2f8c6592e3..d8bd0b7e94 100644 --- a/source/java/org/alfresco/web/bean/workflow/ManageTaskDialog.java +++ b/source/java/org/alfresco/web/bean/workflow/ManageTaskDialog.java @@ -160,31 +160,8 @@ public class ManageTaskDialog extends BaseDialogBean if (LOGGER.isDebugEnabled()) LOGGER.debug("Saving task with parameters: " + params); - // remove any items the user selected to remove - if (this.workflowPackage != null && this.packageItemsToRemove != null && - this.packageItemsToRemove.size() > 0) - { - for (String removedItem : this.packageItemsToRemove) - { - this.nodeService.removeChild(this.workflowPackage, new NodeRef(removedItem)); - } - } - - // add any items the user selected to add - if (this.workflowPackage != null && this.packageItemsToAdd != null && - this.packageItemsToAdd.size() > 0) - { - for (String addedItem : this.packageItemsToAdd) - { - NodeRef addedNodeRef = new NodeRef(addedItem); - this.nodeService.addChild(this.workflowPackage, addedNodeRef, - ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, - QName.createValidLocalName((String)this.nodeService.getProperty( - addedNodeRef, ContentModel.PROP_NAME)))); - } - } - - // update the task with the updated parameters + // update the task with the updated parameters and resources + updateResources(); this.workflowService.updateTask(this.task.id, params, null, null); return outcome; @@ -285,7 +262,8 @@ public class ManageTaskDialog extends BaseDialogBean Map params = new HashMap(); params.put(ContentModel.PROP_OWNER, userName); - // update the task with the updated parameters + // update the task with the updated parameters and resources + updateResources(); this.workflowService.updateTask(this.task.id, params, null, null); // commit the changes @@ -322,7 +300,8 @@ public class ManageTaskDialog extends BaseDialogBean Map params = new HashMap(); params.put(ContentModel.PROP_OWNER, null); - // update the task with the updated parameters + // update the task with the updated parameters and resources + updateResources(); this.workflowService.updateTask(this.task.id, params, null, null); // commit the changes @@ -378,7 +357,8 @@ public class ManageTaskDialog extends BaseDialogBean if (LOGGER.isDebugEnabled()) LOGGER.debug("Transitioning task with parameters: " + params); - // update the task with the updated parameters + // update the task with the updated parameters and resources + updateResources(); this.workflowService.updateTask(this.task.id, params, null, null); // signal the selected transition to the workflow task @@ -827,6 +807,33 @@ public class ManageTaskDialog extends BaseDialogBean this.resources.add(node); } + protected void updateResources() + { + // remove any items the user selected to remove + if (this.workflowPackage != null && this.packageItemsToRemove != null && + this.packageItemsToRemove.size() > 0) + { + for (String removedItem : this.packageItemsToRemove) + { + this.nodeService.removeChild(this.workflowPackage, new NodeRef(removedItem)); + } + } + + // add any items the user selected to add + if (this.workflowPackage != null && this.packageItemsToAdd != null && + this.packageItemsToAdd.size() > 0) + { + for (String addedItem : this.packageItemsToAdd) + { + NodeRef addedNodeRef = new NodeRef(addedItem); + this.nodeService.addChild(this.workflowPackage, addedNodeRef, + ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, + QName.createValidLocalName((String)this.nodeService.getProperty( + addedNodeRef, ContentModel.PROP_NAME)))); + } + } + } + // ------------------------------------------------------------------------------ // Inner classes diff --git a/source/web/scripts/ajax/node-info.js b/source/web/scripts/ajax/node-info.js index a20f251718..db9d3e7237 100644 --- a/source/web/scripts/ajax/node-info.js +++ b/source/web/scripts/ajax/node-info.js @@ -38,7 +38,7 @@ function showNodeInfoHandler(type, data, evt) var div = document.createElement("div"); // get the position of the element we are showing info for - var pos = dojo.style.getAbsolutePosition(_launchElement, false); + var pos = dojo.html.getAbsolutePosition(_launchElement, false); // setup the div with the correct appearance div.innerHTML = data; @@ -52,7 +52,7 @@ function showNodeInfoHandler(type, data, evt) // is there a better way of doing this, dojo.dom.insertBefore?? var body = document.getElementsByTagName("body")[0]; - dojo.style.setOpacity(div, 0); + dojo.html.setOpacity(div, 0); _popupElement = div; body.appendChild(div);