aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/gnqa_answer.html
diff options
context:
space:
mode:
authorAlexander_Kabui2024-09-02 12:50:46 +0300
committerAlexander_Kabui2024-09-02 12:50:46 +0300
commitf3843170bb0fe4cca17b529be61fc6ae438acfb6 (patch)
tree17be16071e13f92c535429d7eb664c605d2494b8 /gn2/wqflask/templates/gnqa_answer.html
parentd82f8b31abb0e33c8d01f8906fd6a24d3b268de7 (diff)
downloadgenenetwork2-f3843170bb0fe4cca17b529be61fc6ae438acfb6.tar.gz
Span parameters across multiple lines for to improve readabity.
Diffstat (limited to 'gn2/wqflask/templates/gnqa_answer.html')
-rw-r--r--gn2/wqflask/templates/gnqa_answer.html13
1 files changed, 11 insertions, 2 deletions
diff --git a/gn2/wqflask/templates/gnqa_answer.html b/gn2/wqflask/templates/gnqa_answer.html
index 6d976382..7a637b20 100644
--- a/gn2/wqflask/templates/gnqa_answer.html
+++ b/gn2/wqflask/templates/gnqa_answer.html
@@ -174,9 +174,18 @@ var answer = {{ answer|tojson }}
var {task_id} = {{ task_id|tojson }}
htmx.on("#upvote", "click", function(evt){
vote_count = htmx.find(".btn-success") ? 0 : 1
- htmx.ajax("POST", `/gnqna/rating/${task_id}/${vote_count}`, {target: "#rate", handler: (target,obj)=> updateRatingHandler(target, obj, "upvote"), swap:"innerHTML",values: {'query': query, 'answer': answer}})});
+ htmx.ajax("POST",
+ `/gnqna/rating/${task_id}/${vote_count}`,
+ {target: "#rate",
+ handler: (target,obj)=> updateRatingHandler(target, obj, "upvote"),
+ swap:"innerHTML",
+ values: {'query': query, 'answer': answer}})});
htmx.on("#downvote", "click", function(evt){
vote_count = htmx.find(".btn-danger") ? 0 : -1
- htmx.ajax("POST", `/gnqna/rating/${task_id}/${vote_count}`, {target: "#rate",handler: (target,obj)=> updateRatingHandler(target,obj, "downvote") , swap:"innerHTML",values: {'query': query, 'answer': answer}})});
+ htmx.ajax("POST", `/gnqna/rating/${task_id}/${vote_count}`,
+ {target: "#rate",
+ handler: (target, obj)=> updateRatingHandler(target,obj, "downvote"),
+ swap:"innerHTML",
+ values: {'query': query, 'answer': answer}})});
</script>
{% endblock %}