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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue