asdsd
This commit is contained in:
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
// MAP (Registriert als 'std-map')
|
// MAP (Registriert als 'std-map')
|
||||||
addOrUpdate(bm, 'std-map', { label:'Karte',
|
addOrUpdate(bm, 'std-map', { label:'Karte',
|
||||||
content:`<iframe data-gjs-type="map" src="https://maps.google.com/maps?width=100%25&height=600&hl=de&q=Berlin&t=&z=14&ie=UTF8&iwloc=B&output=embed" width="100%" height="300" frameborder="0" style="${css({'border':'0',width:'100%',height:'300px'})}"></iframe>` });
|
content:`<iframe data-gjs-type="map" src="https://www.openstreetmap.org/export/embed.html?bbox=13.365%2C52.505%2C13.425%2C52.525&layer=mapnik&marker=52.515%2C13.395" width="100%" height="300" frameborder="0" style="${css({'border':'0',width:'100%',height:'300px'})}"></iframe>` });
|
||||||
|
|
||||||
// Löst die notwendigen Events für den Bridge Core / Cleanup aus.
|
// Löst die notwendigen Events für den Bridge Core / Cleanup aus.
|
||||||
editor.trigger('block:add');
|
editor.trigger('block:add');
|
||||||
|
|||||||
@@ -326,6 +326,18 @@
|
|||||||
editor.__bridgeRteModalOpen = true;
|
editor.__bridgeRteModalOpen = true;
|
||||||
editor.__bridgeRteAllowClose = false;
|
editor.__bridgeRteAllowClose = false;
|
||||||
let reopenGuard = false;
|
let reopenGuard = false;
|
||||||
|
const closeModal = () => {
|
||||||
|
editor.__bridgeRteAllowClose = true;
|
||||||
|
editor.__bridgeRteModalOpen = false;
|
||||||
|
const mdl = modal.getModel && modal.getModel();
|
||||||
|
if (modal.__bridgeOriginalClose) {
|
||||||
|
modal.__bridgeOriginalClose();
|
||||||
|
} else if (mdl && typeof mdl.set === 'function') {
|
||||||
|
mdl.set('open', false);
|
||||||
|
} else if (modal.el) {
|
||||||
|
modal.el.style.display = 'none';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (!modal.__bridgeCloseLocked) {
|
if (!modal.__bridgeCloseLocked) {
|
||||||
modal.__bridgeCloseLocked = true;
|
modal.__bridgeCloseLocked = true;
|
||||||
@@ -335,6 +347,15 @@
|
|||||||
editor.__bridgeRteAllowClose = false;
|
editor.__bridgeRteAllowClose = false;
|
||||||
return modal.__bridgeOriginalClose(...args);
|
return modal.__bridgeOriginalClose(...args);
|
||||||
}
|
}
|
||||||
|
if (editor.__bridgeRteAllowClose && !modal.__bridgeOriginalClose) {
|
||||||
|
editor.__bridgeRteAllowClose = false;
|
||||||
|
const mdl = modal.getModel && modal.getModel();
|
||||||
|
if (mdl && typeof mdl.set === 'function') {
|
||||||
|
mdl.set('open', false);
|
||||||
|
} else if (modal.el) {
|
||||||
|
modal.el.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,14 +518,12 @@
|
|||||||
cancelBtn.style.background = '#f8fafc';
|
cancelBtn.style.background = '#f8fafc';
|
||||||
cancelBtn.style.cursor = 'pointer';
|
cancelBtn.style.cursor = 'pointer';
|
||||||
cancelBtn.addEventListener('click', () => {
|
cancelBtn.addEventListener('click', () => {
|
||||||
editor.__bridgeRteAllowClose = true;
|
closeModal();
|
||||||
editor.__bridgeRteModalOpen = false;
|
|
||||||
modal.close();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const saveBtn = doc.createElement('button');
|
const saveBtn = doc.createElement('button');
|
||||||
saveBtn.type = 'button';
|
saveBtn.type = 'button';
|
||||||
saveBtn.textContent = 'Uebernehmen';
|
saveBtn.textContent = 'Speichern';
|
||||||
saveBtn.style.padding = '6px 12px';
|
saveBtn.style.padding = '6px 12px';
|
||||||
saveBtn.style.border = '1px solid #0ea5e9';
|
saveBtn.style.border = '1px solid #0ea5e9';
|
||||||
saveBtn.style.borderRadius = '4px';
|
saveBtn.style.borderRadius = '4px';
|
||||||
@@ -529,9 +548,7 @@
|
|||||||
editor.trigger('component:update', component);
|
editor.trigger('component:update', component);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
editor.__bridgeRteAllowClose = true;
|
closeModal();
|
||||||
editor.__bridgeRteModalOpen = false;
|
|
||||||
modal.close();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
actions.appendChild(cancelBtn);
|
actions.appendChild(cancelBtn);
|
||||||
|
|||||||
Reference in New Issue
Block a user