aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-24 18:04:25 +0300
committerAlexander_Kabui2024-05-24 18:04:25 +0300
commit066adb63d2a539693a60fd2d120922de324a65ea (patch)
treee5c0e86b4e748fa8e4b0e864a6406e7b46afc73c /gn2/wqflask
parent13a554a9744bc70da9606c0348ec675276147a29 (diff)
downloadgenenetwork2-066adb63d2a539693a60fd2d120922de324a65ea.tar.gz
Add UI code for gnqa history search delete functionality.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r--gn2/wqflask/templates/gnqa_search_history.html25
1 files changed, 21 insertions, 4 deletions
diff --git a/gn2/wqflask/templates/gnqa_search_history.html b/gn2/wqflask/templates/gnqa_search_history.html
index 890a3995..c1e66541 100644
--- a/gn2/wqflask/templates/gnqa_search_history.html
+++ b/gn2/wqflask/templates/gnqa_search_history.html
@@ -11,12 +11,17 @@
</div>
</header>
<div class="container row">
- <div class="panel panel-default col-sm-6 col-sm-offset-3 ">
+ <div>
+ <div class="col-sm-6 col-sm-offset-3" style="margin-bottom:10px">
+ <button type="button" class="btn btn-danger" id="delete-btn">Delete Selected </button>
+ </div>
+ <div>
+ <div class="panel panel-default col-sm-6 col-sm-offset-3 ">
<div>
- <ul class="list-group list-group-flush">
+ <ul class="list-group list-group-flush" style="overflow-y:scroll">
{% for item in prev_queries %}
<li class="row list-group-item">
- <input name="" type="checkbox" value="" class="col-sm-1" style="height: 20px;
+ <input name="" type="checkbox" value="{{item['task_id']}}" class="col-sm-1" style="height: 20px;
width: 20px;">
<div class="col-sm-10">
<button
@@ -38,4 +43,16 @@
</div>
</div>
</div>
- </section>
+</section>
+{% block js %}
+ <script>
+ htmx.on("#delete-btn", "click", function(evt){
+ // todo: complete this for delete /export functionality
+ htmx.ajax("POST", "/gnqna/hist", {target:"",
+ swap:"innerHTML",values:
+ Array.from(htmx.findAll("input[type=checkbox]:checked"), e => e.value);}
+ )
+ })
+</script>
+
+{% endblock %}