mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-08 02:38:09 +00:00
Correctly order account names.
This commit is contained in:
@@ -11,6 +11,8 @@ if (typeof(google) != 'undefined') {
|
||||
|
||||
$(function () {
|
||||
$('.openModal').on('click', openModal);
|
||||
includeSharedToggle();
|
||||
$('#includeShared').click(includeSharedSet);
|
||||
});
|
||||
|
||||
function openModal(e) {
|
||||
@@ -25,5 +27,34 @@ function openModal(e) {
|
||||
alert('Could not load data.');
|
||||
});
|
||||
|
||||
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