Start Building Professional
Web Apps Today


 


Deletion of some date in sequence ( assuming that this event was not modified before ) 


Answer posted by Stanislav (support) on Jan 11, 2010 08:23
When element in sequence deleted , server side code creates one more record in table, which contains details about deleted element ( this is necessary only for element of recurring sequence ). New element points to the parent sequence through event_pid field and its rec_type "none" marks it as deleted. event_length field contains timestamp marker , which used to distinguish which event from original sequence was deleted. 
Categories Question details Back To List
Question  posted by SGI on Jan 07, 2010 04:52
open dhtmlx forum
Scheduler : How to modify recurring events

I'm not able to save a modification on a record of a recurrin event. No problem, if I modifiy a complete recurrin event (applicating modification on all records). I have one record in the database for a recurring event, so I don't understand haw to save a modification in one of its record.
For example, I have a event repeated all days during three weeks and I delete one of them ; which information is sent/must be sent to the server to update database.
I don't use the connector, but scheduler.attachEvent and build the url.
Answer posted by Alex (support) on Jan 11, 2010 06:14

Please see the ready sample in the documentation (scheduler package) dhtmlxScheduler/samples/03_extensions/01_recurring_events.html

Also please check the article http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:recurring_events#server_side_integration

Answer posted by SGI on Jan 11, 2010 07:46

I have ever watch these two elements, but I don't understand the logic to save a recurrin event.

Which information are sent to the server? And which modifications must be done on the database?

When I modify one event of a reccuring one, I have to insert this one as a simple event and to modify the recurring event. The master event will know that he mustn't consider his ex-son. So, the recurring event "A" becomes two recurring events (one before (A') the simple one and one after(A'')).Is it the logic you've used?

If yes, how to identify in the server-side which son of the recurring event has been modified? Will all modifications be sent to the server-side if we use attachEvent() for "onEventChanged", on EventAdded and "onBeforeEventDelete"?

Answer posted by Stanislav (support) on Jan 11, 2010 08:20
Modification for some date in sequence ( assuming that this event was not modified before ) 

Client side
!nativeeditor_status = "inserted"
start_date, end_date - real start and end dates
event_pid - id of serie
event_length - time of original event start

for example you have "each week, from tuesday to friday", and moving the event 05/01 - 08/01 to 06/01 - 09/01
inserted
2010-01-10 00:00
1262642400      // (new Date(2010-01-05).valueOf())/1000 <= old start date 
1505
1263226331281
2010-01-06 00:00
New event
1263226331281
inserted
2010-01-06 00:10 //doesn't really matter
1262729100 //marker of start, same as above
1506
1263226717653
none //important!!! this is String "none"
2010-01-06 00:05
1263226717653