From abc923ade42cee9975d68310ed1c1e444bb8d543 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 3 Aug 2024 12:57:55 +0200 Subject: [PATCH] Fix for back function on simple search --- cps/static/js/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cps/static/js/main.js b/cps/static/js/main.js index 6b183b07..fc18890c 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -160,15 +160,18 @@ $(document).ready(function() { $(".session").click(function() { window.sessionStorage.setItem("back", window.location.pathname); + window.sessionStorage.setItem("search", window.location.search); }); $("#back").click(function() { var loc = sessionStorage.getItem("back"); + var param = sessionStorage.getItem("search"); if (!loc) { loc = $(this).data("back"); } sessionStorage.removeItem("back"); - window.location.href = loc; + sessionStorage.removeItem("search"); + window.location.href = loc + param; });