Clean up code after changing routes.

This commit is contained in:
James Cole
2016-12-06 07:48:41 +01:00
parent 02257e3887
commit d8f291be6e
15 changed files with 138 additions and 92 deletions

View File

@@ -1,19 +1,5 @@
/* globals $, categoryID, columnChart, categoryDate */
$(function () {
"use strict";
if (typeof categoryID !== 'undefined') {
// more splits:
if ($('#all').length > 0) {
columnChart('chart/category/' + categoryID + '/all', 'all');
}
if ($('#period').length > 0) {
columnChart('chart/category/' + categoryID + '/period', 'period');
}
}
if (typeof categoryID !== 'undefined' && typeof categoryDate !== 'undefined') {
columnChart('chart/category/' + categoryID + '/period/' + categoryDate, 'period-specific-period');
}
columnChart(all, 'all');
columnChart(current, 'period');
});