This commit is contained in:
Aevann1 2022-02-15 01:42:54 +02:00
parent ade5876f3d
commit 104f85ff0f
6 changed files with 8 additions and 4 deletions

View file

@ -60,6 +60,7 @@ function report_commentModal(id, author) {
btn = document.getElementById("reportCommentButton")
btn.innerHTML='Report comment';
btn.disabled = false;
btn.classList.remove('disabled');
reason = document.getElementById("reason-comment")
reason.value = ""
@ -67,6 +68,7 @@ function report_commentModal(id, author) {
btn.onclick = function() {
this.innerHTML='Reporting comment';
this.disabled = true;
this.classList.add('disabled');
const xhr = new XMLHttpRequest();
xhr.open("POST", '/report/comment/'+id);
xhr.setRequestHeader('xhr', 'xhr');

View file

@ -4,6 +4,7 @@ function report_postModal(id) {
document.getElementById("reportPostFormBefore").classList.remove('d-none');
document.getElementById("reportPostFormAfter").classList.add('d-none');
submitbutton.disabled = false;
submitbutton.classList.remove('disabled');
submitbutton.innerHTML='Report post';
reason = document.getElementById("reason")
@ -13,6 +14,7 @@ function report_postModal(id) {
this.innerHTML='Reporting post';
this.disabled = true;
this.classList.add('disabled');
const xhr = new XMLHttpRequest();
xhr.open("POST", '/report/post/'+id);

View file

@ -14,8 +14,8 @@ function viewmore(pid,sort,offset,ids) {
return bootstrap.Tooltip.getOrCreateInstance(element);
});
popovertrigger()
btn.disabled = false;
}
btn.disabled = false;
}
xhr.send(form)
}

View file

@ -966,7 +966,7 @@
{% if v %}
<script src="/static/assets/js/marked.js?a=242"></script>
<script src="/static/assets/js/comments_v.js?a=248"></script>
<script src="/static/assets/js/comments_v.js?a=249"></script>
{% endif %}
<script src="/static/assets/js/clipboard.js?a=250"></script>

View file

@ -32,4 +32,4 @@
</div>
</div>
<script src="/static/assets/js/report_post_modal.js?a=240"></script>
<script src="/static/assets/js/report_post_modal.js?a=241"></script>

View file

@ -963,7 +963,7 @@
</div>
{% if offset %}
<script src="/static/assets/js/viewmore.js?a=245"></script>
<script src="/static/assets/js/viewmore.js?a=246"></script>
{% endif %}
{% elif not p.replies and p.deleted_utc == 0 %}