diff --git a/ruqqus/assets/js/all_js.js b/ruqqus/assets/js/all_js.js index 62e141f0e..6a0395418 100644 --- a/ruqqus/assets/js/all_js.js +++ b/ruqqus/assets/js/all_js.js @@ -440,113 +440,6 @@ function emailVerifyText() { } -//flagging -// Flag Comment - -report_commentModal = function(id, author) { - - document.getElementById("comment-author").textContent = author; - - //offtopic.disabled=true; - - document.getElementById("reportCommentButton").onclick = function() { - - this.innerHTML='Reporting comment'; - this.disabled = true; - post('/api/flag/comment/' + id, - callback = function() { - - document.getElementById("reportCommentFormBefore").classList.add('d-none'); - document.getElementById("reportCommentFormAfter").classList.remove('d-none'); - } - ) - } - -}; - -$('#reportCommentModal').on('hidden.bs.modal', function () { - - var button = document.getElementById("reportCommentButton"); - - var beforeModal = document.getElementById("reportCommentFormBefore"); - var afterModal = document.getElementById("reportCommentFormAfter"); - - button.innerHTML='Report comment'; - button.disabled= false; - afterModal.classList.add('d-none'); - - if ( beforeModal.classList.contains('d-none') ) { - beforeModal.classList.remove('d-none'); - } - -}); - - -// Flag Submission - -report_postModal = function(id, author, board) { - - document.getElementById("post-author").textContent = author; - - selectbox=document.getElementById('report-type-dropdown'); - selectbox.value='reason_not_selected'; - - submitbutton=document.getElementById("reportPostButton"); - submitbutton.disabled=true; - - submitbutton.onclick = function() { - - this.innerHTML='Reporting post'; - this.disabled = true; - - var xhr = new XMLHttpRequest(); - xhr.open("POST", '/api/flag/post/'+id, true); - var form = new FormData() - form.append("formkey", formkey()); - - dropdown=document.getElementById("report-type-dropdown"); - form.append("report_type", dropdown.options[dropdown.selectedIndex].value); - - xhr.withCredentials=true; - - xhr.onload=function() { - document.getElementById("reportPostFormBefore").classList.add('d-none'); - document.getElementById("reportPostFormAfter").classList.remove('d-none'); - }; - - xhr.onerror=function(){alert(errortext)}; - xhr.send(form); - - } -}; - -$('#reportPostModal').on('hidden.bs.modal', function () { - - var button = document.getElementById("reportPostButton"); - - var beforeModal = document.getElementById("reportPostFormBefore"); - var afterModal = document.getElementById("reportPostFormAfter"); - - button.innerHTML='Report post'; - button.disabled= false; - - afterModal.classList.add('d-none'); - - if ( beforeModal.classList.contains('d-none') ) { - beforeModal.classList.remove('d-none'); - } - -}); - -//enlarge thumbs -// Enlarge submissionlisting thumbnail - -enlarge_thumb = function(post_id) { - - document.getElementById(post_id).classList.toggle("enlarged"); - -}; - //iOS webapp stuff (function(document,navigator,standalone) { @@ -621,25 +514,6 @@ function post_toast(url, callback) { } -//Signup js -// Display username and password requirements on input - -$('#password-register').on('input', function () { - - var charCount = document.getElementById("password-register").value; - var id = document.getElementById("passwordHelpRegister"); - var successID = document.getElementById("passwordHelpSuccess"); - - if (charCount.length >= 8) { - id.classList.add("d-none"); - successID.classList.remove("d-none"); - } - else { - id.classList.remove("d-none"); - successID.classList.add("d-none"); - }; - -}); // Search Icon // Change navbar search icon when form is in focus, active states diff --git a/ruqqus/templates/admin/flagged_posts.html b/ruqqus/templates/admin/flagged_posts.html index ef9cccba8..d345af0df 100644 --- a/ruqqus/templates/admin/flagged_posts.html +++ b/ruqqus/templates/admin/flagged_posts.html @@ -9,11 +9,6 @@ {% block desktopUserBanner %}{% endblock %} {% block mobileUserBanner %}{% endblock %} -{% block adminscripts %} - -{% endblock %} - - {% block postNav %}