search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Undo Redo

Asked by Steve Lee
1 year ago.

Hi

I'm trying, and failing, to add Undo/Redo functionality https://code.daypilot.org/33599/javascript-scheduler-undo-redo into the attached.

The attached index.php and config.js are based on https://code.daypilot.org/20663/php-machine-production-job-scheduling-application-mysql

I'm not a coder, I've muddled along this far but this has stumped me. Can you help?

Thank you.

Answer posted by Steve Lee
1 year ago.

OK, I have the script running and incorporated within my scheduler. Much trial and error!

I now have another issue. My Scheduler draws its information from an access database. The scheduler then writes events changes back to the access database (both via a Mysql DB)

The undo function works for any events I create within the scheduler however any events populated from the access database seem to be outside of the undo/redo functionality. When I move or re-size these events the undo/redo function has no record of the action.

Any ideas?

Comment posted by Dan Letecky [DayPilot]
1 year ago.

If you want the undo/redo to work for events stored in the database, you will need to implement it on the server side. This would require maintaining a log of performed changes, just like in the JavaScript version. When implementing this, you can get inspiration from the UndoService class from the tutorial:

https://code.daypilot.org/33599/javascript-scheduler-undo-redo

Just note that implementing this for multiple users would make it more complex.

Comment posted by Steve Lee
1 year ago.

Hi Dan

Thanks for the answer, much appreciated. At least I know what needs doing now. Unfortunately this is beyond my skills and so will have to remain aspirational until I learn some more!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.