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