use of org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent in project openolat by klemens.
the class FullCalendarElement method evalFormRequest.
/**
* @see org.olat.core.gui.components.form.flexible.FormItemImpl#evalFormRequest(org.olat.core.gui.UserRequest)
*/
@Override
public void evalFormRequest(UserRequest ureq) {
String selectedEventId = getRootForm().getRequestParameter("evSelect");
String addEventMarker = getRootForm().getRequestParameter("evAdd");
String movedEventId = getRootForm().getRequestParameter("evMove");
String resizedEventId = getRootForm().getRequestParameter("evResize");
String changeViewName = getRootForm().getRequestParameter("evChangeView");
String print = getRootForm().getRequestParameter("print");
String config = getRootForm().getRequestParameter("config");
String aggregate = getRootForm().getRequestParameter("aggregate");
String dispatchuri = getRootForm().getRequestParameter("dispatchuri");
if ("undefined".equals(dispatchuri)) {
// to nothing
} else if (StringHelper.containsNonWhitespace(print)) {
String targetDomId = "fc_p" + component.getDispatchID();
getRootForm().fireFormEvent(ureq, new CalendarGUIPrintEvent(this, targetDomId));
} else if (StringHelper.containsNonWhitespace(config)) {
String targetDomId = "fc_x" + component.getDispatchID();
getRootForm().fireFormEvent(ureq, new CalendarGUIFormEvent(CalendarGUIFormEvent.CONFIGURE, this, targetDomId));
} else if (StringHelper.containsNonWhitespace(aggregate)) {
String targetDomId = "fc_g" + component.getDispatchID();
getRootForm().fireFormEvent(ureq, new CalendarGUIFormEvent(CalendarGUIFormEvent.AGGREGATED_FEED, this, targetDomId));
} else if (StringHelper.containsNonWhitespace(selectedEventId)) {
String targetDomId = getRootForm().getRequestParameter("evDomId");
doSelect(ureq, selectedEventId, targetDomId);
} else if (StringHelper.containsNonWhitespace(addEventMarker)) {
String start = getRootForm().getRequestParameter("start");
String end = getRootForm().getRequestParameter("end");
String allDay = getRootForm().getRequestParameter("allDay");
doAdd(ureq, start, end, allDay);
} else if (StringHelper.containsNonWhitespace(movedEventId)) {
String dayDelta = getRootForm().getRequestParameter("dayDelta");
String minuteDelta = getRootForm().getRequestParameter("minuteDelta");
String allDay = getRootForm().getRequestParameter("allDay");
doMove(ureq, movedEventId, dayDelta, minuteDelta, allDay);
} else if (StringHelper.containsNonWhitespace(resizedEventId)) {
String minuteDelta = getRootForm().getRequestParameter("minuteDelta");
String allDay = getRootForm().getRequestParameter("allDay");
doResize(ureq, resizedEventId, minuteDelta, allDay);
} else if (StringHelper.containsNonWhitespace(changeViewName)) {
String start = getRootForm().getRequestParameter("start");
doChangeView(changeViewName, start);
}
}
use of org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent in project OpenOLAT by OpenOLAT.
the class FullCalendarElement method evalFormRequest.
/**
* @see org.olat.core.gui.components.form.flexible.FormItemImpl#evalFormRequest(org.olat.core.gui.UserRequest)
*/
@Override
public void evalFormRequest(UserRequest ureq) {
String selectedEventId = getRootForm().getRequestParameter("evSelect");
String addEventMarker = getRootForm().getRequestParameter("evAdd");
String movedEventId = getRootForm().getRequestParameter("evMove");
String resizedEventId = getRootForm().getRequestParameter("evResize");
String changeViewName = getRootForm().getRequestParameter("evChangeView");
String print = getRootForm().getRequestParameter("print");
String config = getRootForm().getRequestParameter("config");
String aggregate = getRootForm().getRequestParameter("aggregate");
String dispatchuri = getRootForm().getRequestParameter("dispatchuri");
if ("undefined".equals(dispatchuri)) {
// to nothing
} else if (StringHelper.containsNonWhitespace(print)) {
String targetDomId = "fc_p" + component.getDispatchID();
getRootForm().fireFormEvent(ureq, new CalendarGUIPrintEvent(this, targetDomId));
} else if (StringHelper.containsNonWhitespace(config)) {
String targetDomId = "fc_x" + component.getDispatchID();
getRootForm().fireFormEvent(ureq, new CalendarGUIFormEvent(CalendarGUIFormEvent.CONFIGURE, this, targetDomId));
} else if (StringHelper.containsNonWhitespace(aggregate)) {
String targetDomId = "fc_g" + component.getDispatchID();
getRootForm().fireFormEvent(ureq, new CalendarGUIFormEvent(CalendarGUIFormEvent.AGGREGATED_FEED, this, targetDomId));
} else if (StringHelper.containsNonWhitespace(selectedEventId)) {
String targetDomId = getRootForm().getRequestParameter("evDomId");
doSelect(ureq, selectedEventId, targetDomId);
} else if (StringHelper.containsNonWhitespace(addEventMarker)) {
String start = getRootForm().getRequestParameter("start");
String end = getRootForm().getRequestParameter("end");
String allDay = getRootForm().getRequestParameter("allDay");
doAdd(ureq, start, end, allDay);
} else if (StringHelper.containsNonWhitespace(movedEventId)) {
String dayDelta = getRootForm().getRequestParameter("dayDelta");
String minuteDelta = getRootForm().getRequestParameter("minuteDelta");
String allDay = getRootForm().getRequestParameter("allDay");
doMove(ureq, movedEventId, dayDelta, minuteDelta, allDay);
} else if (StringHelper.containsNonWhitespace(resizedEventId)) {
String minuteDelta = getRootForm().getRequestParameter("minuteDelta");
String allDay = getRootForm().getRequestParameter("allDay");
doResize(ureq, resizedEventId, minuteDelta, allDay);
} else if (StringHelper.containsNonWhitespace(changeViewName)) {
String start = getRootForm().getRequestParameter("start");
doChangeView(changeViewName, start);
}
}
use of org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent in project openolat by klemens.
the class CalendarPrintController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == printButton) {
Date from = fromEl.getDate();
Date to = toEl.getDate();
fireEvent(ureq, new CalendarGUIPrintEvent(from, to));
}
super.formInnerEvent(ureq, source, event);
}
Aggregations