jquery-week-calendar
jquery-week-calendar copied to clipboard
Cannot drag an event to first user column of the calendar.
In a multi-user setup, an event cannot be dragged to the first user column of the day column.
Setup:
- multi-user like the one shown at
weekcalendar_demo_3.html
-
daysToShow
: 3 or 1
To replicate this issue:
-
edit
weekcalendar_demo_3.html
to look like this from iines 141 to 149 var minDate = new Date(2011,01,11,12,00,000); var maxDate = new Date(2011,01,25,12,00,000);$(document).ready(function() { var $calendar = $('#calendar').weekCalendar({ minDate: minDate, maxDate: maxDate, timeslotsPerHour: 4,
-
open
weekcalendar_demo_3.html
on your browser -
select
3 next days
button or1 day
-
create an event on the second user (user 2)
-
try to drag that event to the first user (left-most column)
Based on the above, I noticed that when an event comes from the second (user 2) or third user (long username) in whichever day, you cannot drag it to the first user (left-most column).
Hi,
I thought this one was fixed, thanks for the report I'll investigate.
It might help to mention that this can be reproduced in all the demo's, not just demo_3. I've also tested in IE7&8,FF3.6 on WinXP. On Ubuntu all browsers incl. FF and Chromium.
The most reliable way to reproduce it is to create an event, drag it into the left or right column, then drag it out, then try to drag it in again.
Firebug doesn't show any actual errors, neither does IE.
This affects both of the most recent releases. I have some time to help track it down and though you might have an idea to get me started looking in the right direction. I'll keep you posted.
you might invstigate on what changed in jquery ui for draggable and droppable in 1.8 releases. maybe the last version (1.8.10) corrects something. otherwise, have a look to _addDraggableToCalEvent function in jquery.weekcalendar.js
thanks for your help.
Julien.
jQuery UI dependencies changed (from 1.4.2) to jQuery 1.4.4 at jQuery UI version 1.8.6. There might be an issue in 1.4.4.
There was also a jQuery UI change to the draggable component at version 1.8.7. There might be an issue there.
Reverting back to jQuery UI 1.8.4 seems to be a temporary solution for this problem and it doesn't appear to break anything vital, though I haven't tested it throughly (ie. the users haven't had a go at it yet ;).
I think this might be related to http://bugs.jquery.com/ticket/8462
Yeah, further testing has revealed that reverting back to jQuery UI 1.8.4 helps in some cases (not all) :( The right column is still affected.
In jquery.weekcalendar.css, class declaration for 'wc-cal-event' (line 218) changing width from 100% to 99% seems to fix this for Firefox, not only in the demo's but in my live site as well.
.wc-cal-event { ... width: 99%; ... }
Changing line 1681 from:
grid: [$calEvent.outerWidth() + 1, options.timeslotHeight],
to
grid: [$calEvent.outerWidth(), options.timeslotHeight],
helped in my case.
The "width: 99%" fix worked perfectly for me, thanks a million.
(pawelantczak's fix also helped, but not as reliably)