mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 08:00:19 +00:00
Some more cleaning up and fixing
This commit is contained in:
@@ -5,16 +5,14 @@ if (typeof(google) != 'undefined') {
|
||||
|
||||
|
||||
function drawChart() {
|
||||
googleColumnChart('chart/reports/income-expenses/' + year, 'income-expenses-chart');
|
||||
googleColumnChart('chart/reports/income-expenses-sum/' + year, 'income-expenses-sum-chart')
|
||||
googleColumnChart('chart/reports/income-expenses/' + year + shared, 'income-expenses-chart');
|
||||
googleColumnChart('chart/reports/income-expenses-sum/' + year + shared, 'income-expenses-sum-chart')
|
||||
|
||||
googleStackedColumnChart('chart/budgets/spending/' + year, 'budgets');
|
||||
googleStackedColumnChart('chart/budgets/spending/' + year + shared, 'budgets');
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('.openModal').on('click', openModal);
|
||||
includeSharedToggle();
|
||||
$('#includeShared').click(includeSharedSet);
|
||||
});
|
||||
|
||||
function openModal(e) {
|
||||
@@ -31,32 +29,3 @@ function openModal(e) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function includeSharedToggle() {
|
||||
// get setting from JSON.
|
||||
$.getJSON('json/show-shared-reports').success(function (data) {
|
||||
console.log('GO');
|
||||
if (data.value == true) {
|
||||
// show shared data, update button:
|
||||
//<i class="state-icon glyphicon glyphicon-check"></i>
|
||||
$('#includeShared').empty().addClass('btn-info').append($('<i>').addClass('state-icon glyphicon glyphicon-check')).append(' Include shared asset accounts').show();
|
||||
console.log('true');
|
||||
} else {
|
||||
$('#includeShared').empty().removeClass('btn-info').append($('<i>').addClass('state-icon glyphicon glyphicon-unchecked')).append(' Include shared asset accounts').show();
|
||||
console.log('false');
|
||||
}
|
||||
}).fail(function () {
|
||||
console.log('fail');
|
||||
});
|
||||
}
|
||||
|
||||
function includeSharedSet() {
|
||||
// get setting from JSON.
|
||||
$.getJSON('json/show-shared-reports/set').success(function (data) {
|
||||
console.log('Value is now: ' + data.value);
|
||||
includeSharedToggle();
|
||||
}).fail(function () {
|
||||
console.log('fail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user