Commit cdbb85c2 authored by ecrombag's avatar ecrombag

Added task properties to Task Action menu

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@1127 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 45baee6a
......@@ -44,12 +44,15 @@ itasks.WorkPanel = Ext.extend(itasks.RemoteDataPanel, {
iconCls: 'x-tbar-loading',
scope: this,
handler: function(item,evt){
this.refresh();
}
this.refresh();
}
},{
text: 'Task Properties' ,
iconCls: 'icon-properties',
disabled: true
scope: this,
handler: function(item,evt){
this.showProperties();
}
},{
text: 'Discuss Task',
iconCls: 'icon-chat',
......@@ -210,6 +213,65 @@ itasks.WorkPanel = Ext.extend(itasks.RemoteDataPanel, {
}
Ext.Msg.confirm("Cancel Task","Are you sure you wish to cancel this task?",doCancel);
},
showProperties: function(){
var p = this.properties;
var w = new Ext.Window({
title : 'Task Properties',
iconCls: 'icon-properties',
resizable: false,
width: 500,
height: 300,
layout: 'accordion',
cls: 'task-properties-window',
defaults: {
bodyStyle: 'padding: 10px'
},
layoutConfig: {
titleCollapse: false,
hideCollapseTool: true
},
items: [
{ title: 'Runtime Properties'
, iconCls: 'icon-currentwork'
, layout: 'form'
, defaultType: "staticfield"
, items: [{
//xtype: "itasks.progress",
name: "progress",
fieldLabel: "Progress",
format: itasks.util.formatProgress,
value: p.workerProperties.progress
//listeners: {
// "change" : function(ov,nv) {var wt = this.findParentByType(itasks.WorkPanel); wt.sendPropertyEvent(wt.properties.systemProperties.taskId,"progress",nv); }
//}
},{
name: "priority",
fieldLabel: "Priority",
format: itasks.util.formatPriority,
value: p.managerProperties.priority
},{
name: "issuedAt",
fieldLabel: "Issued at",
format: itasks.util.formatDate,
value: p.systemProperties.issuedAt
},{
name: "firstEvent",
fieldLabel: "First worked on",
format: itasks.util.formatStartDate,
value: p.systemProperties.firstEvent
},{
name: "latestEvent",
fieldLabel: "Last worked on",
format: itasks.util.formatStartDate,
value: p.systemProperties.latestEvent
}]
}
]
});
w.show();
}
});
......
......@@ -303,6 +303,11 @@ div.task-context th {
vertical-align: top;
}
.task-properties-window .x-form-item-label {
font-weight: bold;
color: #1e3356;
}
/* DEBUG STYLES */
.debug-button button.x-btn-text {
width: 150px;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment