Fixing routes

This commit is contained in:
James Cole
2016-12-06 06:52:17 +01:00
parent 9cb3bfaa57
commit bebfbf0b90
25 changed files with 103 additions and 91 deletions

View File

@@ -6,9 +6,6 @@
* of the MIT license. See the LICENSE file for details.
*/
/* global $, lineChart, dateString, accountID, token, incomeByCategoryUri, expenseByCategoryUri, expenseByBudgetUri */
// Return a helper with preserved width of cells
var fixHelper = function (e, tr) {
"use strict";
@@ -24,11 +21,11 @@ var fixHelper = function (e, tr) {
$(function () {
"use strict";
lineChart('chart/account/' + accountID + '/' + dateString, 'period-specific-account');
lineChart(periodUri, 'period-specific-account');
pieChart(incomeByCategoryUri, 'account-cat-in');
pieChart(expenseByCategoryUri, 'account-cat-out');
pieChart(expenseByBudgetUri, 'account-budget-out');
pieChart(incomeCategoryUri, 'account-cat-in');
pieChart(expenseCategoryUri, 'account-cat-out');
pieChart(expenseBudgetUri, 'account-budget-out');
// sortable!

View File

@@ -15,10 +15,10 @@ var fixHelper = function (e, tr) {
$(function () {
"use strict";
lineChart('chart/account/' + accountID, 'overview-chart');
pieChart(incomeByCategoryUri, 'account-cat-in');
pieChart(expenseByCategoryUri, 'account-cat-out');
pieChart(expenseByBudgetUri, 'account-budget-out');
lineChart(singleUri, 'overview-chart');
pieChart(incomeCategoryUri, 'account-cat-in');
pieChart(expenseCategoryUri, 'account-cat-out');
pieChart(expenseBudgetUri, 'account-budget-out');
// sortable!

View File

@@ -2,8 +2,6 @@
$(function () {
"use strict";
if (typeof(columnChart) === 'function' && typeof(billID) !== 'undefined') {
columnChart('chart/bill/' + billID, 'bill-overview');
}
columnChart(billUri, 'bill-overview');
}
);

View File

@@ -32,14 +32,14 @@ function endTheTour() {
function drawChart() {
"use strict";
lineChart('chart/account/frontpage', 'accounts-chart');
lineChart(accountFrontpageUri, 'accounts-chart');
if (billCount > 0) {
pieChart('chart/bill/frontpage', 'bills-chart');
}
stackedColumnChart('chart/budget/frontpage', 'budgets-chart');
columnChart('chart/category/frontpage', 'categories-chart');
columnChart('chart/account/expense', 'expense-accounts-chart');
columnChart('chart/account/revenue', 'revenue-accounts-chart');
columnChart(accountExpenseUri, 'expense-accounts-chart');
columnChart(accountRevenueUri, 'revenue-accounts-chart');
getBoxAmounts();

View File

@@ -98,7 +98,7 @@ function displayAjaxPartial(data, holder) {
function failAjaxPartial(uri, holder) {
"use strict";
console.log('Failed to load' + uri);
console.log('Failed to load: ' + uri);
$('#' + holder).removeClass('loading').addClass('general-chart-error');
}

View File

@@ -15,5 +15,5 @@ function drawChart() {
// month view:
// draw account chart
lineChart('chart/account/report/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'account-balances-chart');
lineChart(accountChartUri, 'account-balances-chart');
}