From 7a336bff3797e3c11fb83e3f72ddb688bbd12600 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 8 Sep 2021 23:53:15 +0200 Subject: [PATCH] fdfd --- files/templates/comments.html | 39 ++++++++++++++--------------------- files/templates/default.html | 21 +++++++++++++++++++ 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index efa6da2b49..c5af4078c4 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -431,10 +431,11 @@
  • Votes
  • - {% if v and c.id in v.saved_comment_idlist() %} -
  • Unsave
  • - {% else %} -
  • Save
  • + {% if v %} +
  • Save
  • + +
  • Unsave
  • + {% endif %}
  • Copy link
  • @@ -444,21 +445,16 @@
  • Report
  • {% if v and c.parent_submission and c.author_id==v.id %} -
  • Edit
  • +
  • Edit
  • +
  • Delete
  • - {% if c.deleted_utc > 0 %} -
  • Undelete
  • - {% else %} -
  • Delete
  • +
  • Undelete
  • {% endif %} - - {% endif %} - {% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) and c.level == 1 %} -
  • {{'Unpin' if c.is_pinned else 'Pin'}} -
  • +
  • Pin
  • +
  • Unpin
  • {% endif %} {% if v %} @@ -474,23 +470,20 @@ {% endif %} {% if not v.id==c.author_id and v.admin_level == 0 %} -
  • - Block user -
  • +
  • Block user
  • +
  • Unblock user
  • {% endif %} {% endif %} {% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %} -
  • Toggle +18
  • +
  • Mark +18
  • +
  • Unmark +18
  • {% endif %} {% if v and (c.post and v.admin_level == 6) %} {% if c.author_id != v.id %} - {% if c.author.is_suspended %} -
  • Unban user
  • - {% else %} -
  • Ban user
  • - {% endif %} +
  • Ban user
  • +
  • Unban user
  • {% endif %} {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 0de80c2fdd..0848835ec5 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -291,6 +291,27 @@ }; + function delete_commentModal2(id,button1,button2) { + + // Passed data for modal + + document.getElementById("deleteCommentButton").onclick = function() { + + this.innerHTML='Deleting comment'; + this.disabled = true; + post('/delete/comment/' + id, + callback = function() { + + location.reload(); + } + ) + } + + document.getElementById(button1).classList.toggle("d-none"); + document.getElementById(button2).classList.toggle("d-none"); + + }; + //flagging // Flag Comment