testversand
This commit is contained in:
@@ -1293,8 +1293,9 @@ export function initEditor() {
|
||||
prevDlg?.showModal?.();
|
||||
}
|
||||
|
||||
async function openSend(ctx = null) {
|
||||
if (!current?.section?.is_template) {
|
||||
async function openSend(ctx = null, sectionOverride = null) {
|
||||
const sectionCtx = sectionOverride || current?.section || window.__activeSection || null;
|
||||
if (!sectionCtx?.is_template) {
|
||||
err('Kein Template geladen');
|
||||
return;
|
||||
}
|
||||
@@ -1537,13 +1538,14 @@ export function initEditor() {
|
||||
err('Testversand: Keine ID vorhanden');
|
||||
return;
|
||||
}
|
||||
if (!current?.section?.is_template) {
|
||||
const sectionCtx = opts.section || window.__activeSection || current?.section || null;
|
||||
if (!sectionCtx?.is_template) {
|
||||
err('Kein Template geladen');
|
||||
return;
|
||||
}
|
||||
window.__currentItemId = targetId;
|
||||
setSendContext(targetId, opts.name || '');
|
||||
openSend({ id: targetId, name: opts.name || '' });
|
||||
openSend({ id: targetId, name: opts.name || '' }, sectionCtx);
|
||||
};
|
||||
|
||||
// Public API
|
||||
|
||||
@@ -649,7 +649,7 @@ export async function loadList(section) {
|
||||
return;
|
||||
}
|
||||
if (window.AdminTestSend && typeof window.AdminTestSend.open === 'function') {
|
||||
window.AdminTestSend.open({ id, name: nm });
|
||||
window.AdminTestSend.open({ id, name: nm, section });
|
||||
} else {
|
||||
toast('Testversand ist aktuell nicht verfügbar.', false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user