// Loaded via HTMX into #tab-content (no DOMContentLoaded), so init immediately, // lazy-loading gallery.js if needed. (function() { var cfg = document.getElementById('tab-item-details-cfg'); var itemId = cfg.dataset.itemId; function go() { initGalleryManager({ targetType: 'item', targetId: itemId, listId: 'item-gallery-list', inputId: 'item-gallery-input', statusId: 'item-gallery-status' }); } if (window.initGalleryManager) { go(); return; } var s = document.createElement('script'); s.src = '/static/gallery.js'; s.onload = go; document.head.appendChild(s); })();