mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 09:52:20 +00:00
Code for #384
This commit is contained in:
16
public/js/ff/reports/index.js
vendored
16
public/js/ff/reports/index.js
vendored
@@ -124,10 +124,22 @@ function setOptionalFromCookies() {
|
||||
if ((readCookie('report-tags') !== null)) {
|
||||
arr = readCookie('report-tags').split(',');
|
||||
arr.forEach(function (val) {
|
||||
$('#inputBudgets').find('option[value="' + val + '"]').prop('selected', true);
|
||||
$('#inputTags').find('option[value="' + val + '"]').prop('selected', true);
|
||||
});
|
||||
}
|
||||
$('#inputTags').multiselect(defaultMultiSelect);
|
||||
|
||||
// and expense/revenue thing
|
||||
if ((readCookie('report-exp-rev') !== null)) {
|
||||
arr = readCookie('report-exp-rev').split(',');
|
||||
arr.forEach(function (val) {
|
||||
$('#inputExpRevAccounts').find('option[value="' + val + '"]').prop('selected', true);
|
||||
});
|
||||
}
|
||||
$('#inputExpRevAccounts').multiselect(defaultMultiSelect);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function catchSubmit() {
|
||||
@@ -140,6 +152,7 @@ function catchSubmit() {
|
||||
var categories = $('#inputCategories').val();
|
||||
var budgets = $('#inputBudgets').val();
|
||||
var tags = $('#inputTags').val();
|
||||
var expRev = $('#inputExpRevAccounts').val();
|
||||
|
||||
// remember all
|
||||
// set cookie to remember choices.
|
||||
@@ -148,6 +161,7 @@ function catchSubmit() {
|
||||
createCookie('report-categories', categories, 365);
|
||||
createCookie('report-budgets', budgets, 365);
|
||||
createCookie('report-tags', tags, 365);
|
||||
createCookie('report-exp-rev', expRev , 365);
|
||||
createCookie('report-start', moment(picker.startDate).format("YYYYMMDD"), 365);
|
||||
createCookie('report-end', moment(picker.endDate).format("YYYYMMDD"), 365);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user