- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks - Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists - Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services - Add Microsoft OIDC SSO, API token management, and user lifecycle features - Add swagger-ui vendor integration and OpenAPI spec - Add production Docker setup and bin/ scripts - Update composer dependencies, config, templates, and frontend assets throughout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
752 B
JavaScript
29 lines
752 B
JavaScript
import { optionalEl, warnOnce } from '../core/app-dom.js';
|
|
|
|
export function initTemplateFeature(root = document) {
|
|
const host = optionalEl('[data-template-feature]');
|
|
if (!host) {
|
|
return;
|
|
}
|
|
if (host.dataset.templateFeatureBound === '1') {
|
|
return;
|
|
}
|
|
host.dataset.templateFeatureBound = '1';
|
|
|
|
const action = host.querySelector('[data-template-action]');
|
|
if (!action) {
|
|
warnOnce('UI_EL_MISSING', 'Missing [data-template-action]', { module: 'template-feature' });
|
|
return;
|
|
}
|
|
|
|
action.addEventListener('click', () => {
|
|
host.classList.toggle('is-active');
|
|
});
|
|
}
|
|
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', () => initTemplateFeature());
|
|
} else {
|
|
initTemplateFeature();
|
|
}
|