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