diff options
author | Kévin Gomez Pinto <kevin_gomez@carpe-hora.com> | 2012-06-15 10:50:02 +0200 |
---|---|---|
committer | Kévin Gomez Pinto <kevin_gomez@carpe-hora.com> | 2012-06-15 10:50:02 +0200 |
commit | 062ad571f76cc9297813b9ea05e5d3fb459a720c (patch) | |
tree | b8952f965e464a30b6031f782df22d4e6d4c6b51 | |
parent | ba16785ab94ce2d1cafabe6f9b6ca25b97481e0e (diff) | |
download | jquery-week-calendar-062ad571f76cc9297813b9ea05e5d3fb459a720c.zip jquery-week-calendar-062ad571f76cc9297813b9ea05e5d3fb459a720c.tar.gz jquery-week-calendar-062ad571f76cc9297813b9ea05e5d3fb459a720c.tar.bz2 |
Fix: the element argument for the eventDrag() callback was undefined
-rw-r--r-- | jquery.weekcalendar.js | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/jquery.weekcalendar.js b/jquery.weekcalendar.js index e406057..df5e16a 100644 --- a/jquery.weekcalendar.js +++ b/jquery.weekcalendar.js @@ -1778,25 +1778,26 @@ $calEvent.data('calEvent', newCalEvent); }, - /* - * Add draggable capabilities to an event - */ + /** + * Add draggable capabilities to an event + */ _addDraggableToCalEvent: function(calEvent, $calEvent) { - var options = this.options; - $calEvent.draggable({ - handle: '.wc-time', - containment: 'div.wc-time-slots', - snap: '.wc-day-column-inner', - snapMode: 'inner', - snapTolerance: options.timeslotHeight - 1, - revert: 'invalid', - opacity: 0.5, - grid: [$calEvent.outerWidth() + 1, options.timeslotHeight], - start: function(event, ui) { - var $calEvent = ui.draggable; - options.eventDrag(calEvent, $calEvent); - } - }); + var options = this.options; + + $calEvent.draggable({ + handle: '.wc-time', + containment: 'div.wc-time-slots', + snap: '.wc-day-column-inner', + snapMode: 'inner', + snapTolerance: options.timeslotHeight - 1, + revert: 'invalid', + opacity: 0.5, + grid: [$calEvent.outerWidth() + 1, options.timeslotHeight], + start: function(event, ui) { + var $calEvent = ui.draggable || ui.helper; + options.eventDrag(calEvent, $calEvent); + } + }); }, /* |