I have two sections setup in my Unit view. If the user drags an event from section_id:1 to a time slot in section_id:2, the onEventChanged method fires. That’s great, but the onEventChanged method receives the new Event, for section_id:2. How do I get information that the Event originally was in section_id:1? Is there any fromSection/toSection type information available for the Unit view? I can’t seem to find any method that gives me access to the old event. Imagine if I had 8 sections setup in the Unit view; we need to have a way of knowing that the event being changed was originally in section_id:1 and has now been dragged to section_id:7. How can I get the old section_id of the event that has changed?
You can attach handler to onBeforeEventChanged event, and store the section value in it, so it can be later used in onEventChanged
Thank you for the reply.
I am unclear on the documentation for this event:
scheduler.attachEvent("onBeforeEventChanged", function(event_object, native_event, is_new, unmodified_event)
event_object - I assume this is the new event object that has not been saved yet. Therefore, it would have the new section_id in this case?
native_event - What is this?
unmodified_event - Is this the old event, with the old section_id?