aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorAlexander_Kabui2024-09-05 17:20:06 +0300
committerAlexander_Kabui2024-09-05 17:20:06 +0300
commit792eed044e95c389f888ada46954ca6cac342321 (patch)
tree06f3b55942373478f84cc818eda07a5a3776992d /gn2
parent93f91be029e62fbd96ca71f0cfc8792f564f899a (diff)
downloadgenenetwork2-792eed044e95c389f888ada46954ca6cac342321.tar.gz
Fetch updated records after deleting search history.
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/templates/gnqa_search_history.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/gn2/wqflask/templates/gnqa_search_history.html b/gn2/wqflask/templates/gnqa_search_history.html
index 2019cb3b..8d54ad80 100644
--- a/gn2/wqflask/templates/gnqa_search_history.html
+++ b/gn2/wqflask/templates/gnqa_search_history.html
@@ -54,7 +54,13 @@
</section>
<script>
htmx.on("#delete-btn", "click", function(evt){
- htmx.ajax("DELETE","/gnqna/records", {target: "#search-hist","swap" :"outerHTML",
+ htmx.ajax("DELETE","/gnqna/records", {target: "#search-hist", swap :"none",
+ handler: (target,obj) =>{
+ htmx.ajax("GET", "gnqna/records", {
+ target: "#search-hist",
+ swap: "innerHTML"
+ })
+ },
values: Array.from(htmx.findAll("input[type=checkbox]:checked"), e => e.value)})
})
</script>