Search in sources :

Example 6 with CalendarGUIPrintEvent

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);
    }
}
Also used : CalendarGUIPrintEvent(org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent) CalendarGUIFormEvent(org.olat.commons.calendar.ui.events.CalendarGUIFormEvent)

Example 7 with CalendarGUIPrintEvent

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);
    }
}
Also used : CalendarGUIPrintEvent(org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent) CalendarGUIFormEvent(org.olat.commons.calendar.ui.events.CalendarGUIFormEvent)

Example 8 with CalendarGUIPrintEvent

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);
}
Also used : CalendarGUIPrintEvent(org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent) Date(java.util.Date)

Aggregations

CalendarGUIPrintEvent (org.olat.commons.calendar.ui.events.CalendarGUIPrintEvent)8 KalendarEvent (org.olat.commons.calendar.model.KalendarEvent)4 KalendarRenderWrapper (org.olat.commons.calendar.ui.components.KalendarRenderWrapper)4 CalendarGUIEditEvent (org.olat.commons.calendar.ui.events.CalendarGUIEditEvent)4 CalendarGUIFormEvent (org.olat.commons.calendar.ui.events.CalendarGUIFormEvent)4 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 Kalendar (org.olat.commons.calendar.model.Kalendar)2 CalendarGUIAddEvent (org.olat.commons.calendar.ui.events.CalendarGUIAddEvent)2 CalendarGUIImportEvent (org.olat.commons.calendar.ui.events.CalendarGUIImportEvent)2 CalendarGUIModifiedEvent (org.olat.commons.calendar.ui.events.CalendarGUIModifiedEvent)2 CalendarGUIMoveEvent (org.olat.commons.calendar.ui.events.CalendarGUIMoveEvent)2 CalendarGUIRemoveEvent (org.olat.commons.calendar.ui.events.CalendarGUIRemoveEvent)2 CalendarGUIResizeEvent (org.olat.commons.calendar.ui.events.CalendarGUIResizeEvent)2 CalendarGUISelectEvent (org.olat.commons.calendar.ui.events.CalendarGUISelectEvent)2 CalendarGUISettingEvent (org.olat.commons.calendar.ui.events.CalendarGUISettingEvent)2 CalendarGUIUpdateEvent (org.olat.commons.calendar.ui.events.CalendarGUIUpdateEvent)2 SubscriptionContext (org.olat.core.commons.services.notifications.SubscriptionContext)2