mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Code for #385
This commit is contained in:
@@ -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") {
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user