fix
This commit is contained in:
parent
c80dc54c1e
commit
0eb130e51f
6 changed files with 20 additions and 20 deletions
|
@ -72,8 +72,8 @@ document.getElementById("reportCommentButton").onclick = function() {
|
||||||
xhr.withCredentials=true;
|
xhr.withCredentials=true;
|
||||||
|
|
||||||
xhr.onload=function() {
|
xhr.onload=function() {
|
||||||
document.getElementById("reportCommentFormBefore").classList.add('d-none');
|
document.getElementById("reportCommentFormBefore").classList.add('hidden');
|
||||||
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
|
document.getElementById("reportCommentFormAfter").classList.remove('hidden');
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.onerror=function(){alert(errortext)};
|
xhr.onerror=function(){alert(errortext)};
|
||||||
|
@ -84,7 +84,7 @@ document.getElementById("reportCommentButton").onclick = function() {
|
||||||
|
|
||||||
function openReplyBox(id) {
|
function openReplyBox(id) {
|
||||||
const element = document.getElementById(`reply-to-${id}`);
|
const element = document.getElementById(`reply-to-${id}`);
|
||||||
element.classList.remove('d-none')
|
element.classList.remove('hidden')
|
||||||
|
|
||||||
element.getElementsByTagName('textarea')[0].focus()
|
element.getElementsByTagName('textarea')[0].focus()
|
||||||
}
|
}
|
||||||
|
@ -95,9 +95,9 @@ toggleEdit=function(id){
|
||||||
box=document.getElementById('comment-edit-body-'+id);
|
box=document.getElementById('comment-edit-body-'+id);
|
||||||
actions = document.getElementById('comment-' + id +'-actions');
|
actions = document.getElementById('comment-' + id +'-actions');
|
||||||
|
|
||||||
comment.classList.toggle("d-none");
|
comment.classList.toggle("hidden");
|
||||||
form.classList.toggle("d-none");
|
form.classList.toggle("hidden");
|
||||||
actions.classList.toggle("d-none");
|
actions.classList.toggle("hidden");
|
||||||
autoExpand(box);
|
autoExpand(box);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,6 @@ function post_toast2(url, button1, button2) {
|
||||||
|
|
||||||
xhr.send(form);
|
xhr.send(form);
|
||||||
|
|
||||||
document.getElementById(button1).classList.toggle("d-none");
|
document.getElementById(button1).classList.toggle("hidden");
|
||||||
document.getElementById(button2).classList.toggle("d-none");
|
document.getElementById(button2).classList.toggle("hidden");
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@ report_postModal = function(id) {
|
||||||
xhr.withCredentials=true;
|
xhr.withCredentials=true;
|
||||||
|
|
||||||
xhr.onload=function() {
|
xhr.onload=function() {
|
||||||
document.getElementById("reportPostFormBefore").classList.add('d-none');
|
document.getElementById("reportPostFormBefore").classList.add('hidden');
|
||||||
document.getElementById("reportPostFormAfter").classList.remove('d-none');
|
document.getElementById("reportPostFormAfter").classList.remove('hidden');
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.onerror=function(){alert(errortext)};
|
xhr.onerror=function(){alert(errortext)};
|
||||||
|
|
|
@ -7,11 +7,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||||
var successID = document.getElementById("passwordHelpSuccess");
|
var successID = document.getElementById("passwordHelpSuccess");
|
||||||
|
|
||||||
if (charCount.length >= 8) {
|
if (charCount.length >= 8) {
|
||||||
id.classList.add("d-none");
|
id.classList.add("hidden");
|
||||||
successID.classList.remove("d-none");
|
successID.classList.remove("hidden");
|
||||||
} else {
|
} else {
|
||||||
id.classList.remove("d-none");
|
id.classList.remove("hidden");
|
||||||
successID.classList.add("d-none");
|
successID.classList.add("hidden");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -82,10 +82,10 @@ hide_image=function(){
|
||||||
x=document.getElementById('image-upload-block');
|
x=document.getElementById('image-upload-block');
|
||||||
url=document.getElementById('post-URL').value;
|
url=document.getElementById('post-URL').value;
|
||||||
if (url.length>=1){
|
if (url.length>=1){
|
||||||
x.classList.add('d-none');
|
x.classList.add('hidden');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.classList.remove('d-none');
|
x.classList.remove('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ document.onpaste = function(event) {
|
||||||
{
|
{
|
||||||
f.files = files;
|
f.files = files;
|
||||||
document.getElementById('filename-show').textContent = filename;
|
document.getElementById('filename-show').textContent = filename;
|
||||||
document.getElementById('urlblock').classList.add('d-none');
|
document.getElementById('urlblock').classList.add('hidden');
|
||||||
var fileReader = new FileReader();
|
var fileReader = new FileReader();
|
||||||
fileReader.readAsDataURL(f.files[0]);
|
fileReader.readAsDataURL(f.files[0]);
|
||||||
fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);});
|
fileReader.addEventListener("load", function () {document.getElementById('image-preview').setAttribute('src', this.result);});
|
||||||
|
@ -205,7 +205,7 @@ document.onpaste = function(event) {
|
||||||
|
|
||||||
document.getElementById('file-upload').addEventListener('change', function(){
|
document.getElementById('file-upload').addEventListener('change', function(){
|
||||||
f=document.getElementById('file-upload');
|
f=document.getElementById('file-upload');
|
||||||
document.getElementById('urlblock').classList.add('d-none');
|
document.getElementById('urlblock').classList.add('hidden');
|
||||||
document.getElementById('filename-show').textContent = document.getElementById('file-upload').files[0].name;
|
document.getElementById('filename-show').textContent = document.getElementById('file-upload').files[0].name;
|
||||||
filename = f.files[0].name.toLowerCase()
|
filename = f.files[0].name.toLowerCase()
|
||||||
if (filename.endsWith(".jpg") || filename.endsWith(".jpeg") || filename.endsWith(".png") || filename.endsWith(".webp") || filename.endsWith(".webp"))
|
if (filename.endsWith(".jpg") || filename.endsWith(".jpeg") || filename.endsWith(".png") || filename.endsWith(".webp") || filename.endsWith(".webp"))
|
||||||
|
|
|
@ -59,9 +59,9 @@ function post_toast_callback(url, data, callback) {
|
||||||
function toggleElement(group, id) {
|
function toggleElement(group, id) {
|
||||||
for(let el of document.getElementsByClassName(group)) {
|
for(let el of document.getElementsByClassName(group)) {
|
||||||
if(el.id != id) {
|
if(el.id != id) {
|
||||||
el.classList.add('d-none');
|
el.classList.add('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById(id).classList.toggle('d-none');
|
document.getElementById(id).classList.toggle('hidden');
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue