This commit is contained in:
James Cole
2016-11-20 18:31:29 +01:00
parent c56f937521
commit 8baea2feb9
12 changed files with 433 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
/* global $, lineChart, accountID, token */
/* global $, lineChart, accountID, token, incomeByCategoryUri, expenseByCategoryUri, expenseByBudgetUri */
// Return a helper with preserved width of cells
@@ -15,10 +15,11 @@ var fixHelper = function (e, tr) {
$(function () {
"use strict";
if (typeof(lineChart) === "function" && typeof accountID !== 'undefined') {
lineChart('chart/account/' + accountID, 'overview-chart');
}
pieChart(incomeByCategoryUri, 'account-cat-in');
pieChart(expenseByCategoryUri, 'account-cat-out');
pieChart(expenseByBudgetUri, 'account-budget-out');
// sortable!
if (typeof $(".sortable-table tbody").sortable !== "undefined") {

View File

@@ -6,7 +6,7 @@
* of the MIT license. See the LICENSE file for details.
*/
/* global $, lineChart, dateString, accountID, token */
/* global $, lineChart, dateString, accountID, token, incomeByCategoryUri, expenseByCategoryUri, expenseByBudgetUri */
// Return a helper with preserved width of cells
@@ -23,13 +23,13 @@ var fixHelper = function (e, tr) {
$(function () {
"use strict";
if (typeof(lineChart) === "function" &&
typeof accountID !== 'undefined' &&
typeof dateString !== 'undefined'
) {
lineChart('chart/account/' + accountID + '/' + dateString, 'period-specific-account');
}
lineChart('chart/account/' + accountID + '/' + dateString, 'period-specific-account');
pieChart(incomeByCategoryUri, 'account-cat-in');
pieChart(expenseByCategoryUri, 'account-cat-out');
pieChart(expenseByBudgetUri, 'account-budget-out');
// sortable!
if (typeof $(".sortable-table tbody").sortable !== "undefined") {