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

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


        String relPath = TACourseNode.getTaskFolderPathRelToFolderRoot(course, node);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(relPath, null);
        OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(translate("taskfolder"), rootFolder);
        namedFolder.setLocalSecurityCallback(getTaskFolderSecCallback(relPath));
        frc = new FolderRunController(namedFolder, false, ureq, getWindowControl());
        CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("folder.close"), frc
            .getInitialComponent());
        cmc.activate();
      } else {
        // already assigned task => open dialog with warn
        String[] args = new String[] { new Integer(assignedProps.size()).toString() };       
        dialogBoxController = this.activateOkCancelDialog(ureq, "", getTranslator().translate("taskfolder.overwriting.confirm", args), dialogBoxController);
        List cs = new ArrayList();
        cs.add(dialogBoxController);
        LayoutController vcc = new LayoutController(Layouts.VERTICAL, cs);             
      }
    } else if (source == modulesForm) {
      if (event == Form.EVNT_FORM_CANCELLED) {
        return;
      } else if (event == Form.EVNT_VALIDATION_OK) {
        config.set(TACourseNode.CONF_TASK_ENABLED, new Boolean(modulesForm.hasTask()));
        config.set(TACourseNode.CONF_DROPBOX_ENABLED, new Boolean(modulesForm.hasDropbox()));       
        config.set(TACourseNode.CONF_RETURNBOX_ENABLED, new Boolean(modulesForm.hasReturnbox()));       
        config.set(TACourseNode.CONF_SCORING_ENABLED, new Boolean(modulesForm.hasScoring()));
        config.set(TACourseNode.CONF_SOLUTION_ENABLED, new Boolean(modulesForm.hasSolution()));
        myTabbedPane.setEnabled(taskTabPosition, modulesForm.hasTask());
        if (modulesForm.hasTask()) {
          accessabilityVC.put("taskCondition", taskConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(taskConditionC.getInitialComponent());
        }
        myTabbedPane.setEnabled(dropboxTabPosition, modulesForm.hasDropbox());
        if (modulesForm.hasDropbox()) {
          accessabilityVC.put("dropCondition", dropConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(dropConditionC.getInitialComponent());
        }
        //add/remove returnboxConditionC     
        if (modulesForm.hasReturnbox()) {
          accessabilityVC.put("returnboxCondition", returnboxConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(returnboxConditionC.getInitialComponent());
        }       
        myTabbedPane.setEnabled(scoringTabPosition, modulesForm.hasScoring());
        if (modulesForm.hasScoring()) {
          accessabilityVC.put("scoringCondition", scoringConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(scoringConditionC.getInitialComponent());
        }
        myTabbedPane.setEnabled(solutionTabPosition, modulesForm.hasSolution());
        if (modulesForm.hasSolution()) {
          accessabilityVC.put("solutionCondition", solutionConditionC.getInitialComponent());
        } else {
          accessabilityVC.remove(solutionConditionC.getInitialComponent());
        }
       
        fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
        return;
      }
    } else if (source == dropboxForm) {
      if (event == Form.EVNT_FORM_CANCELLED) {
        return;
      } else if (event == Form.EVNT_VALIDATION_OK) {
        config.set(TACourseNode.CONF_DROPBOX_ENABLEMAIL, new Boolean(dropboxForm.mailEnabled()));
        config.set(TACourseNode.CONF_DROPBOX_CONFIRMATION, dropboxForm.getConfirmation());
        fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
        return;
      }
    } else if (source == vfButton) {     
      if (log.isDebug()) log.debug("Event for sampleVC");
      // switch to new dialog
      OlatNamedContainerImpl namedContainer = TACourseNode.getNodeFolderContainer(node, course.getCourseEnvironment());
      Quota quota = QuotaManager.getInstance().getCustomQuota(namedContainer.getRelPath());
      if (quota == null) {
        Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
        quota = QuotaManager.getInstance().createQuota(namedContainer.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
      }
      VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
      namedContainer.setLocalSecurityCallback(secCallback);
      CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"),
        new FolderRunController(namedContainer, false, ureq, getWindowControl()).getInitialComponent());
      cmc.activate();
     
      if (log.isDebug()) log.debug("Switch to sample folder dialog : DONE");
      return;
    } else if (source == editScoringConfigButton){
      scoringController.setDisplayOnly(false);
View Full Code Here


        String relPath = TACourseNode.getTaskFolderPathRelToFolderRoot(course, node);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(relPath, null);
        OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(translate("taskfolder"), rootFolder);
        namedFolder.setLocalSecurityCallback(getTaskFolderSecCallback(relPath));
        frc = new FolderRunController(namedFolder, false, urequest, getWindowControl());
        CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("folder.close"), frc
            .getInitialComponent());
        cmc.activate();
        fireEvent(urequest, Event.CHANGED_EVENT);
      }
    } else if (source == taskController) {
      if (event == Event.CANCELLED_EVENT) {
        return;
View Full Code Here

            List<Identity> objects = identitiesTableModel.getIdentities(tmse.getSelection());
            toTransfer = objects;
            if (transferMailCtr != null) transferMailCtr.dispose();
            transferMailCtr = new MailNotificationEditController(getWindowControl(), ureq, transferUserMailTempl, true);
            transferMailCtr.addControllerListener(this);
            cmc = new CloseableModalController(getWindowControl(), translate("close"), transferMailCtr.getInitialComponent());
            cmc.activate();
            return; // don't execute super method
          }
        }
      }
View Full Code Here

      addController = new RepositoryAddController(ureq, getWindowControl(), getAction(ACTION_CREATE));
      addController.addControllerListener(this);
      if (cmc != null) {
        cmc.dispose();
      }
      cmc = new CloseableModalController(getWindowControl(), trans.translate("close"), addController.getInitialComponent());
      cmc.addControllerListener(this);
      cmc.activate();
    }
    if (source == importRessourceButton) {
      if (addController != null) {
        addController.dispose();
      }
      addController = new RepositoryAddController(ureq, getWindowControl(), getAction(ACTION_IMPORT));
      addController.addControllerListener(this);
      if (cmc != null) {
        cmc.dispose();
      }
      cmc = new CloseableModalController(getWindowControl(), trans.translate("close"), addController.getInitialComponent());
      cmc.addControllerListener(this);
      cmc.activate();
    }
  }
View Full Code Here

        }
        if (previewModalCtr != null) {
          previewModalCtr.dispose();
        }
        previewCtr = typeToLaunch.getLaunchController(ores, null, ureq, getWindowControl());
        previewModalCtr = new CloseableModalController(getWindowControl(), trans.translate("referencableSearch.preview.close"), previewCtr
            .getInitialComponent());
        previewModalCtr.activate();

      } else if (cmd.equals(RepositoryTableModel.TABLE_ACTION_SELECT_LINK)) {
        // done, user selected a repo entry
        selectedRepositoryEntry = searchCtr.getSelectedEntry();
        fireEvent(ureq, EVENT_REPOSITORY_ENTRY_SELECTED);
      }
      initLinks();
    } else if (source == addController) { // process add controller finished()
      if ((addController.getAddedEntry() != null)
          && (OresHelper.isOfType(addController.getAddedEntry().getOlatResource(), CourseModule.class))) {
        if (event.equals(Event.DONE_EVENT)) {
          cmc.deactivate();
          chooseStepsController = new ChooseStepsController(ureq, getWindowControl(), addController.getAddedEntry());
          chooseStepsController.addControllerListener(this);
          cmc = new CloseableModalController(getWindowControl(), trans.translate("close"), chooseStepsController.getInitialComponent());
          cmc.activate();
        } else if (event.equals(Event.CANCELLED_EVENT)) {
          cmc.deactivate();
        } else if (event.equals(Event.FAILED_EVENT)) {
          getWindowControl().setError(trans.translate("add.failed"));
View Full Code Here

            baGetNodePassed.setDisplayName(translate("bulk.action.getnodepassed"));
            bulkActions.add(baGetNodePassed);
         
            iowc = new InOutWizardController(ureq, bulkActions, getWindowControl());           
            listenTo(iowc);
            cmc = new CloseableModalController(getWindowControl(), translate("close"), iowc.getInitialComponent());
            cmc.activate();
          }
        }
      } else if (source == iowc) {
        if (event == Event.DONE_EVENT || event == Event.CANCELLED_EVENT) {
View Full Code Here

          editSingleDateForm.setComment(calEvent.getComment());
          editSingleDateForm.setLocation(calEvent.getLocation());
          editSingleDateForm.setNumParts(calEvent.getNumParticipants());
          editSingleDateForm.setFormDate(calEvent.getBegin());
          editSingleDateForm.setDuration(denManager.getDurationAsString(calEvent));
          editDateModalCntrll = new CloseableModalController(getWindowControl(), "close", editSingleDateForm.getInitialComponent(), true, translate("dates.edit"));
        } else if(selectedDates.cardinality() > 1) {
          editMultipleDatesForm = new DENDatesForm(ureq, getWindowControl(), getTranslator(), DENDatesForm.EDIT_MULTIPLE_DATES_LAYOUT);
          editMultipleDatesForm.addControllerListener(this);
          editDateModalCntrll = new CloseableModalController(getWindowControl(), "close", editMultipleDatesForm.getInitialComponent(), true, translate("dates.edit"));
        }
        //persist dates
        denManager.persistDENSettings(editTableData.getObjects(), course, denCourseNode);
        editDateModalCntrll.activate();
      } else if (tmse.getAction().equals(DENEditTableDataModel.DELETE_ACTION)) {
View Full Code Here

      }
    } else if(authorOptions == source) {
      if(event == AuthorOptionsForm.MANAGE_EVENT) {
        //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(event == AuthorOptionsForm.LIST_EVENT) {
        //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

        String toBeViewed = ureq.getParameter(ACTION_VIEWLOG_PACKAGE);
        if (toBeViewed == null) return; // should not happen
        if (logViewerCtr != nulllogViewerCtr.dispose();
        logViewerCtr = new LogRealTimeViewerController(ureq, getWindowControl(), toBeViewed, Level.ALL, true);
        if (cmc != nullcmc.dispose();
        cmc = new CloseableModalController(getWindowControl(), getTranslator().translate("close"), logViewerCtr.getInitialComponent());
        cmc.addControllerListener(this);
        cmc.activate();
      }
      // push loglevel list again
      event(ureq, tabbedPane, new TabbedPaneChangedEvent(null, myLoglevels));
View Full Code Here

    if (source == this.previewButton) {
      if (this.hpDispC != null) removeAsListenerAndDispose(this.hpDispC);
      this.hpDispC = new HomePageDisplayController(ureq, getWindowControl(), homePageConfig);
      listenTo(hpDispC);
      if (this.clc != null) removeAsListenerAndDispose(clc);
      this.clc = new CloseableModalController(getWindowControl(), this.translator.translate("command.closehp"), this.hpDispC
          .getInitialComponent());
      listenTo(clc);
      this.clc.insertHeaderCss();
      this.clc.activate();
    }
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.