mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 08:30:06 +00:00
Clean up some report code.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* globals google, accountIds, budgetYearOverviewUrl */
|
||||
/* globals google, accountIds, budgetYearOverviewUri */
|
||||
|
||||
var chartDrawn;
|
||||
var budgetChart;
|
||||
@@ -7,30 +7,9 @@ $(function () {
|
||||
chartDrawn = false;
|
||||
drawChart();
|
||||
|
||||
//
|
||||
loadBudgetOverview();
|
||||
loadAjaxPartial('budgetOverview',budgetYearOverviewUri);
|
||||
});
|
||||
|
||||
function loadBudgetOverview() {
|
||||
"use strict";
|
||||
console.log('Going to grab ' + budgetYearOverviewUrl);
|
||||
$.get(budgetYearOverviewUrl).done(placeBudgetOverview).fail(failBudgetOverview);
|
||||
}
|
||||
|
||||
function placeBudgetOverview(data) {
|
||||
"use strict";
|
||||
$('#budgetOverview').removeClass('loading').html(data);
|
||||
$('.budget-chart-activate').on('click', clickBudgetChart);
|
||||
}
|
||||
|
||||
function failBudgetOverview() {
|
||||
"use strict";
|
||||
console.log('Fail budget overview data!');
|
||||
$('#budgetOverview').removeClass('loading').addClass('general-chart-error');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function drawChart() {
|
||||
"use strict";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user