asdasd
This commit is contained in:
@@ -597,6 +597,41 @@
|
|||||||
setTimeout(() => { window.__bridgeModalAllowClose = false; }, 0);
|
setTimeout(() => { window.__bridgeModalAllowClose = false; }, 0);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ed && ed.on) {
|
||||||
|
ed.on('modal:open', () => {
|
||||||
|
try {
|
||||||
|
const modalEl = ed.Modal && ed.Modal.el;
|
||||||
|
if (!modalEl) return;
|
||||||
|
const titleEl = modalEl.querySelector('.gjs-mdl-title');
|
||||||
|
const titleText = titleEl ? String(titleEl.textContent || '').toLowerCase() : '';
|
||||||
|
if (!titleText.includes('code')) return;
|
||||||
|
if (modalEl.querySelector('[data-bridge-viewcode-close]')) return;
|
||||||
|
const contentEl = modalEl.querySelector('.gjs-mdl-content');
|
||||||
|
if (!contentEl) return;
|
||||||
|
const footer = document.createElement('div');
|
||||||
|
footer.style.display = 'flex';
|
||||||
|
footer.style.justifyContent = 'flex-end';
|
||||||
|
footer.style.paddingTop = '12px';
|
||||||
|
const btn = document.createElement('button');
|
||||||
|
btn.type = 'button';
|
||||||
|
btn.textContent = 'Schließen';
|
||||||
|
btn.setAttribute('data-bridge-viewcode-close', '1');
|
||||||
|
btn.setAttribute('data-bridge-modal-close', '1');
|
||||||
|
btn.style.padding = '6px 12px';
|
||||||
|
btn.style.border = '1px solid #cbd5f5';
|
||||||
|
btn.style.borderRadius = '4px';
|
||||||
|
btn.style.background = '#f8fafc';
|
||||||
|
btn.style.cursor = 'pointer';
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
if (B.allowModalCloseOnce) B.allowModalCloseOnce();
|
||||||
|
if (ed.Modal && ed.Modal.close) ed.Modal.close();
|
||||||
|
});
|
||||||
|
footer.appendChild(btn);
|
||||||
|
contentEl.appendChild(footer);
|
||||||
|
} catch {}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 🛑 KRITISCHE KORREKTUR 1: Explizite Erstellung aller konfigurierten Kategorien
|
// 🛑 KRITISCHE KORREKTUR 1: Explizite Erstellung aller konfigurierten Kategorien
|
||||||
ensureConfiguredCategories(ed);
|
ensureConfiguredCategories(ed);
|
||||||
|
|||||||
Reference in New Issue
Block a user