[code] scheduler.attachEvent(“onBeforeLightbox”, function (event_id){
var ev = scheduler.getEvent(event_id);
if(ev != null && typeof ev != ‘undefined’ && ev.isIntervento ==“true” )
{
scheduler.config.lightbox.sections=[ {name:“Conferma Assegnazione”, height:48, map_to:“conferma_assegnazione”, type:“checkbox”,unchecked_value: “not_registered”},
{name:“description”, height:130, map_to:“text”, type:“textarea” , focus:true},
{name:“custom”, height:23, type:“select”, options:sections, map_to:“section_id”},
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
}
else
{
scheduler.config.lightbox.sections=[ {name:"Tipo Evento", height: 48, options:presenza_assenza, map_to:"tipo_impegno", type:"radio", vertical: false },
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"custom", height:23, type:"select", options:sections, map_to:"section_id"},
{name:"time", height:72, type:"time", map_to:"auto"}
];
}
return true;
});[/code]
Hi, i want to have 2 different lightbox based on ev type and i use this code, but i have a lot of issue: 1) if i open type 1 event and then type 2 event lightbox doesn’t change
2) when i create type 1 ev and then i open type 2 i have a javascript exception after pressing each button (save,cancel,delet) (stop_event is the root of exception)
TypeError: document.getElementById(e[f].id) is null
dhtmlxscheduler.js
Line 177
TypeError: a is undefined
dhtmlxscheduler.js
Line 154
Can you help me?
Thank you.