diff --git a/src/frontend_celery/webapp/static/js/variant_import_summary.js b/src/frontend_celery/webapp/static/js/variant_import_summary.js index 9215d98f..97608bec 100644 --- a/src/frontend_celery/webapp/static/js/variant_import_summary.js +++ b/src/frontend_celery/webapp/static/js/variant_import_summary.js @@ -226,3 +226,23 @@ function create_trow(tds) { } +// save state of collapse in cookie such that it stays open if the user reloads the page (eg. upon search) +document.getElementById("advanced_search").addEventListener("show.bs.collapse", function(e) { + var active = 'advanced_search'; + localStorage.setItem('expandedSearchOptions', active); +}); + +document.getElementById("advanced_search").addEventListener("hide.bs.collapse", function(e) { + localStorage.removeItem('expandedSearchOptions'); +}); + +var last = localStorage.getItem('expandedSearchOptions'); +if (last != null) { + //remove default collapse settings + document.getElementById("advanced_search").classList.add('show'); + //show collapse + document.getElementById(last).classList.add('show'); +} + + + diff --git a/src/frontend_celery/webapp/templates/user/variant_import_summary.html b/src/frontend_celery/webapp/templates/user/variant_import_summary.html index 512559a2..716e74e6 100644 --- a/src/frontend_celery/webapp/templates/user/variant_import_summary.html +++ b/src/frontend_celery/webapp/templates/user/variant_import_summary.html @@ -193,7 +193,7 @@