From 0f84e6033ef6db7fc1b2cd9187b7674c7917a10e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 18 Apr 2022 19:20:10 +0200 Subject: [PATCH] fds --- files/assets/js/award_modal.js | 9 ++++----- files/templates/award_modal.html | 5 +++-- files/templates/comments.html | 12 +++++------- files/templates/header.html | 4 ++-- files/templates/post_actions.html | 2 +- files/templates/post_actions_mobile.html | 2 +- files/templates/submission.html | 9 ++++----- files/templates/submission_listing.html | 8 +++----- 8 files changed, 23 insertions(+), 28 deletions(-) diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index 618ba7056..f8255ca05 100644 --- a/files/assets/js/award_modal.js +++ b/files/assets/js/award_modal.js @@ -1,3 +1,7 @@ +document.getElementById('awardModal').addEventListener('show.bs.modal', function (event) { + document.getElementById("awardTarget").action = event.relatedTarget.dataset.url; +}); + function vote(type, id, dir, vid) { const upvotes = document.getElementsByClassName(type + '-' + id + '-up'); const downvotes = document.getElementsByClassName(type + '-' + id + '-down'); @@ -84,11 +88,6 @@ function vote(type, id, dir, vid) { xhr.send(form); } -function awardModal(link) { - var target = document.getElementById("awardTarget"); - target.action = link; -} - function pick(kind, canbuy1, canbuy2) { let buy1 = document.getElementById('buy1') if (canbuy1 && kind != "grass") buy1.disabled=false; diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 0df8c7052..15646b2f5 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -1,4 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 3a02b50f6..09f5d086c 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -169,11 +169,9 @@
- {% if c.awards %} - {% for a in c.awards %} - - {% endfor %} - {% endif %} + {% for a in c.awards|reverse %} + + {% endfor %} {% if c.post %} {% set sub = c.post.sub %} @@ -443,7 +441,7 @@ - + @@ -645,7 +643,7 @@ {% if v %} Report - Give Award + Give Award Save diff --git a/files/templates/header.html b/files/templates/header.html index 3cdb0cabc..038f4ee7f 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -45,7 +45,7 @@ {% endif %} -
+