mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Ajax some report parts.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* globals google, startDate ,reportURL, endDate , reportType ,accountIds, lineChart, categoryReportUrl, balanceReportUrl */
|
||||
/* globals google, budgetReportUrl, startDate ,reportURL, endDate , reportType ,accountIds, lineChart, categoryReportUrl, balanceReportUrl */
|
||||
|
||||
|
||||
$(function () {
|
||||
@@ -7,6 +7,7 @@ $(function () {
|
||||
|
||||
loadCategoryReport();
|
||||
loadBalanceReport();
|
||||
loadBudgetReport();
|
||||
});
|
||||
|
||||
function loadCategoryReport() {
|
||||
@@ -15,12 +16,26 @@ function loadCategoryReport() {
|
||||
$.get(categoryReportUrl).done(placeCategoryReport).fail(failCategoryReport);
|
||||
}
|
||||
|
||||
function loadBudgetReport() {
|
||||
"use strict";
|
||||
console.log('Going to grab ' + budgetReportUrl);
|
||||
$.get(budgetReportUrl).done(placeBudgetReport).fail(failBudgetReport);
|
||||
}
|
||||
|
||||
|
||||
function loadBalanceReport() {
|
||||
"use strict";
|
||||
console.log('Going to grab ' + categoryReportUrl);
|
||||
$.get(balanceReportUrl).done(placeBalanceReport).fail(failBalanceReport);
|
||||
}
|
||||
|
||||
function placeBudgetReport(data) {
|
||||
"use strict";
|
||||
$('#budgetReport').removeClass('loading').html(data);
|
||||
listLengthInitial();
|
||||
triggerInfoClick();
|
||||
}
|
||||
|
||||
function placeBalanceReport(data) {
|
||||
"use strict";
|
||||
$('#balanceReport').removeClass('loading').html(data);
|
||||
@@ -35,6 +50,12 @@ function placeCategoryReport(data) {
|
||||
triggerInfoClick();
|
||||
}
|
||||
|
||||
function failBudgetReport() {
|
||||
"use strict";
|
||||
console.log('Fail budget report data!');
|
||||
$('#budgetReport').removeClass('loading').addClass('general-chart-error');
|
||||
}
|
||||
|
||||
function failBalanceReport() {
|
||||
"use strict";
|
||||
console.log('Fail balance report data!');
|
||||
|
||||
Reference in New Issue
Block a user