resetLightbox

移除当前 lightbox 的 HTML 对象元素

void resetLightbox();

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;
});

Related samples

Details

此方法允许动态更新 lightbox 的配置:它首先移除当前的 lightbox 元素,然后根据lightbox 配置创建一个新的 lightbox。

See also
返回顶部