Package org.olat.commons.calendar.model

Examples of org.olat.commons.calendar.model.KalendarConfig


        calRenderWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
      }
    } else {
      calRenderWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
    }
    KalendarConfig config = calManager.findKalendarConfigForIdentity(calRenderWrapper.getKalendar(), ureq);
    if (config != null) {
      calRenderWrapper.getKalendarConfig().setCss(config.getCss());
      calRenderWrapper.getKalendarConfig().setVis(config.isVis());
    }
    calRenderWrapper.getKalendarConfig().setResId(businessGroup.getKey());
    if (businessGroup.getType().equals(BusinessGroup.TYPE_LEARNINGROUP)) {
      // add linking
      List<OLATResource> resources = BGContextManagerImpl.getInstance().findOLATResourcesForBGContext(businessGroup.getGroupContext());
View Full Code Here


        String calendarID = ureq.getParameter(PARAM_ID);
        fireEvent(ureq, new KalendarGUIAddEvent(calendarID, new Date()));
      } else if (command.equals(CMD_TOGGLE_DISPLAY)) {
        String calendarID = ureq.getParameter(PARAM_ID);
        KalendarRenderWrapper calendarWrapper = findKalendarRenderWrapper(calendarID);
        KalendarConfig config = calendarWrapper.getKalendarConfig();
        config.setVis(!config.isVis());
        CalendarManagerFactory.getInstance().getCalendarManager().saveKalendarConfigForIdentity(
            config, calendarWrapper.getKalendar(), ureq);
        fireEvent(ureq, Event.CHANGED_EVENT);
      } else if (command.equals(CMD_CHOOSE_COLOR)) {
        String calendarID = ureq.getParameter(PARAM_ID);
View Full Code Here

  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == colorChooser) {
      cmc.deactivate();
      if (event == Event.DONE_EVENT) {
        String choosenColor = colorChooser.getChoosenColor();
        KalendarConfig config = lastCalendarWrapper.getKalendarConfig();
        config.setCss(choosenColor);
        CalendarManagerFactory.getInstance().getCalendarManager().saveKalendarConfigForIdentity(
            config, lastCalendarWrapper.getKalendar(), ureq);
        fireEvent(ureq, Event.CHANGED_EVENT);
      }
    } else if (source == confirmRemoveDialog ) {
View Full Code Here

    if (isPrivileged) {
      courseKalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
    } else {
      courseKalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
    }
    KalendarConfig config = calendarManager.findKalendarConfigForIdentity(courseKalendarWrapper.getKalendar(), ureq);
    if (config != null) {
      courseKalendarWrapper.getKalendarConfig().setCss(config.getCss());
      courseKalendarWrapper.getKalendarConfig().setVis(config.isVis());
    }
    // add link provider
    CourseLinkProviderController clpc = new CourseLinkProviderController(course, ureq, wControl);
    courseKalendarWrapper.setLinkProvider(clpc);
    calendars.add(courseKalendarWrapper);
View Full Code Here

      if (iCalAccess == CollaborationTools.CALENDAR_ACCESS_OWNERS && !isOwner) {
        groupCalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
      } else {
        groupCalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
      }
      KalendarConfig config = calendarManager.findKalendarConfigForIdentity(groupCalendarWrapper.getKalendar(), ureq);
      if (config != null) {
        groupCalendarWrapper.getKalendarConfig().setCss(config.getCss());
        groupCalendarWrapper.getKalendarConfig().setVis(config.isVis());
      }
      groupCalendarWrapper.setLinkProvider(linkProvider);
      calendars.add(groupCalendarWrapper);
    }
  }
View Full Code Here

      myContent.put("userinfo", homePageDisplayController.getInitialComponent());

    } else if (menuCommand.equals(CMD_CALENDAR)) {
      CalendarManager calendarManager = CalendarManagerFactory.getInstance().getCalendarManager();
      KalendarRenderWrapper calendarWrapper = calendarManager.getPersonalCalendar(identity);
      calendarWrapper.setKalendarConfig(new KalendarConfig(identity.getName(), KalendarRenderWrapper.CALENDAR_COLOR_BLUE, true));
      KalendarConfig config = calendarManager.findKalendarConfigForIdentity(calendarWrapper.getKalendar(), ureq);
      if (config != null) {
        calendarWrapper.getKalendarConfig().setCss(config.getCss());
        calendarWrapper.getKalendarConfig().setVis(config.isVis());
      }
      if (ureq.getUserSession().getRoles().isOLATAdmin() || identity.getName().equals(ureq.getIdentity().getName()))
        calendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
      else
        calendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
View Full Code Here

   * @param kalendar
   * @param calendarColor
   * @param access
   */
  public KalendarRenderWrapper(Kalendar kalendar) {
    this(kalendar, new KalendarConfig(), ACCESS_READ_ONLY);
  }
View Full Code Here

        String calendarID = ureq.getParameter(PARAM_ID);
        fireEvent(ureq, new KalendarGUIAddEvent(calendarID, new Date()));
      } else if (command.equals(CMD_TOGGLE_DISPLAY)) {
        String calendarID = ureq.getParameter(PARAM_ID);
        KalendarRenderWrapper calendarWrapper = findKalendarRenderWrapper(calendarID);
        KalendarConfig config = calendarWrapper.getKalendarConfig();
        config.setVis(!config.isVis());
        CalendarManagerFactory.getInstance().getCalendarManager().saveKalendarConfigForIdentity(
            config, calendarWrapper.getKalendar(), ureq);
        fireEvent(ureq, Event.CHANGED_EVENT);
      } else if (command.equals(CMD_CHOOSE_COLOR)) {
        String calendarID = ureq.getParameter(PARAM_ID);
View Full Code Here

  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == colorChooser) {
      cmc.deactivate();
      if (event == Event.DONE_EVENT) {
        String choosenColor = colorChooser.getChoosenColor();
        KalendarConfig config = lastCalendarWrapper.getKalendarConfig();
        config.setCss(choosenColor);
        CalendarManagerFactory.getInstance().getCalendarManager().saveKalendarConfigForIdentity(
            config, lastCalendarWrapper.getKalendar(), ureq);
        fireEvent(ureq, Event.CHANGED_EVENT);
      }
    } else if (source == confirmRemoveDialog ) {
View Full Code Here

    if (isPrivileged) {
      courseKalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
    } else {
      courseKalendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
    }
    KalendarConfig config = calendarManager.findKalendarConfigForIdentity(courseKalendarWrapper.getKalendar(), ureq);
    if (config != null) {
      courseKalendarWrapper.getKalendarConfig().setCss(config.getCss());
      courseKalendarWrapper.getKalendarConfig().setVis(config.isVis());
    }
    // add link provider
    CourseLinkProviderController clpc = new CourseLinkProviderController(course, ureq, getWindowControl());
    courseKalendarWrapper.setLinkProvider(clpc);
    calendars.add(courseKalendarWrapper);
View Full Code Here

TOP

Related Classes of org.olat.commons.calendar.model.KalendarConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.