jquery-week-calendar icon indicating copy to clipboard operation
jquery-week-calendar copied to clipboard

eventDrop bug : failed to manipulate element after drop

Open henrygotmojo opened this issue 12 years ago • 3 comments

I use 'eventDrop' and want to modify color of element after drop but no luck. ===> eventDrop: function(newCalEvent, oldCalEvent, element)

After looking at the source code, I found that the element argument of eventDrop function is the old element, which is hidden and removed.

The bug is in lines 1795 - 1798. Source code is as following: row 1795 ===> //trigger drop callback row 1796 ===> options.eventDrop(newCalEvent, calEvent, $calEvent); row 1797 ===> row 1798 ===> var $newEvent = self._renderEvent(newCalEvent, self._findWeekDayForEvent(newCalEvent, $weekDayColumns));

I think $calEvent passed to optoins.eventDrop() should be $newEvent

henrygotmojo avatar May 19 '12 15:05 henrygotmojo

Hi,

Thanks for reporting this bug :) Could you check that it's fixed in the "fix-issue-139" branch?

K-Phoen avatar May 20 '12 09:05 K-Phoen

Ping?

K-Phoen avatar May 25 '12 14:05 K-Phoen

The drag/drop also does not pay attention to freeBusys. For example, in Demo 3, you can drag events on to the Busy area. To change this behaviour you also need to pass FreeBusyManager and calendar to eventDrop, so that the user can implement the same freeBusy checks as in eventNew

cpjolly avatar Jun 27 '12 13:06 cpjolly