Event Collision

I have added a checkbox with the option for the admin to specify that other events cannot be scheduled at the same time. The problem is that I want other events (that aren’t checked with no collision field) to allow to be scheduled at the same time.

If I add in the collision script and put in an allowed # of collisions then the OnCollision function never gets called but if I remove collisions config variable then it will call the function but then it won’t allow for collisions on other events.

How do I allow for collisions of events BUT still have the OnCollision function called WHEN a collision is happening so I can decide whether or not to let it happen or not?

Thanks for your help!

I guess no one else has had any problems with the event collision add-on? I am trying to make the onEventCollision function fire on any event collision so if any of the events have the No Collision checkbox checked, it will prevent the collision, otherwise it will allow it. Any ideas or tips would be greatly appreciated!

Hello,

Limit collisions to 1. That way ‘onEventCollision’ event handler will be fired every time.
In the event handler you can check event types and decide if you need to block that collision or allow it.

[code]scheduler.attachEvent(“onEventCollision”, function(ev,evs){
// ev - event for which onEventCollision is called
// evs - list of events which collide with it

if(){
    // you custom logic
}

return true; // true = collision will be blocked, false = allowed

});[/code]
Kind regards,
Ilya