Increase timeout for loading display set details and remove redundant script from modal

This commit is contained in:
Ross
2026-02-09 10:34:20 +00:00
parent 5761117e68
commit 3b9942054d
2 changed files with 1 additions and 10 deletions
@@ -800,7 +800,7 @@
dsModalBody.innerHTML = html; dsModalBody.innerHTML = html;
setTimeout(function () { setTimeout(function () {
try { window.mountDicomViewers(); } catch (e) { console.warn('mountDicomViewers not available', e); } try { window.mountDicomViewers(); } catch (e) { console.warn('mountDicomViewers not available', e); }
}, 200); }, 500);
}) })
.catch(error => { .catch(error => {
console.error("Error loading display set details:", error); console.error("Error loading display set details:", error);
@@ -19,15 +19,6 @@
onclick='(window.importAnnotations_modal_viewer_{{ ds.pk }}||window.importAnnotations_modal_viewer||window.importAnnotations)({{ ds.annotations|safe }}); (window.importViewerState_modal_viewer_{{ ds.pk }}||window.importViewerState_modal_viewer||window.importViewerState)({{ ds.viewerstate|safe }});' onclick='(window.importAnnotations_modal_viewer_{{ ds.pk }}||window.importAnnotations_modal_viewer||window.importAnnotations)({{ ds.annotations|safe }}); (window.importViewerState_modal_viewer_{{ ds.pk }}||window.importViewerState_modal_viewer||window.importViewerState)({{ ds.viewerstate|safe }});'
>Reload display set</button> >Reload display set</button>
</div> </div>
<script>
(function(){
try{
if(typeof window.mountDicomViewers === 'function'){
window.mountDicomViewers();
}
}catch(e){console.warn('Failed to schedule modal viewer auto-load:', e)}
})();
</script>
{% endif %} {% endif %}
<div class="mt-2"> <div class="mt-2">