fds
This commit is contained in:
parent
aeeac05f2a
commit
80e5c77d0a
4 changed files with 9 additions and 7 deletions
|
@ -51,7 +51,11 @@ function report_commentModal(id, author) {
|
|||
document.getElementById("reportCommentFormBefore").classList.remove('d-none');
|
||||
document.getElementById("reportCommentFormAfter").classList.add('d-none');
|
||||
|
||||
document.getElementById("reportCommentButton").onclick = function() {
|
||||
btn = document.getElementById("reportCommentButton")
|
||||
btn.innerHTML='Report comment';
|
||||
btn.disabled = false;
|
||||
|
||||
btn.onclick = function() {
|
||||
this.innerHTML='Reporting comment';
|
||||
this.disabled = true;
|
||||
const xhr = new XMLHttpRequest();
|
||||
|
@ -64,8 +68,6 @@ function report_commentModal(id, author) {
|
|||
xhr.onload=function() {
|
||||
document.getElementById("reportCommentFormBefore").classList.add('d-none');
|
||||
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
|
||||
this.innerHTML='Report comment';
|
||||
this.disabled = false;
|
||||
};
|
||||
|
||||
xhr.onerror=function(){alert(errortext)};
|
||||
|
|
|
@ -3,6 +3,8 @@ function report_postModal(id) {
|
|||
submitbutton=document.getElementById("reportPostButton");
|
||||
document.getElementById("reportPostFormBefore").classList.remove('d-none');
|
||||
document.getElementById("reportPostFormAfter").classList.add('d-none');
|
||||
submitbutton.disabled = false;
|
||||
submitbutton.innerHTML='Report post';
|
||||
|
||||
submitbutton.onclick = function() {
|
||||
|
||||
|
@ -19,8 +21,6 @@ function report_postModal(id) {
|
|||
xhr.onload=function() {
|
||||
document.getElementById("reportPostFormBefore").classList.add('d-none');
|
||||
document.getElementById("reportPostFormAfter").classList.remove('d-none');
|
||||
this.disabled = false;
|
||||
this.innerHTML='Report post';
|
||||
};
|
||||
|
||||
xhr.onerror=function(){alert(errortext)};
|
||||
|
|
|
@ -904,7 +904,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/static/assets/js/marked.js?a=220"></script>
|
||||
<script src="/static/assets/js/comments_v.js?a=237"></script>
|
||||
<script src="/static/assets/js/comments_v.js?a=238"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/clipboard.js?a=220"></script>
|
||||
|
|
|
@ -32,4 +32,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/assets/js/report_post_modal.js?a=222"></script>
|
||||
<script src="/static/assets/js/report_post_modal.js?a=223"></script>
|
Loading…
Add table
Add a link
Reference in a new issue