Package org.olat.core.gui.control.generic.closablewrapper

Examples of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController


        removeAsListenerAndDispose(frc);
        frc = new FolderRunController(namedFolder, false, urequest, getWindowControl());
        listenTo (frc);
       
        removeAsListenerAndDispose(cmc);
        cmc = new CloseableModalController(
            getWindowControl(), translate("folder.close"), frc.getInitialComponent()
        );
        listenTo (cmc);
       
        cmc.activate();
View Full Code Here


          SimpleText dateTimeframe = new SimpleText("dateTimeframe", translate("dates.table.date") + ": " + df.format(selectedEvent.getBegin()) + " - " + df.format(selectedEvent.getEnd()));
          participantsVC.put("dateTitle", dateTitle);
          participantsVC.put("dateTimeframe", dateTimeframe);
          participantsVC.put("participantsTable", tableManageParticipants.getInitialComponent());
          participantsVC.put("addParticipants", formManageParticipants.getInitialComponent());
          CloseableModalController manageParticipantsModalCntrl = new CloseableModalController(getWindowControl(), "close", participantsVC, true, translate("dates.table.participant.manage"));
          manageParticipantsModalCntrl.activate();
        }
      } else {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent)event;
        BitSet selection = tmse.getSelection();
        //delete all users from the selected dates
        if(tmse.getAction().equals(DENListTableDataModel.DELETE_ACTION) && selection.cardinality() > 0) {
          removed = denManager.getSelectedEventParticipants(dateList, selection);
          dateList = denManager.deleteParticipants(ores, courseNode, denManager.getSelectedEventIDs(dateList, selection));
          listTableData.setObjects(dateList);
          //send notification mail
          createRemovedNotificationMail(ureq, dateList.get(0).getSubject());
        } else if(tmse.getAction().equals(DENListTableDataModel.MAIL_ACTION) && selection.cardinality() > 0) {
          //send email to all users from the selected dates
          List<Identity> participants = denManager.getSelectedEventParticipants(dateList, selection);
          createParticipantsMail(ureq, participants);
        } else if(selection.cardinality() == 0) {
          getWindowControl().setWarning(translate("participants.message.empty"));
        }
      }
    } else if(source == formManageParticipants && event == DENManageParticipantsForm.ADD_PARTICIPANTS) {
      //open user search controller to manually add users in date
      userSearchCntrl = new UserSearchController(ureq, getWindowControl(), true, true, true);
      userSearchCntrl.addControllerListener(this);
      userSearchCMC = new CloseableModalController(getWindowControl(), "close", userSearchCntrl.getInitialComponent());
      userSearchCMC.activate();
    } else if(source == userSearchCntrl) {
      if(event == Event.CANCELLED_EVENT) {
        userSearchCMC.deactivate();
      } else {
View Full Code Here

    MailTemplate mailTempl = denManager.getAddedMailTemplate(ureq, subjectStr, getTranslator());
    addedNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    addedNotificationCtr.addControllerListener(this);
    VelocityContainer sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", getTranslator(), this);
    sendNotificationVC.put("notificationForm", addedNotificationCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
    notificationCmc.activate();
  }
View Full Code Here

    MailTemplate mailTempl = denManager.getRemovedMailTemplate(ureq, subjectStr, getTranslator());
    addedNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    addedNotificationCtr.addControllerListener(this);
    VelocityContainer sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", getTranslator(), this);
    sendNotificationVC.put("notificationForm", addedNotificationCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
    notificationCmc.activate();
  }
View Full Code Here

    cmsg.addEmailTo(contactList);
    contactCtr = new ContactFormController(ureq, getWindowControl(), false, false, false, false, cmsg);
    contactCtr.addControllerListener(this);
    sendMessageVC.contextPut("title", translate("participants.message"));
    sendMessageVC.put("contactForm", contactCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendMessageVC);
    notificationCmc.activate();
  }
View Full Code Here

   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == editParameterLink) {
      selectionForm = new SelectionForm("selectionform", pT);
      selectionForm.addListener(this);
      cmc = new CloseableModalController(getWindowControl(), pT.translate("close"), selectionForm, true, pT.translate("edit.parameter.header"));
      cmc.activate();
    } else if (source == selectionForm) {
      if (event == Form.EVNT_VALIDATION_OK) {
        GroupDeletionManager.getInstance().setLastUsageDuration(selectionForm.getLastUsageDuration());
        GroupDeletionManager.getInstance().setDeleteEmailDuration(selectionForm.getDeleteEmailDuration());
View Full Code Here

      MailTemplate deleteMailTemplate = createMailTemplate(pT.translate(KEY_EMAIL_SUBJECT), pT.translate(KEY_EMAIL_BODY));
      deleteMailTemplate.addToContext("lastloginduration",   Integer.toString(UserDeletionManager.getInstance().getLastLoginDuration() ));
      deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(UserDeletionManager.getInstance().getDeleteEmailDuration() ));
      deleteGroupMailCtr = new MailNotificationEditController(getWindowControl(), ureq, deleteMailTemplate, true);
      deleteGroupMailCtr.addControllerListener(this);
      cmc = new CloseableModalController(getWindowControl(), pT.translate("close"), deleteGroupMailCtr.getInitialComponent());
      cmc.activate();

    } else {
      getWindowControl().setWarning(pT.translate("nothing.selected.msg"));
    }
View Full Code Here

  @Override
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == manageDatesButton) {
      //management of dates
      DENManageDatesController datesCtr = new DENManageDatesController(ureq, getWindowControl(), ores, courseNode);
      manageDatesModalCntrll = new CloseableModalController(getWindowControl(), "close", datesCtr.getInitialComponent(), true, translate("config.dates"));
      manageDatesModalCntrll.addControllerListener(this);
      manageDatesModalCntrll.activate();
    } else if (source == manageParticipantsButton) {
      //list of participants
      DENManageParticipantsController partsCtr = new DENManageParticipantsController(ureq, getWindowControl(), ores, courseNode);
      listParticipantsModalCntrll = new CloseableModalController(getWindowControl(), "close", partsCtr.getInitialComponent(), true, translate("dates.table.list"));
      listParticipantsModalCntrll.addControllerListener(this);
      listParticipantsModalCntrll.activate();
    }
  }
View Full Code Here

   * @param ureq
   */
  private void displayMetadataEditor(UserRequest ureq) {
    editMetadataCtr = new CPMetadataEditController(ureq, getWindowControl(), currentPage, cp);
    listenTo(editMetadataCtr);
    dialogCtr = new CloseableModalController(getWindowControl(), getTranslator().translate("close"), editMetadataCtr.getInitialComponent());
    listenTo(dialogCtr);
    dialogCtr.activate();
  }
View Full Code Here

      //getWindowControl().setInfo("Hi "+ureq.getIdentity().getName()+ ", you clicked on the button xsmall");
      // to test ajax mode, switch visible/invisble
      pFirstInvisible.setVisible(!pFirstInvisible.isVisible());
    } else if (source == buttonSmall){
      //showInfo("info.button.small", ureq.getIdentity().getName());
      CloseableModalController cmc = new CloseableModalController(getWindowControl(), "close me", link);
      cmc.activate();
    } else if (source == button){
      showInfo("info.button.default", ureq.getIdentity().getName());     
    } else if (source == link){
      showInfo("info.button.link", ureq.getIdentity().getName());     
    } else if (source == linkBack){
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController

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.