diff --git a/korektury/templates/korektury/korekturovatko/moduly/schovani_korektur.html b/korektury/templates/korektury/korekturovatko/moduly/schovani_korektur.html index 1d6d2063..5f5a0a2e 100644 --- a/korektury/templates/korektury/korekturovatko/moduly/schovani_korektur.html +++ b/korektury/templates/korektury/korekturovatko/moduly/schovani_korektur.html @@ -1,22 +1,13 @@ Zobrazit: -<input type="checkbox" - id="k_oprave_checkbox" - onchange="toggle_corrections('k_oprave')" checked> +<input type="checkbox" id="k_oprave_checkbox" checked> <label for="k_oprave_checkbox">K opravě (<span id="k_oprave_pocet">↺</span>)</label> -<input type="checkbox" - id="opraveno_checkbox" - onchange="toggle_corrections('opraveno')" checked> +<input type="checkbox" id="opraveno_checkbox" checked> <label for="opraveno_checkbox">Opraveno (<span id="opraveno_pocet">↺</span>)</label> -<input type="checkbox" - id="neni_chyba_checkbox" - onchange="toggle_corrections('neni_chyba')" checked> +<input type="checkbox" id="neni_chyba_checkbox" checked> <label for="neni_chyba_checkbox">Není chyba (<span id="neni_chyba_pocet">↺</span>)</label> -<input type="checkbox" - id="k_zaneseni_checkbox" - onchange="toggle_corrections('k_zaneseni')" checked> +<input type="checkbox" id="k_zaneseni_checkbox" checked> <label for="k_zaneseni_checkbox">K zanesení (<span id="k_zaneseni_pocet">↺</span>)</label> - <button type="button" id="sbal-korektury">Sbal korektury</button> <button type="button" id="rozbal-korektury">Rozbal korektury</button> @@ -56,6 +47,11 @@ Zobrazit: place_comments(); } + document.getElementById('k_oprave_checkbox').addEventListener('change', () => toggle_corrections('k_oprave')); + document.getElementById('opraveno_checkbox').addEventListener('change', () => toggle_corrections('opraveno')); + document.getElementById('neni_chyba_checkbox').addEventListener('change', () => toggle_corrections('neni_chyba')); + document.getElementById('k_zaneseni_checkbox').addEventListener('change', () => toggle_corrections('k_zaneseni')); + function updatuj_pocty_stavu() { const pocty_stavu = {}; for (const stav of Object.keys(spany_s_pocty_stavu)) pocty_stavu[stav] = 0;