diff options
Diffstat (limited to 'gn2/wqflask/templates/gnqa_search_history.html')
-rw-r--r-- | gn2/wqflask/templates/gnqa_search_history.html | 25 |
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 %} |