Zum Hauptinhalt springen

resetLightbox

Description

Entfernt das aktuelle HTML-Objektelement der Lightbox

resetLightbox: () => void

Example

var full_lightbox = [
{ name: "description", map_to: "text", type: "textarea", focus: true},
{ name: "time", map_to: "auto", type: "time"}
];
var restricted_lightbox = [
{ name: "description", map_to: "text", type: "textarea", focus: true},
];
...
scheduler.attachEvent("onBeforeLightbox", function(event_id) {
scheduler.resetLightbox();
var ev = scheduler.getEvent(event_id);
if (ev.restricted == true){
scheduler.config.lightbox.sections = restricted_lightbox;
} else {
scheduler.config.lightbox.sections = full_lightbox;
};
return true;
});

Details

Diese Methode ermöglicht es, die Konfiguration der Lightbox dynamisch zu aktualisieren: Sie entfernt das aktuelle Lightbox-Element und erstellt dann basierend auf der Lightbox-Konfiguration ein neues.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.