| Issue 860: | adding a .dialog() model with drag crashing in utils.js | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I implemented a function that creates a dialog. And run in webkit, safari 5.
++
function showEventDialog(calEvent) {
$('#event_description').html(calEvent.description);
$('#event_dialog').dialog({
title: calEvent.title,
modal: true,
width: 350,
close: function(calEvent, ui) {
$('#event_dialog').dialog('destroy');
}
});
}
++ use in the calendar eventClick
eventClick: function(calEvent, jsEvent, view) {
showEventDialog(calEvent);
}
The dialog opens, then it is draggable...
After I drag it and release, the fullcalendar object seems to lose track of itself in utils.js
The Month view, month is lost, then I can click previous and next month, for example Feb Mar April, Mar disappears.
function htmlEscape(s) {
return s.replace(/&/g, '&')
/*TypeError: Result of expression 's' [undefined] is not an object.*/
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/'/g, ''')
.replace(/"/g, '"')
.replace(/\n/g, '<br />');
}
Mar 24, 2011
Project Member
#1
adamrs...@gmail.com
Status:
Reproducing
Mar 25, 2011
hey, Yes here is a url. http://webhaveninternational.com/fullcalendar/fullcalendar-1.5/demos/object-issue.html What I find is that the dialog drags around for a while, then the issue appears, but sometimes it is immediate...
Apr 2, 2011
thanks for the link. i figure out what is happening. when you drag the dialog over the fullcalendar, fullcalendar expects something to be dropped onto the calendar (you might be able to see the day turn slightly blue). you have the `drop` handler going, and the code in there is what's going wrong. you need to make sure the element that is being dropped has an event associated with it...
drop: function(date, allDay) {
var originalEventObject=$(this).data('eventObject');
if (originalEventObject) {
// everything else in the function
}
}
hope this helps.
Status:
Done
|
|
| ► Sign in to add a comment |