Fullcalendar does not work in FF on a Windows machine

I have a problem dragging external items into a calendar (Fullcalendar) on a Windows machine. Everything works fine on a Linux, Mac machine. But does not save the database on a Windows machine. What could be the problem?

jQuery(document).ready(function() { /* initialize the external events ----------------------------------------------------------------- */ jQuery('#external-events div.external-event').each(function() { // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end var eventObject = { title: jQuery.trim(jQuery(this).text()) // use the element text as the event title }; // store the Event Object in the DOM element so we can get to it later jQuery(this).data('eventObject', eventObject); // make the event draggable using jQuery UI jQuery(this).draggable({ zIndex: 999, revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); }); // page is now ready, initialize the calendar... jQuery('#calendar').fullCalendar({ loading: function(bool) { if (bool) jQuery('#loading').show(); else jQuery('#loading').hide(); }, events: "/roster/manage/ajax?part=shiftcalendar&nodeID="+placeid, // put your options and callbacks here header: { left: 'prev,next today', center: 'title', right: 'prev,next today', }, cache: false, editable: true, droppable: true, // this allows things to be dropped onto the calendar !!! drop: function(date, allDay) { // this function is called when something is dropped // retrieve the dropped element stored Event Object var originalEventObject = jQuery(this).data('eventObject'); // we need to copy it, so that multiple events don't have a reference to the same object var copiedEventObject = jQuery.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; copiedEventObject.allDay = allDay; // render the event on the calendar // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) jQuery('#calendar').fullCalendar('renderEvent', copiedEventObject, true); // Call this function to store the date and time of this shift into a table saveShift(originalEventObject,copiedEventObject); }, eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) { if (!confirm("Are you sure you want to change dates?")) { revertFunc(); } else { // Our edit function for this shift updateShift(event); } }, eventClick: function(event,revertFunc) { if(!confirm("Are you sure you want to delete this "+ event.title +" shift?")) { revertFunc(); } else { // Delete shift deleteShift(event); } } /*eventMouseover: function(event, jsEvent, view) { jQuery.getJSON('/roster/manage/ajax', {part: "shiftcalendarpeople", shiftID: event.id }, function(data) { if(data != null) { var layer = "<div id='events_"+event.id+"'>"; jQuery.each(data, function(k, v) { layer += "<span>"+v.user+" as "+v.role+"</span>"; }); layer += "</div>"; jQuery(this).append(layer); } else { var layer = "<div id='events_"+event.id+"'><span>No people rostered.</span></div>"; jQuery(this).append(layer); } }); }, eventMouseout: function(event, jsEvent, view) { jQuery("#events_"+event.id+"").remove(); }*/ }) }); 
+4
source share
1 answer

Usually, when something works on every machine, except windows (or vice versa), this is due to path problems. I see that you are using the unix path in a variable

events: "/ roster / manage / ajax? part = shiftcalendar & nodeID =" + placeid

Perhaps try using the Windows style style "\ roster \ manage \ ajax? Part = shiftcalendar & nodeID =" + placeid

This is a rough assumption. This is what catches the eye at first glance.

0
source

Source: https://habr.com/ru/post/1380142/


All Articles