From 4e90bca192d6eb4107747f0bcabffdd789d757a2 Mon Sep 17 00:00:00 2001 From: Andreas Knab Date: Thu, 14 Mar 2024 16:02:04 -0400 Subject: [PATCH] Move styles alongside code --- .../javascript/ome.progress_overlay.js | 19 +++++++++++++++++++ .../annotations/metadata_preview.html | 10 ---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/omeroweb/webclient/static/webclient/javascript/ome.progress_overlay.js b/omeroweb/webclient/static/webclient/javascript/ome.progress_overlay.js index 69e771fabf..b40a136a75 100644 --- a/omeroweb/webclient/static/webclient/javascript/ome.progress_overlay.js +++ b/omeroweb/webclient/static/webclient/javascript/ome.progress_overlay.js @@ -25,3 +25,22 @@ OME.progress_overlay = function (promise, message) { promise.finally(() => dialog.dialog('destroy').remove()); return dialog; }; + +// add styles +(function () { + 'use strict'; + const styleSheet = document.createElement("style"); + styleSheet.innerText = ` + .ome-modal-progress button { + display: none; + } + + .ome-modal-progress .ui-dialog-content { + justify-content: center; + align-items: center; + font-size: larger; + display: flex; + } + `; + document.head.appendChild(styleSheet); +})(); \ No newline at end of file diff --git a/omeroweb/webclient/templates/webclient/annotations/metadata_preview.html b/omeroweb/webclient/templates/webclient/annotations/metadata_preview.html index 24197adb14..3a8b6fc150 100644 --- a/omeroweb/webclient/templates/webclient/annotations/metadata_preview.html +++ b/omeroweb/webclient/templates/webclient/annotations/metadata_preview.html @@ -87,16 +87,6 @@ .line { fill: none; } - - .ome-modal-progress button { - display: none; - } - .ome-modal-progress .ui-dialog-content { - justify-content: center; - align-items: center; - font-size: larger; - display: flex; - }