My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
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
Status:  Done
Owner:  ----
Closed:  Apr 2011


Sign in to add a comment
 
Reported by webhaven...@gmail.com, Mar 22, 2011
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, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/'/g, '&#039;')
        .replace(/"/g, '&quot;')
        .replace(/\n/g, '<br />');
}


Mar 24, 2011
Project Member #1 adamrs...@gmail.com
the only way this would useful is if you had a live working demo on the net somwhere i can visit, or a runnable html file in a zip. thanks
Status: Reproducing
Mar 25, 2011
#2 webhaven...@gmail.com
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
Project Member #3 adamrs...@gmail.com
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

Powered by Google Project Hosting