| 1 |
define([ |
| 2 |
"./GanttTaskControl", |
| 3 |
"dojo/_base/declare", |
| 4 |
"dojo/domReady!" |
| 5 |
], function(GanttTaskControl, declare){ |
| 6 |
return declare("dojox.gantt.GanttTaskItem", [], { |
| 7 |
constructor: function(configuration){ |
| 8 |
|
| 9 |
this.id = configuration.id; |
| 10 |
this.name = configuration.name || this.id; |
| 11 |
this.startTime = configuration.startTime || new Date(); |
| 12 |
this.duration = configuration.duration || 8; |
| 13 |
this.percentage = configuration.percentage || 0; |
| 14 |
this.previousTaskId = configuration.previousTaskId || ""; |
| 15 |
this.taskOwner = configuration.taskOwner || ""; |
| 16 |
this.cldTasks = []; |
| 17 |
this.cldPreTasks = []; |
| 18 |
this.parentTask = null; |
| 19 |
this.previousTask = null; |
| 20 |
this.project = null; |
| 21 |
this.nextChildTask = null; |
| 22 |
this.previousChildTask = null; |
| 23 |
this.nextParentTask = null; |
| 24 |
this.previousParentTask = null; |
| 25 |
}, |
| 26 |
addChildTask: function(task){ |
| 27 |
this.cldTasks.push(task); |
| 28 |
task.parentTask = this; |
| 29 |
}, |
| 30 |
setProject: function(project){ |
| 31 |
this.project = project; |
| 32 |
for(var j = 0; j < this.cldTasks.length; j++){ |
| 33 |
this.cldTasks[j].setProject(project); |
| 34 |
} |
| 35 |
} |
| 36 |
}); |
| 37 |
}); |