From b637aed7ab35b8f2d68a451d1cfdf37dc627edde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 21 Jan 2025 08:22:34 +0100 Subject: [PATCH] =?UTF-8?q?Zapomenut=C3=BD=20switch=20podle=20document.bod?= =?UTF-8?q?y.class=20m=C3=ADsto=20podle=20atributu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/static/korektury/opraf.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/korektury/static/korektury/opraf.js b/korektury/static/korektury/opraf.js index 4266b6c7..2a88054b 100644 --- a/korektury/static/korektury/opraf.js +++ b/korektury/static/korektury/opraf.js @@ -67,13 +67,12 @@ function place_comments() { // show comment form, when clicked to image function img_click(element, ev) { - var body_class = document.body.className; - switch(body_class){ - case "comitting": + switch(document.body.dataset.status){ + case "zanaseni": if (!confirm("Právě jsou zanášeny korektury, opravdu chcete přidat novou?")) return; break; - case "deprecated": + case "zastarale": if (!confirm("Toto PDF je již zastaralé, opravdu chcete vytvořit korekturu?")) return; break;