mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-07 06:33:57 -06:00
22 lines
654 B
JavaScript
22 lines
654 B
JavaScript
$(function () {
|
|
$('.addMoney').on('click', addMoney);
|
|
$('.removeMoney').on('click', removeMoney);
|
|
|
|
if (typeof(googleLineChart) == 'function' && typeof(piggyBankID) != 'undefined') {
|
|
googleLineChart('chart/piggyhistory/' + piggyBankID, 'piggybank-history');
|
|
}
|
|
});
|
|
|
|
function addMoney(e) {
|
|
var pigID = parseInt($(e.target).data('id'));
|
|
$('#moneyManagementModal').empty().load('piggybanks/add/' + pigID).modal('show');
|
|
|
|
return false;
|
|
}
|
|
|
|
function removeMoney(e) {
|
|
var pigID = parseInt($(e.target).data('id'));
|
|
$('#moneyManagementModal').empty().load('piggybanks/remove/' + pigID).modal('show');
|
|
|
|
return false;
|
|
} |