From 9c7f9558b1fb27ecb70ab2a0edd0d2198487d13f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 8 Sep 2021 23:16:00 +0200 Subject: [PATCH] fd --- files/templates/comments.html | 4 ++-- files/templates/default.html | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index bc6e1c6e2c..efa6da2b49 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -299,8 +299,8 @@ {% endif %} {% if v and v.admin_level==6 and v.id==c.author_id %} -
  • Undistinguish
  • -
  • Distinguish
  • +
  • Undistinguish
  • +
  • Distinguish
  • {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 0b67bb2fa3..0de80c2fdd 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -168,7 +168,7 @@ } } - admin_comment=function(cid,button1,button2){ + admin_comment=function(cid,button1,button2,distinguish){ var xhr = new XMLHttpRequest(); @@ -196,6 +196,15 @@ document.getElementById(button1).classList.toggle("d-md-inline-block"); document.getElementById(button2).classList.toggle("d-md-inline-block"); + + $('#toast-post-success').toast('dispose'); + $('#toast-post-success').toast('show'); + if (distinguish=='yes') { + document.getElementById('toast-post-success-text').innerText = "Comment distinguished!"; + } + else { + document.getElementById('toast-post-success-text').innerText = "Comment undistinguished!"; + } } //Autoexpand textedit comments