2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Use localStorage rather than sessionStorage for storing user prefs

- Also create some helper functions
This commit is contained in:
Oliver Walters
2019-09-19 23:29:03 +10:00
parent cf2abb4130
commit 3c98cd87a7
3 changed files with 49 additions and 6 deletions

View File

@ -55,16 +55,16 @@
{% block js_ready %}
{{ block.super }}
if (sessionStorage.getItem("inventree-show-part-locations")) {
if (inventreeLoadInt("show-part-locs") == 1) {
$("#collapse-item-locations").collapse('show');
}
$("#collapse-item-locations").on('shown.bs.collapse', function() {
sessionStorage.setItem('inventree-show-part-locations', 1);
inventreeSave('show-part-locs', 1);
});
$("#collapse-item-locations").on('hidden.bs.collapse', function() {
sessionStorage.removeItem('inventree-show-part-locations');
inventreeDel('show-part-locs');
});
$("#stock-export").click(function() {