fg
This commit is contained in:
parent
dfb86ffc63
commit
2a449d1189
3 changed files with 17 additions and 22 deletions
|
@ -57,9 +57,9 @@ function post_toast3(url, button1, button2) {
|
|||
|
||||
report_commentModal = function(id, author) {
|
||||
|
||||
document.getElementById("comment-author").textContent = author;
|
||||
document.getElementById("comment-author").textContent = author;
|
||||
|
||||
document.getElementById("reportCommentButton").onclick = function() {
|
||||
document.getElementById("reportCommentButton").onclick = function() {
|
||||
|
||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting comment';
|
||||
this.disabled = true;
|
||||
|
@ -102,25 +102,20 @@ toggleEdit=function(id){
|
|||
};
|
||||
|
||||
|
||||
function delete_commentModal(id) {
|
||||
function delete_comment(id) {
|
||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Deleting comment';
|
||||
this.disabled = true;
|
||||
|
||||
document.getElementById("deleteCommentButton").onclick = function() {
|
||||
|
||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Deleting comment';
|
||||
this.disabled = true;
|
||||
|
||||
var url = '/delete_comment/' + id
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
var form = new FormData()
|
||||
form.append("formkey", formkey());
|
||||
xhr.withCredentials=true;
|
||||
xhr.onload = function() {location.reload(true);};
|
||||
xhr.send(form);
|
||||
var url = '/delete_comment/' + id
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
var form = new FormData()
|
||||
form.append("formkey", formkey());
|
||||
xhr.withCredentials=true;
|
||||
xhr.onload = function() {location.reload(true);};
|
||||
xhr.send(form)
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
post_reply=function(id){
|
||||
|
||||
var form = new FormData();
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
{% if v %}
|
||||
{% include "award_modal.html" %}
|
||||
<script src="/assets/js/comments_v.js?v=57"></script>
|
||||
<script src="/assets/js/comments_v.js?v=58"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||
|
@ -376,7 +376,7 @@
|
|||
{% if c.deleted_utc > 0 %}
|
||||
<a class="list-inline-item text-muted d-none d-md-inline-block" href="javascript:void(0)" onclick="post_toast('/undelete/comment/{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Undelete</a>
|
||||
{% else %}
|
||||
<a class="list-inline-item text-muted d-none d-md-inline-block" href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</a>
|
||||
<a class="list-inline-item text-muted d-none d-md-inline-block" href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_comment('{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
@ -530,7 +530,7 @@
|
|||
{% if c.deleted_utc > 0 %}
|
||||
<a href="javascript:void(0)" onclick="post_toast('/undelete/comment/{{c.id}}')" data-bs-dismiss="modal" class="list-group-item"><i class="fas fa-trash-alt"></i>Undelete</a>
|
||||
{% else %}
|
||||
<a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')" class="list-group-item"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
<a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_comment('{{c.id}}')" class="list-group-item"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</script>
|
||||
|
||||
{% if v %}
|
||||
<script src="/assets/js/comments_v.js?v=57"></script>
|
||||
<script src="/assets/js/comments_v.js?v=58"></script>
|
||||
{% include "award_modal.html" %}
|
||||
{% include "emoji_modal.html" %}
|
||||
{% include "gif_modal.html" %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue