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 @@

Status details

{{entry.finished_at}}
{{ entry.message }}
-
+
diff --git a/src/frontend_celery/webapp/user/user_routes.py b/src/frontend_celery/webapp/user/user_routes.py index 6e9b4a88..d6446cf6 100644 --- a/src/frontend_celery/webapp/user/user_routes.py +++ b/src/frontend_celery/webapp/user/user_routes.py @@ -374,8 +374,9 @@ def variant_import_summary(import_queue_id): tasks.retry_variant_import(import_variant_queue_id, session['user']['user_id'], session['user']['roles'], conn) vid = conn.get_vid_from_import_variant_queue(import_variant_queue_id) flash("Successfully requested reimport of vid " + str(vid) + ". It is processed in the background. If this page does not show a pending variant refresh to view changes.", "alert-success") - return redirect(url_for('user.variant_import_summary', import_queue_id = import_queue_id)) + return redirect(url_for('user.variant_import_summary', import_queue_id = import_queue_id, **request.args)) + print(request.args) static_information = get_static_vis_information(conn) imported_variants, total, page, page_size = get_vis_page(request.args, import_queue_id, static_information, conn) pagination = Pagination(page=page, per_page=page_size, total=total, css_framework='bootstrap5')