UI enhancements in cores report

Total column is moved to the left and highlighted

Change-Id: I388bcfdd1f59187734dc42bb155a6fd7a5d377cf
This commit is contained in:
Ilya Shakhat
2014-07-24 12:49:21 +04:00
parent be0b33979f
commit 1e9721b072

View File

@@ -64,14 +64,13 @@ Cores
var head_row = $('<tr></tr>');
table_head.append(head_row);
head_row.append($("<th>Company</th>"));
head_row.append($("<th>Total</th>"));
for (i in module_list) {
module = module_list[i];
head_row.append($("<th>" + module + "<a href='/report/contribution/" + module + "/30' target='_blank'>&nbsp;</a></th>"));
}
head_row.append($("<th>Total</th>"));
var module_sum = {};
for (company_name in counters) {
@@ -79,6 +78,9 @@ Cores
table_body.append(row);
row.append($("<td>" + company_name + "</td>"));
var sum_cell = $("<td class='total'></td>");
row.append(sum_cell);
company_stat = counters[company_name];
var sum = 0;
@@ -104,7 +106,7 @@ Cores
}
}
row.append($("<td>" + sum + "</td>"));
sum_cell.html(sum);
}
var table_foot = $("<tfoot></tfoot>");
@@ -112,14 +114,16 @@ Cores
var footer_row = $("<tr></tr>");
table_foot.append(footer_row);
footer_row.append($("<td>Total</th>"));
sum_cell = $("<td class='total'></td>");
footer_row.append(sum_cell);
sum = 0;
for (i in module_list) {
module = module_list[i];
footer_row.append($("<td>" + module_sum[module] + "</td>"));
footer_row.append($("<td class='total'>" + module_sum[module] + "</td>"));
sum += module_sum[module];
}
footer_row.append($("<td>" + sum + "</td>"));
sum_cell.html(sum);
$("#table_container").append(table);
$("#table_container_loading").hide();
@@ -169,6 +173,10 @@ Cores
.nonzero {
color: #000000;
}
.total, table.dataTable tfoot td.total {
color: #a92703;
}
</style>
{% endblock %}