Add more stuff to ajax controllers, making report controller simpler.

This commit is contained in:
James Cole
2016-10-26 16:46:43 +02:00
parent 01de147900
commit fe3f015171
9 changed files with 158 additions and 22 deletions

View File

@@ -10,8 +10,7 @@
$(function () {
"use strict";
// find the little info buttons and respond to them.
$('.firefly-info-button').click(clickInfoButton);
// load the account report, which this report shows:
loadAccountReport();
@@ -19,11 +18,20 @@ $(function () {
// load income / expense / difference:
loadInOutReport();
// trigger info click
triggerInfoClick();
// trigger list length things:
listLengthInitial();
});
function triggerInfoClick() {
"use strict";
// find the little info buttons and respond to them.
$('.firefly-info-button').unbind('clicl').click(clickInfoButton);
}
function listLengthInitial() {
"use strict";
$('.overListLength').hide();
@@ -62,6 +70,7 @@ function placeInOutReport(data) {
$('#expenseReport').removeClass('loading').html(data.expenses);
$('#incomeVsExpenseReport').removeClass('loading').html(data.incomes_expenses);
listLengthInitial();
triggerInfoClick();
}
function failInOutReport() {