Automatically store and remember the last selected filter item in the calendar page.
This commit is contained in:
parent
bf3f2d7131
commit
0fbc3b906d
1 changed files with 10 additions and 2 deletions
|
@ -319,6 +319,8 @@ App.Utils.CalendarDefaultView = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
$reloadAppointments.trigger('click');
|
$reloadAppointments.trigger('click');
|
||||||
|
|
||||||
|
window.localStorage.setItem('EasyAppointments.SelectFilterItem', $selectFilterItem.val());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1658,6 +1660,12 @@ App.Utils.CalendarDefaultView = (function () {
|
||||||
.prop('selected', true);
|
.prop('selected', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const localSelectFilterItemValue = window.localStorage.getItem('EasyAppointments.SelectFilterItem');
|
||||||
|
|
||||||
|
if (localSelectFilterItemValue && $selectFilterItem.find(`option[value="${localSelectFilterItemValue}"]`).length) {
|
||||||
|
$selectFilterItem.val(localSelectFilterItemValue);
|
||||||
|
}
|
||||||
|
|
||||||
// Add the page event listeners.
|
// Add the page event listeners.
|
||||||
addEventListeners();
|
addEventListeners();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue