Ok, problem resolved. If anyone would like to modify ajax, to be true ajax (no page reload needed to handle reservations add/cancel booking) just be aware that you must return booking_id for cancel button and than event_id to change button back to add booking.
Hi, here is link for devel version, on this page is possible after login book the courses:
http://cmv.inspirodev.cz/medialni-gramotnost-a-ict/seminare/seminare-3-beh/
user: test
pwd: test
there is alert of parsed button data /course id and wp_nonce/ and return of spaces. javascript changing jus booking button for cancel button (I’ve made some changes in events-manager.js) by removing booking button and append the cancel one.
thanks for advice, if you want to see changes in js and php, here is pastebin: PHP -> http://pastebin.com/gt3SW7pN (file-cut from line 286)
JS -> http://pastebin.com/TG8aG1yM (file-cut from line 462)