dialog.open(target);
}
@Override
public void onEventDrop(AjaxRequestTarget target, int eventId, long delta, boolean allDay) {
AppointmentDao dao = getDao();
Appointment a = dao.get((long)eventId);
java.util.Calendar cal = WebSession.getCalendar();
cal.setTime(a.getStart());
cal.add(java.util.Calendar.MILLISECOND, (int)delta); //FIXME?
a.setStart(cal.getTime());
cal.setTime(a.getEnd());
cal.add(java.util.Calendar.MILLISECOND, (int)delta); //FIXME?
a.setEnd(cal.getTime());
dao.update(a, getBaseUrl(), getUserId());
//FIXME add feedback info
}
@Override
public void onEventResize(AjaxRequestTarget target, int eventId, long delta) {
AppointmentDao dao = getDao();
Appointment a = dao.get((long)eventId);
java.util.Calendar cal = WebSession.getCalendar();
cal.setTime(a.getEnd());
cal.add(java.util.Calendar.MILLISECOND, (int)delta); //FIXME?
a.setEnd(cal.getTime());
dao.update(a, getBaseUrl(), getUserId());
//FIXME add feedback info
}
};
form.add(calendar);