Heya all,
I'm using a special cakePHP plugin for displaying a fully fledged calendar.
(CakePHP full calendar plugin)
By clicking on an appointment in the calendar, the user is redirected to an edit screen, where he or she can change the date, time and a lot of other related data.
Now, another function of the calender is to change the date of an appointment by simply dragging and dropping the apointment on a different date (using AJAX).
Now the problem i'm having is that, everytime i move an appointment, it opens the edit screen.
This is rather annoying when all you need to do is change the date of the appointment...
does anyone know how to resolver this?
The part of the javascript file performing the magic is as follows:
eventDragStart: function(event) {
$(this).qtip("destroy");
},
eventDrop: function(event) {
var startdate = new Date(event.start);
var startyear = startdate.getFullYear();
var startday = startdate.getDate();
var startmonth = startdate.getMonth()+1;
var starthour = startdate.getHours();
var startminute = startdate.getMinutes();
var enddate = new Date(event.end);
var endyear = enddate.getFullYear();
var endday = enddate.getDate();
var endmonth = enddate.getMonth()+1;
var endhour = enddate.getHours();
var endminute = enddate.getMinutes();
if(event.allDay == true) {
var allday = 1;
} else {
var allday = 0;
}
var url = "/DbDeKust/workdates/updateCalendar?id="+event.id+"&start="+startyear+"-"+startmonth+"-"+startday+" "+starthour+":"+startminute+":00&end="+endyear+"-"+endmonth+"-"+endday+" "+endhour+":"+endminute+":00&allday="+allday;
$.post(url, function(data){});
},