Hello,
I am trying to automatically re-open the lightbox when an event is added and the server responds with an invalid state e.g.
<data><action type="invalid" sid="1000" tid="1000"/></data>
I tried attaching these events to a custom function:
// dataprocessor has already been initialized
dataprocessor.attachEvent("onAfterUpdate", updated_handler);
scheduler.attachEvent("onEventCancel", cancelled_handler);
// the handler
function updated_handler(sid, action, tid, btag){
if (action == "invalid"){
scheduler.showLightbox(sid);
return true;
}
return true;
}
function cancelled_handler(event_id, is_new_event){
if (event_id in scheduler._dataprocessor._invalid){
delete scheduler._dataprocessor._invalid[event_id]
scheduler.deleteEvent(event_id);
return true;
}
return true;
}
It seems to work for the first event and then I get this error:
[color=red]
Uncaught TypeError: Cannot read property ‘!nativeeditor_status’ of undefined
Any idea on how to deal with this
Thanks