Commit 7e4ee009 authored by ecrombag's avatar ecrombag

Disabled the cancel option in case task-worker != task-manager

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@1123 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 8c511532
......@@ -174,9 +174,20 @@ itasks.WorkPanel = Ext.extend(itasks.RemoteDataPanel, {
this.initialized = true;
}
},
updateToolbar: function(properties) {
// var cancelMI = this.getComponent(1).getTopToolbar().getComponent(0).getComponent(3);
// console.log(cancelMI);
updateToolbar: function(properties) {
var getUserName = function(name){
if(name.match("(.+)<(.+)>"))
return name.replace("(.+)<(.+)>", "$2");
else
return name;
}
var cancelMI = this.getComponent(1).getTopToolbar().getComponent(0).menu.getComponent(4);
if(getUserName(properties.managerProperties.worker) == getUserName(properties.systemProperties.manager)){
cancelMI.enable();
}else{
cancelMI.disable();
}
},
sendTaskUpdates: function(target,updates) {
//Add task updates to params
......
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