mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Fix another JS error
This commit is contained in:
@@ -17,29 +17,30 @@ $(function () {
|
|||||||
drops: 'up',
|
drops: 'up',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// set values from cookies, if any:
|
|
||||||
if (readCookie('report-type') !== null) {
|
|
||||||
$('select[name="report_type"]').val(readCookie('report-type'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((readCookie('report-accounts') !== null)) {
|
// set values from cookies, if any:
|
||||||
var arr = readCookie('report-accounts').split(',');
|
if (readCookie('report-type') !== null) {
|
||||||
arr.forEach(function (val) {
|
$('select[name="report_type"]').val(readCookie('report-type'));
|
||||||
$('input[type="checkbox"][value="' + val + '"]').prop('checked', true);
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// set date:
|
if ((readCookie('report-accounts') !== null)) {
|
||||||
var startStr = readCookie('report-start');
|
var arr = readCookie('report-accounts').split(',');
|
||||||
var endStr = readCookie('report-end');
|
arr.forEach(function (val) {
|
||||||
if (startStr !== null && endStr !== null && startStr.length == 8 && endStr.length == 8) {
|
$('input[type="checkbox"][value="' + val + '"]').prop('checked', true);
|
||||||
var startDate = moment(startStr, "YYYYMMDD");
|
});
|
||||||
var endDate = moment(endStr, "YYYYMMDD");
|
}
|
||||||
var datePicker = $('#inputDateRange').data('daterangepicker');
|
|
||||||
datePicker.setStartDate(startDate);
|
// set date:
|
||||||
datePicker.setEndDate(endDate);
|
var startStr = readCookie('report-start');
|
||||||
|
var endStr = readCookie('report-end');
|
||||||
|
if (startStr !== null && endStr !== null && startStr.length == 8 && endStr.length == 8) {
|
||||||
|
var startDate = moment(startStr, "YYYYMMDD");
|
||||||
|
var endDate = moment(endStr, "YYYYMMDD");
|
||||||
|
var datePicker = $('#inputDateRange').data('daterangepicker');
|
||||||
|
datePicker.setStartDate(startDate);
|
||||||
|
datePicker.setEndDate(endDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.openModal').on('click', openModal);
|
$('.openModal').on('click', openModal);
|
||||||
@@ -49,6 +50,7 @@ $(function () {
|
|||||||
$('#report-form').on('submit', catchSubmit);
|
$('#report-form').on('submit', catchSubmit);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// click open the top X income list:
|
// click open the top X income list:
|
||||||
$('#showIncomes').click(showIncomes);
|
$('#showIncomes').click(showIncomes);
|
||||||
// click open the top X expense list:
|
// click open the top X expense list:
|
||||||
|
Reference in New Issue
Block a user