Debian Codegraph @

dojox/gantt/tests/test_Gantt.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Gantt Chart</title>
5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 <style>
7 @import "../../../dojo/resources/dojo.css";
8 @import "../../../dijit/themes/dijit.css";
9 @import "../../../dijit/themes/claro/claro.css";
10 @import "../../../dijit/tests/css/dijitTests.css";
11 @import "../resources/gantt.css";
12 </style>
13 <script src="../../../dojo/dojo.js"
14 data-dojo-config="async:true, transparentColor: [ 255, 255, 255 ]"></script>
15
16 <script src="../../../dijit/tests/_testCommon.js"></script>
17
18 <script >
19 require([
20 "dojo/_base/declare",
21 "dojo/parser",
22 "dojo/query",
23 "dojox/gantt/GanttChart",
24 "dojox/gantt/GanttProjectItem",
25 "dojox/gantt/GanttTaskItem",
26 "dojo/dom",
27 "dojo/domReady!"
28 ], function(declare, parser, query, GanttChart, GanttProjectItem, GanttTaskItem, dom){
29 var projectDev = new GanttProjectItem({
30 id: 1,
31 name: "Development Project",
32 startDate: new Date(2012, 10, 11)
33 });
34
35 var taskRequirement = new GanttTaskItem({
36 id: 1,
37 name: "Requirement",
38 startTime: new Date(2012, 10, 11),
39 duration: 50,
40 percentage: 50,
41 taskOwner: "Jack"
42 });
43 var taskAnalysis = new GanttTaskItem({
44 id: 2,
45 name: "Analysis",
46 startTime: new Date(2012, 10, 18),
47 duration: 40,
48 percentage: 80,
49 previousTaskId: "1",
50 taskOwner: "Michael"
51 });
52 var taskDesign = new GanttTaskItem({
53 id: 3,
54 name: "Design",
55 startTime: new Date(2012, 10, 18),
56 duration: 60,
57 percentage: 80,
58 previousTaskId: "1",
59 taskOwner: "Jason"
60 });
61 var taskDetailDesign = new GanttTaskItem({
62 id: 4,
63 name: "Detail design",
64 startTime: new Date(2012, 10, 18),
65 duration: 30,
66 percentage: 50,
67 previousTaskId: "1",
68 taskOwner: "Michael"
69 });
70 var taskDevelopmentDoc = new GanttTaskItem({
71 id: 5,
72 name: "Development doc",
73 startTime: new Date(2012, 10, 20),
74 duration: 20,
75 percentage: 10,
76 previousTaskId: "1",
77 taskOwner: "Rock;Jack"
78 });
79
80 projectDev.addTask(taskRequirement);
81 projectDev.addTask(taskAnalysis);
82 projectDev.addTask(taskDesign);
83 projectDev.addTask(taskDetailDesign);
84 projectDev.addTask(taskDevelopmentDoc);
85
86 var taskSketch = new GanttTaskItem({
87 id: 6,
88 name: "Sketch",
89 startTime: new Date(2012, 11, 1),
90 duration: 20,
91 percentage: 50,
92 previousTaskId: "3",
93 taskOwner: "Rock"
94 });
95 var taskPrototype = new GanttTaskItem({
96 id: 7,
97 name: "Prototype",
98 startTime: new Date(2012, 11, 6),
99 duration: 60,
100 percentage: 80,
101 previousTaskId: "6",
102 taskOwner: "Rock"
103 });
104 var taskImplementation = new GanttTaskItem({
105 id: 8,
106 name: "Implementation",
107 startTime: new Date(2012, 11, 6),
108 duration: 30,
109 percentage: 80,
110 previousTaskId: "6",
111 taskOwner: "Jason"
112 });
113 var taskDetailImplement = new GanttTaskItem({
114 id: 9,
115 name: "Detail Implement",
116 startTime: new Date(2012, 11, 17),
117 duration: 120,
118 percentage: 50,
119 previousTaskId: "7",
120 taskOwner: "Jason"
121 });
122 var taskDeliver = new GanttTaskItem({
123 id: 10,
124 name: "Deliver",
125 startTime: new Date(2012, 11, 18),
126 duration: 100,
127 percentage: 30,
128 previousTaskId: "8",
129 taskOwner: "Michael;Jason"
130 });
131
132 projectDev.addTask(taskSketch);
133 projectDev.addTask(taskPrototype);
134 projectDev.addTask(taskImplementation);
135 projectDev.addTask(taskDetailImplement);
136 projectDev.addTask(taskDeliver);
137
138 // Create Gantt control
139 var ganttChart = new GanttChart({
140 //readOnly: true, //optional: gantt chart editable
141 //dataFilePath: "gnt.json", //optional: json data file path for load and save, default is "gantt_default.json"
142 //withTaskId: false, //optional: if true, task id will be on the right of task name, default value is !readOnly.
143 //animation: false, //optional: whether you need animation when changing granularity of time line
144 height: 400, //optional: chart height in pixel, default is 400px
145 width: 1200, //optional: chart width in pixel, default is 600px
146 withResource: true //optional: with the resource chart or not
147 }, "gantt"); //"gantt" is the node container id of gantt chart widget
148
149 // Add project data to gantt chart widget
150 ganttChart.addProject(projectDev);
151
152 // Initialize and Render
153 ganttChart.init();
154 });
155 </script>
156 </head>
157 <body class= "claro" >
158 <div class= "ganttContent" >
159 <div id = "gantt" >
160 </div>
161 </div>
162 </body>
163 </html>