From 5fd2f723a540e65edd2bdbecc5b1fe2cd2a48b3b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 21 Jul 2021 13:34:18 +0200 Subject: [PATCH] sneed --- ruqqus/assets/js/all_js.js | 126 ---------------------- ruqqus/templates/admin/flagged_posts.html | 9 -- ruqqus/templates/admin/image_posts.html | 10 -- ruqqus/templates/comment_failed.html | 2 - ruqqus/templates/default.html | 100 +++++++++++++++++ ruqqus/templates/errors/503.html | 4 - ruqqus/templates/login_2fa.html | 10 -- ruqqus/templates/mine/mine.html | 4 - ruqqus/templates/notifications.html | 4 - ruqqus/templates/search.html | 8 -- ruqqus/templates/sign_up.html | 21 ++++ ruqqus/templates/submission_banned.html | 4 - ruqqus/templates/userpage.html | 4 - ruqqus/templates/userpage_blocked.html | 4 - ruqqus/templates/userpage_blocking.html | 4 - ruqqus/templates/userpage_comments.html | 4 - ruqqus/templates/userpage_deleted.html | 4 - ruqqus/templates/userpage_reserved.html | 4 - 18 files changed, 121 insertions(+), 205 deletions(-) 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 %}
@@ -44,10 +39,6 @@ {% endblock %} -{% block enlargeThumbJS %} - -{% endblock %} - {% block fixedMobileBarJS %} -{% endblock %} - - {% block postNav %}{% endblock %} - -{% block enlargeThumbJS %} - -{% endblock %} - {% block fixedMobileBarJS %} @@ -122,9 +121,6 @@ - - - diff --git a/ruqqus/templates/login_2fa.html b/ruqqus/templates/login_2fa.html index cfe58086c..a5d449579 100644 --- a/ruqqus/templates/login_2fa.html +++ b/ruqqus/templates/login_2fa.html @@ -113,16 +113,6 @@
-{% include "bootstrap.html" %} - - - - - - - - - diff --git a/ruqqus/templates/mine/mine.html b/ruqqus/templates/mine/mine.html index be56a3640..65ae0abee 100644 --- a/ruqqus/templates/mine/mine.html +++ b/ruqqus/templates/mine/mine.html @@ -1,9 +1,5 @@ {% extends "home.html" %} -{% block enlargeThumbJS %} - -{% endblock %} - {% block PseudoSubmitForm %}{% endblock %} diff --git a/ruqqus/templates/notifications.html b/ruqqus/templates/notifications.html index df10d089e..552360b9d 100644 --- a/ruqqus/templates/notifications.html +++ b/ruqqus/templates/notifications.html @@ -10,10 +10,6 @@
{% endblock %} -{% block gifKeyboard %} - -{% endblock %} - {% block content %}
diff --git a/ruqqus/templates/search.html b/ruqqus/templates/search.html index 1473be385..88ed6d555 100644 --- a/ruqqus/templates/search.html +++ b/ruqqus/templates/search.html @@ -7,14 +7,6 @@ {% endblock %} -{% block enlargeThumbJS %} - -{% endblock %} - -{% block toggleView %} - -{% endblock %} - {% block PseudoSubmitForm %}{% endblock %} {% block navbar %} diff --git a/ruqqus/templates/sign_up.html b/ruqqus/templates/sign_up.html index 3302ff964..5cc8d8a5e 100644 --- a/ruqqus/templates/sign_up.html +++ b/ruqqus/templates/sign_up.html @@ -3,6 +3,27 @@ {% include "bootstrap.html" %} -{% endblock %} - {% block content %}
diff --git a/ruqqus/templates/userpage.html b/ruqqus/templates/userpage.html index 9d69f4e74..8e0e05d89 100644 --- a/ruqqus/templates/userpage.html +++ b/ruqqus/templates/userpage.html @@ -15,10 +15,6 @@ {% block pagetype %}userpage{% endblock %} -{% block enlargeThumbJS %} - -{% endblock %} - {% block title %} {{u.username}}'s profile - Drama {% if u.is_private %} diff --git a/ruqqus/templates/userpage_blocked.html b/ruqqus/templates/userpage_blocked.html index 1a8ef7d47..2aafc47b4 100644 --- a/ruqqus/templates/userpage_blocked.html +++ b/ruqqus/templates/userpage_blocked.html @@ -2,10 +2,6 @@ {% block pagetype %}userpage{% endblock %} -{% block enlargeThumbJS %} - -{% endblock %} - {% block fixedMobileBarJS %} -{% endblock %} - {% block fixedMobileBarJS %} -{% endblock %} - {% block content %}
diff --git a/ruqqus/templates/userpage_deleted.html b/ruqqus/templates/userpage_deleted.html index 9105f142a..cb9fa3b29 100644 --- a/ruqqus/templates/userpage_deleted.html +++ b/ruqqus/templates/userpage_deleted.html @@ -2,10 +2,6 @@ {% block pagetype %}userpage{% endblock %} -{% block enlargeThumbJS %} - -{% endblock %} - {% block fixedMobileBarJS %} -{% endblock %} - {% block fixedMobileBarJS %}