Search in sources :

Example 66 with CloseableModalController

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

the class ViteroBookingsEditController method openGroup.

protected void openGroup(UserRequest ureq, ViteroBooking booking) {
    try {
        if (viteroManager.isUserOf(booking, getIdentity())) {
            String url = viteroManager.getURLToGroup(ureq.getIdentity(), booking);
            if (url == null) {
                showError("error.sessionCodeNull");
            } else {
                viteroGroupVC = createVelocityContainer("opengroup");
                viteroGroupVC.contextPut("groupUrl", url);
                removeAsListenerAndDispose(cmc);
                cmc = new CloseableModalController(getWindowControl(), translate("close"), viteroGroupVC);
                listenTo(cmc);
                cmc.activate();
            }
        } else {
            String title = translate("booking.group");
            String text = translate("booking.group.warning");
            List<String> buttonLabels = Collections.singletonList(translate("ok"));
            warningGroupCtr = activateGenericDialog(ureq, title, text, buttonLabels, warningGroupCtr);
        }
    } catch (VmsNotAvailableException e) {
        showError(VmsNotAvailableException.I18N_KEY);
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) VmsNotAvailableException(org.olat.modules.vitero.manager.VmsNotAvailableException)

Example 67 with CloseableModalController

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

the class ViteroBookingsController method openGroup.

protected void openGroup(UserRequest ureq, ViteroBooking booking) {
    try {
        String url = viteroManager.getURLToGroup(ureq.getIdentity(), booking);
        viteroGroupVC = createVelocityContainer("opengroup");
        viteroGroupVC.contextPut("groupUrl", url);
        removeAsListenerAndDispose(cmc);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), viteroGroupVC);
        listenTo(cmc);
        cmc.activate();
    } catch (VmsNotAvailableException e) {
        showError(VmsNotAvailableException.I18N_KEY);
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) VmsNotAvailableException(org.olat.modules.vitero.manager.VmsNotAvailableException)

Example 68 with CloseableModalController

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

the class OrdersController method doSelectOrder.

private void doSelectOrder(UserRequest ureq, OrderTableItem order) {
    removeAsListenerAndDispose(detailController);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Order.class, order.getOrderKey());
    WindowControl bwControl = addToHistory(ureq, ores, null);
    detailController = new OrderDetailController(ureq, bwControl, order.getOrderKey());
    detailController.hideBackLink();
    listenTo(detailController);
    if (stackPanel != null) {
        stackPanel.pushController(order.getOrderNr(), detailController);
    } else {
        cmc = new CloseableModalController(getWindowControl(), translate("close"), detailController.getInitialComponent(), true, translate("order.booking"));
        cmc.activate();
        listenTo(cmc);
    }
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 69 with CloseableModalController

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

the class BCCourseNodeEditForm method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (folderTargetChoose.isSelected(0)) {
        sharedFolderWarning.setVisible(false);
    } else {
        if (isSharedfolderNotPresent()) {
            sharedFolderWarning.setVisible(true);
        } else {
            sharedFolderWarning.setVisible(false);
        }
        if (node.isSharedFolder()) {
            sharedFolderInfo.setVisible(course.getCourseConfig().isSharedFolderReadOnlyMount());
        } else {
            sharedFolderInfo.setVisible(false);
        }
    }
    if (source == folderTargetChoose) {
        subPath.setVisible(folderTargetChoose.isSelected(1));
        chooseFolder.setVisible(folderTargetChoose.isSelected(1));
        createFolder.setVisible(folderTargetChoose.isSelected(1));
        if (folderTargetChoose.isSelected(1)) {
            node.getModuleConfiguration().setBooleanEntry(BCCourseNodeEditController.CONFIG_AUTO_FOLDER, false);
            String path = node.getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH);
            if (StringHelper.containsNonWhitespace(path)) {
                subPath.setValue(path);
            } else {
                subPath.setValue(translate("subPathLab.dummy"));
            }
        } else {
            node.getModuleConfiguration().setBooleanEntry(BCCourseNodeEditController.CONFIG_AUTO_FOLDER, true);
            node.getModuleConfiguration().setStringValue(BCCourseNodeEditController.CONFIG_SUBPATH, "");
        }
        fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
        createFolder.setVisible(folderTargetChoose.isSelected(1));
    } else if (source == createFolder) {
        createFolderForm = new BCCourseNodeEditCreateFolderForm(ureq, getWindowControl(), course, node);
        listenTo(createFolderForm);
        String title = translate("chooseFolder");
        cmc = new CloseableModalController(getWindowControl(), translate("close"), createFolderForm.getInitialComponent(), true, title);
        listenTo(cmc);
        cmc.activate();
    } else if (source == chooseFolder) {
        VFSContainer namedContainer = course.getCourseFolderContainer();
        chooseForm = new BCCourseNodeEditChooseFolderForm(ureq, getWindowControl(), namedContainer);
        listenTo(chooseForm);
        String title = translate("createFolder");
        cmc = new CloseableModalController(getWindowControl(), translate("close"), chooseForm.getInitialComponent(), true, title);
        listenTo(cmc);
        cmc.activate();
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) VFSContainer(org.olat.core.util.vfs.VFSContainer)

Example 70 with CloseableModalController

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

the class CPDisplayController method selectPagesToPrint.

private void selectPagesToPrint(UserRequest ureq) {
    removeAsListenerAndDispose(printController);
    removeAsListenerAndDispose(printPopup);
    printController = new CPSelectPrintPagesController(ureq, getWindowControl(), ctm);
    listenTo(printController);
    printPopup = new CloseableModalController(getWindowControl(), "cancel", printController.getInitialComponent(), true, translate("print.node.list.title"));
    listenTo(printPopup);
    printPopup.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

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