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 @@