-
Notifications
You must be signed in to change notification settings - Fork 0
/
c6.tpl
177 lines (148 loc) · 4.34 KB
/
c6.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html>
<head>
<title>Chapter 6</title>
<style type="text/css">
html, body, #wrapper {
width: 100%;
height: 100%;
margin: 0px;
}
.chart {
font-size:22px;
font-family:"Times New Roman";
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.bar {
fill: #000000;
}
.bar0 {
fill: #CC0000;
}
.bar1 {
fill: #669900;
}
.bar2 {
fill: #33b5e5;
}
.bar3 {
fill: #ffbb33;
}
.barx0 {
fill: #CD5252;
}
.barx1 {
fill: #7B9A3D;
}
.barx2 {
fill: #8ACEE6;
}
.barx3 {
fill: #FFD785;
}
/*
Pretty Table Styling
CSS Tricks also has a nice writeup: http://css-tricks.com/feature-table-design/
*/
table {
overflow:hidden;
border:1px solid #d3d3d3;
background:#fefefe;
width:70%;
margin:5% auto 0;
-moz-border-radius:5px; /* FF1+ */
-webkit-border-radius:5px; /* Saf3-4 */
border-radius:5px;
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
font-size:22px;
font-family:"Times New Roman";
}
th, td {padding:18px 28px 18px; text-align:center; }
th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}
td {border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;}
tr.odd-row td {background:#f6f6f6;}
td.first, th.first {text-align:left}
td.last {border-right:none;}
td {
background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);
background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));
}
tr.odd-row td {
background: -moz-linear-gradient(100% 25% 90deg, #f6f6f6, #f1f1f1);
background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f1f1f1), to(#f6f6f6));
}
th {
background: -moz-linear-gradient(100% 20% 90deg, #e8eaeb, #ededed);
background: -webkit-gradient(linear, 0% 0%, 0% 20%, from(#ededed), to(#e8eaeb));
}
tr:first-child th.first {
-moz-border-radius-topleft:5px;
-webkit-border-top-left-radius:5px; /* Saf3-4 */
}
tr:first-child th.last {
-moz-border-radius-topright:5px;
-webkit-border-top-right-radius:5px; /* Saf3-4 */
}
tr:last-child td.first {
-moz-border-radius-bottomleft:5px;
-webkit-border-bottom-left-radius:5px; /* Saf3-4 */
}
tr:last-child td.last {
-moz-border-radius-bottomright:5px;
-webkit-border-bottom-right-radius:5px; /* Saf3-4 */
}
</style>
</head>
<body>
<div id="content">
<table cellspacing="0">
<tr><th>Operation ID</th><th>Class A</th><th>Type A</th><th>Class B</th><th>Type B</th><th>TA</th></tr>
{{INSERT_TBL1}}
</table>
<table cellspacing="0">
<tr><th>Operation ID</th><th>Object A</th><th>Type A</th><th>Object B</th><th>Type B</th><th>TA</th></tr>
{{INSERT_TBL2}}
</table>
</div>
<div id="gantt">
<script src="http://cdn.bootcss.com/d3/3.5.12/d3.min.js"></script>
<!-- <script src="http://d3js.org/d3.v3.min.js"></script> -->
<script src="http://static.mentful.com/gantt-chart-d3v2.js"></script>
<script>
{{INSERT_JS_DATA}}
tasks.sort(function(a, b) {
return a.endDate - b.endDate;
});
var maxDate = tasks[tasks.length - 1].endDate;
tasks.sort(function(a, b) {
return a.startDate - b.startDate;
});
var minDate = tasks[0].startDate;
var format = "%H:%M";
var gantt = d3.gantt().taskTypes(taskNames).taskStatus(taskStatus).tickFormat(format);
gantt(tasks);
/* Pretty Table Styling*/
$(function() {
/* For zebra striping */
$("table tr:nth-child(odd)").addClass("odd-row");
/* For cell text alignment */
$("table td:first-child, table th:first-child").addClass("first");
/* For removing the last border */
$("table td:last-child, table th:last-child").addClass("last");
});
</script>
</div>
<div id="content">
<table cellspacing="0">
<tr><th>Op. ID</th><th>Obj. Name</th><th>Innate Skill</th><th>Arg.</th><th>Start Time</th><th>End Time</th><th>Task Type</th></tr>
{{INSERT_TBL3}}
</table>
</div>
</body>
</html>