This commit is contained in:
kek7198 2021-12-21 22:35:21 -06:00
parent 56164d4e0d
commit f8b9b508f5
3 changed files with 9 additions and 3 deletions

View file

@ -49,3 +49,9 @@ function loadMoreReplies(cid,id,trigger) {
}
xhr.send(form)
}
function poll_vote_no_v() {
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show();
document.getElementById('toast-post-error-text').innerText = "Only logged-in users can vote!";
}

View file

@ -250,10 +250,10 @@ document.onpaste = function(event) {
function poll_vote(cid, parentid) {
for(let el of document.getElementsByClassName('presult-'+parentid)) {
el.classList.remove('d-none');
el.classList.remove('hidden');
}
for(let el of document.getElementsByClassName('presult')) {
el.classList.remove('d-none');
el.classList.remove('hidden');
}
var type = document.getElementById(cid).checked;
var scoretext = document.getElementById('poll-' + cid);

View file

@ -6,7 +6,7 @@
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body bg-green-500 border border-green-900 text-center text-white">
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text"></span>
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
</div>
</div>
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">