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