dsfdfs
This commit is contained in:
parent
b059516006
commit
32ab5ae92e
1 changed files with 17 additions and 0 deletions
|
@ -35,6 +35,23 @@
|
||||||
|
|
||||||
|
|
||||||
{% if 'rdrama' not in request.host %}
|
{% if 'rdrama' not in request.host %}
|
||||||
|
<script>
|
||||||
|
function poll_vote(cid) {
|
||||||
|
{% if v %}
|
||||||
|
var type = document.getElementById(cid).checked;
|
||||||
|
var scoretext = document.getElementById('poll-' + cid);
|
||||||
|
var score = Number(scoretext.textContent);
|
||||||
|
if (type == true) scoretext.textContent = score + 1;
|
||||||
|
else scoretext.textContent = score - 1;
|
||||||
|
post('/vote/poll/' + cid + '?vote=' + type);
|
||||||
|
{% else %}
|
||||||
|
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!";
|
||||||
|
{% endif %}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/assets/js/comments_v.js?v=14"></script>
|
<script src="/assets/js/comments_v.js?v=14"></script>
|
||||||
{% include "award_modal.html" %}
|
{% include "award_modal.html" %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue