+
<#if hasDue>
@@ -94,13 +94,22 @@
-
- Type: | ${t.type?html} |
- Start Date: | ${t.startDate?date} |
- Priority: | ${t.properties["bpm:priority"]} |
-
Status: | ${t.properties["bpm:status"]} |
-
Percent Complete: | ${t.properties["bpm:percentComplete"]}% |
-
+
+
+ Status: | ${t.properties["bpm:status"]} |
+
Priority: | ${t.properties["bpm:priority"]} |
+
Start Date: | ${t.startDate?date} |
+ Type: | ${t.type?html} |
+ Complete: | ${t.properties["bpm:percentComplete"]}% |
+
+
+
+
+
#if>
@@ -217,10 +226,10 @@ a.filterLinkSelected:link, a.filterLinkSelected:visited
.taskDetail
{
+ color: #5A5741;
background-color: #DFC900;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 12px;
- color: #000000;
margin: 0px;
display: none;
overflow: hidden;
@@ -233,12 +242,55 @@ a.filterLinkSelected:link, a.filterLinkSelected:visited
border-top: 1px solid #82770B !important;
}
+.taskResources
+{
+ border-left: 1px solid #0092DD;
+ border-top: 1px solid #0092DD;
+ border-bottom: 1px solid #CCD4DB;
+ border-right: 1px solid #CCD4DB;
+ background-color: #F8FCFD;
+ margin: 4px 0px 0px 16px;
+ width: 400px;
+ height: 80px;
+ overflow: hidden;
+}
+
+.taskResourceHeader
+{
+ color: #5A5741;
+ font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
+ padding: 0px 0px 0px 16px;
+ font-weight: bold;
+ display: inline;
+}
+
+.taskResources td
+{
+ color: #5A5741;
+ font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
+}
+
+.taskActions td
+{
+ color: #5A5741;
+ font-size: 14px;
+ font-weight: bold;
+ font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
+}
+
.taskMetadata
{
color: #5A5741;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
}
+.taskMetaprop
+{
+ color: #5A5741;
+ font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+}
+
.paperEdgeRight
{
background-image: url(../images/parts/paper_rightedge.png);
diff --git a/source/java/org/alfresco/web/bean/ajax/TaskInfoBean.java b/source/java/org/alfresco/web/bean/ajax/TaskInfoBean.java
index 43507a5d2d..edbe83a460 100644
--- a/source/java/org/alfresco/web/bean/ajax/TaskInfoBean.java
+++ b/source/java/org/alfresco/web/bean/ajax/TaskInfoBean.java
@@ -58,7 +58,7 @@ public class TaskInfoBean
private WorkflowService workflowService;
/**
- * Returns information on the node identified by the 'taskId'
+ * Returns information for the workflow task identified by the 'taskId'
* parameter found in the ExternalContext.
*
* The result is the formatted HTML to show on the client.
@@ -85,6 +85,35 @@ public class TaskInfoBean
out.write("Task could not be found.");
}
}
+
+ /**
+ * Returns the resource list for the workflow task identified by the 'taskId'
+ * parameter found in the ExternalContext.
+ *
+ * The result is the formatted HTML to show on the client.
+ */
+ public void sendTaskResources() throws IOException
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResponseWriter out = context.getResponseWriter();
+
+ String taskId = (String)context.getExternalContext().getRequestParameterMap().get("taskId");
+ if (taskId == null || taskId.length() == 0)
+ {
+ throw new IllegalArgumentException("'taskId' parameter is missing");
+ }
+
+ WorkflowTask task = this.workflowService.getTaskById(taskId);
+ if (task != null)
+ {
+ Repository.getServiceRegistry(context).getTemplateService().processTemplate(
+ "/alfresco/templates/client/task_resource_panel.ftl", getModel(task), out);
+ }
+ else
+ {
+ out.write("Task could not be found.");
+ }
+ }
// ------------------------------------------------------------------------------
diff --git a/source/web/scripts/ajax/mytasks.js b/source/web/scripts/ajax/mytasks.js
index e774220340..baf6ca65e8 100644
--- a/source/web/scripts/ajax/mytasks.js
+++ b/source/web/scripts/ajax/mytasks.js
@@ -14,16 +14,31 @@ var MyTasks = {
var items = $$('#taskPanel .taskItem');
var infos = $$('#taskPanel .taskInfo');
var details = $$('#taskPanel .taskDetail');
+ var resources = $$('#taskPanel .taskResources');
var fxInfo = new Fx.Elements(infos, {wait: false, duration: 500, transition: Fx.Transitions.linear});
- var fxDetail = new Fx.Elements(details, {wait: false, duration: 500, transition: Fx.Transitions.linear});
+ var fxDetail = new Fx.Elements(details, {wait: false, duration: 500, transition: Fx.Transitions.linear,
+ onComplete: function()
+ {
+ // event handler to ensure
+ this.elements.each(function(detail, i)
+ {
+ if (detail.parentNode.isOpen == true)
+ {
+ detail.getElementsByTagName("div")[2].setStyle('overflow', 'auto');
+ }
+ });
+ }
+ });
tasks.each(function(task, i)
{
var item = items[i];
var info = infos[i];
var detail = details[i];
+ var resource = resources[i];
// animated elements defaults
task.isOpen = false;
+ task.loadingResources = false;
item.defBColor = (item.getStyle('background-color') == 'transparent') ? '' : item.getStyle('background-color');
detail.defHeight = 0;
detail.setStyle('opacity', 0);
@@ -117,21 +132,41 @@ var MyTasks = {
// flag this task as open
task.isOpen = true;
+ if (task.loadingResources == false)
+ {
+ // ajax call to populate the task resource list
+ task.loadingResources = true;
+ YAHOO.util.Connect.asyncRequest(
+ "POST",
+ getContextPath() + '/ajax/invoke/TaskInfoBean.sendTaskResources',
+ {
+ success: function(response)
+ {
+ // set the resource list panel html
+ var resource = response.argument[0];
+ resource.innerHTML = response.responseText;
+ },
+ failure: handleErrorYahoo, // global error handler
+ argument: [resource]
+ },
+ "taskId=" + task.id);
+ }
+
// fade in info button
animInfo[i] = {'opacity': [infoOpacity, 1]};
// slide and fade in the details panel
animDetail[i] = {
- 'height': [detailHeight, detail.defHeight + 100],
+ 'height': [detailHeight, detail.defHeight + 140],
'opacity': [detail.getStyle('opacity'), 1]};
// close other open tasks and toggle this one if it's already open
tasks.each(function(otherTask, j)
{
var otherItem = items[j],
- otherInfo = infos[j],
- otherDetail = details[j];
-
+ otherInfo = infos[j],
+ otherDetail = details[j];
+
if (otherTask != task)
{
// close any other open tasks
@@ -154,6 +189,8 @@ var MyTasks = {
{
animInfo[j] = {'opacity': [otherOpacity, 0]};
}
+
+ otherDetail.getElementsByTagName("div")[2].setStyle('overflow', 'hidden');
}
});
}
@@ -170,6 +207,8 @@ var MyTasks = {
animDetail[i] = {
'height': [detailHeight, detail.defHeight],
'opacity': [detail.getStyle('opacity'), 0]};
+
+ detail.getElementsByTagName("div")[2].setStyle('overflow', 'hidden');
}
fxInfo.start(animInfo);
fxDetail.start(animDetail);