remotes/1693045480750635534/spooky-22
Aevann1 2021-09-26 13:06:03 +02:00
parent a727630bc1
commit 6cb54870ff
5 changed files with 2 additions and 16 deletions

View File

@ -15,7 +15,6 @@
xhr.onload = function(){
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
document.getElementById('toast-post-success-text').innerHTML = `@${name} banned`;
}

View File

@ -20,7 +20,6 @@
xhr.onload = function() {
if (xhr.status >= 200 && xhr.status < 300) {
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
try {
document.getElementById('toast-post-success-text').innerText = JSON.parse(xhr.response)["message"];
@ -40,7 +39,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
document.getElementById('toast-post-error-text').innerText = "Error. Try again later.";
return false
@ -169,7 +167,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
}
else {
@ -177,7 +174,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
commentError.textContent = JSON.parse(xhr.response)["error"];
}
@ -205,7 +201,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
}
else {
@ -213,7 +208,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
}
@ -245,14 +239,12 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
}
else {
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
commentError.textContent = JSON.parse(xhr.response)["error"];

View File

@ -151,7 +151,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
exileError.textContent = JSON.parse(xhr.response)["error"];

View File

@ -56,7 +56,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
}
else {
@ -64,7 +63,6 @@
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
commentError.textContent = JSON.parse(xhr.response)["error"];
@ -198,7 +196,7 @@
{% if v %}
<button id="save2-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast2('/save_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Save</button>
<button id="unsave2-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast2('/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</button>
<button id="unsave2-{{p.id}}" class="{% if p.id not in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast2('/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</button>
{% if v.admin_level >=3 or v.id == p.author.id and v.paid_dues %}
<button id="club2-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" href="javascript:void(0)" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>

View File

@ -64,9 +64,8 @@
if (xhr.status >= 200 && xhr.status < 300) {
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
myToast.show();
try {
@ -85,7 +84,6 @@
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.hide();
myToast.show();
try {