Search in sources :

Example 41 with CloseableModalController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.

the class GTASampleSolutionsEditController method doCreateSolution.

private void doCreateSolution(UserRequest ureq) {
    newSolutionCtrl = new NewSolutionController(ureq, getWindowControl(), solutionContainer);
    listenTo(newSolutionCtrl);
    cmc = new CloseableModalController(getWindowControl(), "close", newSolutionCtrl.getInitialComponent());
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 42 with CloseableModalController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.

the class GTASampleSolutionsEditController method doAddSolution.

private void doAddSolution(UserRequest ureq) {
    addSolutionCtrl = new EditSolutionController(ureq, getWindowControl(), solutionDir, solutionContainer);
    listenTo(addSolutionCtrl);
    String title = translate("add.solution");
    cmc = new CloseableModalController(getWindowControl(), null, addSolutionCtrl.getInitialComponent(), true, title, false);
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 43 with CloseableModalController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.

the class MembersSelectorFormFragment method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == chooseGroupCoachesLink) {
        removeAsListenerAndDispose(cmc);
        removeAsListenerAndDispose(groupChooseCoaches);
        groupChooseCoaches = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupCoachSelectionList));
        listenTo(groupChooseCoaches);
        String title = chooseGroupCoachesLink.getLinkTitleText();
        cmc = new CloseableModalController(getWindowControl(), "close", groupChooseCoaches.getInitialComponent(), true, title);
        listenTo(cmc);
        cmc.activate();
        setFormCanSubmit(false);
    } else if (source == chooseGroupParticipantsLink) {
        removeAsListenerAndDispose(cmc);
        removeAsListenerAndDispose(groupChooseParticipants);
        groupChooseParticipants = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupParticipantsSelectionList));
        listenTo(groupChooseParticipants);
        String title = chooseGroupParticipantsLink.getLabelText();
        cmc = new CloseableModalController(getWindowControl(), "close", groupChooseParticipants.getInitialComponent(), true, title);
        listenTo(cmc);
        cmc.activate();
        setFormCanSubmit(false);
    } else if (source == chooseAreasCoachesLink) {
        // already areas -> choose areas
        removeAsListenerAndDispose(cmc);
        removeAsListenerAndDispose(areaChooseCoaches);
        areaChooseCoaches = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaCoachSelectionList));
        listenTo(areaChooseCoaches);
        String title = chooseAreasCoachesLink.getLinkTitleText();
        cmc = new CloseableModalController(getWindowControl(), "close", areaChooseCoaches.getInitialComponent(), true, title);
        listenTo(cmc);
        cmc.activate();
        setFormCanSubmit(false);
    } else if (source == chooseAreasParticipantsLink) {
        // already areas -> choose areas
        removeAsListenerAndDispose(cmc);
        removeAsListenerAndDispose(areaChooseParticipants);
        areaChooseParticipants = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaParticipantsSelectionList));
        listenTo(areaChooseParticipants);
        String title = chooseAreasParticipantsLink.getLabelText();
        cmc = new CloseableModalController(getWindowControl(), "close", areaChooseParticipants.getInitialComponent(), true, title);
        listenTo(cmc);
        cmc.activate();
        setFormCanSubmit(false);
    }
}
Also used : GroupSelectionController(org.olat.course.condition.GroupSelectionController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) AreaSelectionController(org.olat.course.condition.AreaSelectionController)

Example 44 with CloseableModalController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.

the class UnkownItemEditorController method doConfirmConversion.

private void doConfirmConversion(UserRequest ureq) {
    Report report = new AlienItemAnalyzer(item).analyze();
    confirmationCtrl = new UnkownItemConversionConfirmationController(ureq, getWindowControl(), report);
    listenTo(confirmationCtrl);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), confirmationCtrl.getInitialComponent(), true, translate("convert.alien"));
    listenTo(cmc);
    cmc.activate();
}
Also used : Report(org.olat.ims.qti21.model.xml.AlienItemAnalyzer.Report) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) AlienItemAnalyzer(org.olat.ims.qti21.model.xml.AlienItemAnalyzer)

Example 45 with CloseableModalController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.

the class ScormResultDetailsController method event.

@Override
public void event(UserRequest ureq, Controller source, Event event) {
    if (source == summaryTableCtr) {
        TableEvent tEvent = (TableEvent) event;
        if (tEvent.getActionId().equals("sel")) {
            TableGuiConfiguration tableConfig = new TableGuiConfiguration();
            tableConfig.setPreferencesOffered(true, "scormAssessmentDetails");
            removeAsListenerAndDispose(cmiTableCtr);
            cmiTableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator());
            listenTo(cmiTableCtr);
            cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.itemId", 0, null, ureq.getLocale()));
            cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.translatedKey", 1, null, ureq.getLocale()));
            cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.key", 2, null, ureq.getLocale()));
            cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.value", 3, null, ureq.getLocale()));
            // <BPS-252> BPS-252_3
            int rowId = tEvent.getRowId();
            List<CmiData> data = ((SummaryTableDataModelMultiResults) summaryTableCtr.getTableDataModel()).getObject(rowId);
            cmiTableCtr.setTableDataModel(new CmiTableDataModel(getTranslator(), data));
            // </BPS-252> BPS-252_3
            removeAsListenerAndDispose(cmc);
            cmc = new CloseableModalController(getWindowControl(), translate("close"), cmiTableCtr.getInitialComponent());
            listenTo(cmc);
            cmc.activate();
        }
    } else if (source == resetConfirmationBox) {
        if (DialogBoxUIFactory.isOkEvent(event)) {
            // delete scorm
            String username = assessedUserCourseEnv.getIdentityEnvironment().getIdentity().getName();
            CourseEnvironment courseEnv = assessedUserCourseEnv.getCourseEnvironment();
            ScormAssessmentManager.getInstance().deleteResults(username, courseEnv, node);
            fireEvent(ureq, Event.DONE_EVENT);
        }
    }
}
Also used : TableEvent(org.olat.core.gui.components.table.TableEvent) CourseEnvironment(org.olat.course.run.environment.CourseEnvironment) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) TableController(org.olat.core.gui.components.table.TableController) TableGuiConfiguration(org.olat.core.gui.components.table.TableGuiConfiguration) DefaultColumnDescriptor(org.olat.core.gui.components.table.DefaultColumnDescriptor)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)789 RepositoryEntry (org.olat.repository.RepositoryEntry)52 ArrayList (java.util.ArrayList)48 Identity (org.olat.core.id.Identity)42 ReferencableEntriesSearchController (org.olat.repository.controllers.ReferencableEntriesSearchController)38 VFSContainer (org.olat.core.util.vfs.VFSContainer)24 Component (org.olat.core.gui.components.Component)20 ContactMessage (org.olat.core.util.mail.ContactMessage)20 ContactFormController (org.olat.modules.co.ContactFormController)20 File (java.io.File)17 List (java.util.List)16 UserSearchController (org.olat.admin.user.UserSearchController)16 TableEvent (org.olat.core.gui.components.table.TableEvent)16 TableMultiSelectEvent (org.olat.core.gui.components.table.TableMultiSelectEvent)16 ContactList (org.olat.core.util.mail.ContactList)16 MailTemplate (org.olat.core.util.mail.MailTemplate)14 OLATResourceable (org.olat.core.id.OLATResourceable)12 MailNotificationEditController (org.olat.core.util.mail.MailNotificationEditController)12 OLATSecurityException (org.olat.core.logging.OLATSecurityException)10 Roles (org.olat.core.id.Roles)8