|
@ -11,10 +11,8 @@ |
|
|
<script src="{% static 'odevzdavatko/check_for_detail.js' %}"></script> |
|
|
<script src="{% static 'odevzdavatko/check_for_detail.js' %}"></script> |
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
|
$(document).ready(function () { |
|
|
$(document).ready(function () { |
|
|
console.log("I am ready!"); |
|
|
|
|
|
const zaskrtavatko = document.getElementById('pridat-jmena-resitelu'); |
|
|
const zaskrtavatko = document.getElementById('pridat-jmena-resitelu'); |
|
|
zaskrtavatko.addEventListener('change', () => { |
|
|
zaskrtavatko.addEventListener('change', () => { |
|
|
console.log("Changing!"); |
|
|
|
|
|
for (var priloha of document.getElementsByClassName("reseni-ke-stazeni")) { |
|
|
for (var priloha of document.getElementsByClassName("reseni-ke-stazeni")) { |
|
|
let new_download = zaskrtavatko.checked ? priloha.dataset.altFilename : ''; |
|
|
let new_download = zaskrtavatko.checked ? priloha.dataset.altFilename : ''; |
|
|
priloha.setAttribute('download', new_download); |
|
|
priloha.setAttribute('download', new_download); |
|
|