diff --git a/application/views/accumulate/index.php b/application/views/accumulate/index.php
index 0ced9a2b8..a7653307c 100644
--- a/application/views/accumulate/index.php
+++ b/application/views/accumulate/index.php
@@ -8,6 +8,7 @@
var lang_general_word_yearly = '= __("Yearly"); ?>';
var lang_general_word_month = '= __("Month"); ?>';
var lang_general_word_monthly = '= __("Monthly"); ?>';
+ var lang_general_word_diff = '= __("Difference"); ?>';
diff --git a/assets/js/sections/accumulatedstatistics.js b/assets/js/sections/accumulatedstatistics.js
index 765057d1d..9346b4b7a 100644
--- a/assets/js/sections/accumulatedstatistics.js
+++ b/assets/js/sections/accumulatedstatistics.js
@@ -65,13 +65,16 @@ function accumulatePlot(form) {
$("#accumulateTable").append(
'
' +
"" +
- "| # | " +
- "" +
+ " | # | " +
+ "" +
periodtext +
- "" +
- " | " +
+ "" +
+ " | " +
awardtext +
- "" +
+ " | " +
+ "" +
+ lang_general_word_diff +
+ " | " +
"
" +
"" +
"
"
@@ -81,6 +84,7 @@ function accumulatePlot(form) {
var $myTable = $(".accutable");
var i = 1;
+ var last_total = 0;
// building the rows in the table
var rowElements = data.map(function (row) {
@@ -89,8 +93,11 @@ function accumulatePlot(form) {
var $iterator = $("
| ").html(i++);
var $type = $("
| ").html(row.year);
var $content = $("
| ").html(row.total);
+ diff = row.total - last_total;
+ var $diff = $("
| ").html((last_total == 0 || diff == 0) ? '' : "+"+diff);
+ last_total = row.total;
- $row.append($iterator, $type, $content);
+ $row.append($iterator, $type, $content, $diff);
return $row;
});
@@ -156,11 +163,11 @@ function accumulatePlot(form) {
$(".ld-ext-right").prop("disabled", false);
$(".accutable").DataTable({
responsive: false,
- ordering: false,
scrollY: "400px",
scrollCollapse: true,
paging: false,
scrollX: true,
+ sortable: true,
language: {
url: getDataTablesLanguageUrl(),
},