Hi Everyone,
This software is amazing but I have a problem with the units_view and events collisions. We have configurated the scheduler to avoid events collisions, but we have two resources (units) and we want to each resource be able to have its own event at the same time that the other resource.
At now, if one resource have an event, the other resource can’t create an event at the same time.
Can anyone help me?
Thanks in advance.
Does problem occur in the unit view, or in some other (week, month ) views?
While in unit view mode, you can create events which are share the same time, but for different units. But in other default views you will not be able to create or modify such overlapping events.
Thanks for your answer. The problem is in all views, include unit_view. We can’t make it work.
We want that the JS check if the events collide and they have different section_id, it’s not consider a real collision and permit it by not increment the collision limit counter.
We are trying to add a new condition to the file dhtmlxscheduler_collision.js:
if(J){var G=0;
for(var F=0;F<E.length;F++){
if((E[F][J.map_to]==H[J.map_to])&&(E[F][J.section_id]==H[J.section_id])){G++}}
if((G>scheduler.config.collision_limit)()){this._drag_event.start_date=D;
H[J.map_to]=C;
I=false}}else{
if(E.length>scheduler.config.collision_limit){I=false}}if(!I){return !scheduler.callEvent(“onEventCollision”,[H,E])}return I}})();
This not works. Please, help us! What is the correct way to do it?
Thank you.
you can try to update existing js file with the attached ones. It will resolve problem for unit view mode.
As for possibility to allow collisions for events with same section_id, check collision extension from attached file ( it is uncompressed )
line 39
var evs = scheduler.getEvents(ev.start_date, ev.end_date);
after it you need to add some custom code which will remove from evs all records which have same section_id as ev.section_id
scheduler_ext.zip (2.44 KB)