Various code cleanup.

This commit is contained in:
James Cole
2017-10-29 20:02:34 +01:00
parent 5df16f58ce
commit 654b9d2022
4 changed files with 26 additions and 39 deletions

22
public/js/ff/index.js vendored
View File

@@ -102,26 +102,4 @@ function getBalanceBox() {
$('#box-balance-in').html(data.income);
$('#box-balance-out').html(data.expense);
});
}
function getBoxAmounts() {
"use strict";
var boxes = ['in', 'out', 'bills-unpaid', 'bills-paid'];
for (var x in boxes) {
if (!boxes.hasOwnProperty(x)) {
continue;
}
var box = boxes[x];
$.getJSON('json/box/' + box).done(putData).fail(failData);
}
}
function putData(data) {
"use strict";
$('#box-' + data.box).html(data.amount);
}
function failData() {
"use strict";
}