after clicking delete button (in lightbox or event bar) The results are:
onBeforeEventDelete
POST http://localhost/dhtmlx/samples/01_initialization_loading/data/events.php?editing=true
200 OK
onBeforeEventDelete
This is by design or I’m doing something wrong?
Since I’m using onBeforeEventDelete to backup the event data (in case delete operation fails I’m able to restore it) I would expect to be called only once.
Hello,
confirmed, first time event is called before sending ‘delete’ request to the server. Second time it happens after receiving server response with confirmation of delete operation, right before remove event from the calendar.
I need some time to check, whether it’s expected to work that way
As Alexandra said in this post, first time is called by the dataprocessor to make server changes and the second one is called by the scheduler to change UI.
Thanks for your support, but I’m not getting that behaviour you mention.
It continues been called twice using onConfirmedBeforeEventDelete, but the event.property now is set as following:
2nd call // Scheduler [at this moment the row has been deleted on the DB, so any server side logical could have problems if refers to the almost deleted row]
Please ignore my previous reply.
You are right, onConfirmedBeforeEventDelete was added because of different reason, and will not help in this situation.
Try to update dhtmlxscheduler with attached one.
New version must generate only one call of onBeforeEventDelete handler. dhtmlxscheduler_fix8.zip (30.3 KB)