From 024a223ec71e3f14bc655b319843c4b05d9b3bae Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 8 Aug 2024 13:36:50 +0200 Subject: [PATCH] PDF editor: Fix bug in previous change (Z#23162122) --- src/pretix/static/pretixcontrol/js/ui/editor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pretix/static/pretixcontrol/js/ui/editor.js b/src/pretix/static/pretixcontrol/js/ui/editor.js index a5e731254d..c9474519d4 100644 --- a/src/pretix/static/pretixcontrol/js/ui/editor.js +++ b/src/pretix/static/pretixcontrol/js/ui/editor.js @@ -608,14 +608,18 @@ var editor = { $("#loading-initial").remove(); }); } + editor._update_version_notice(); }, - _update_toolbox_values: function () { + _update_version_notice: function () { $("#version-notice").toggle( editor._other_page_objects.some((o) => o.type === "textcontainer") || editor.fabric.getObjects().some((o) => o.type === "textcontainer") ); + }, + _update_toolbox_values: function () { + editor._update_version_notice(); var o = editor.fabric.getActiveObject(); if (!o) { return; @@ -1419,7 +1423,6 @@ var editor = { editor._update_save_button(); }); $("#pdf-info-width, #pdf-info-height").bind('change input', editor._paper_size_warning); - editor._update_toolbox_values(); $.getJSON($("#schema-url").text(), function (data) { editor.schema = data;