Search in sources :

Example 76 with CloseableModalController

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

the class QuestionListController method doConfirmCopy.

protected void doConfirmCopy(UserRequest ureq, List<QuestionItemShort> items) {
    copyConfirmationCtrl = new CopyConfirmationController(ureq, getWindowControl(), items, getSource());
    listenTo(copyConfirmationCtrl);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), copyConfirmationCtrl.getInitialComponent(), true, translate("confirm.copy.title"), true);
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 77 with CloseableModalController

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

the class QuestionListController method doOpenCreateRepositoryTest.

private void doOpenCreateRepositoryTest(UserRequest ureq, List<QuestionItemShort> items, String type) {
    removeAsListenerAndDispose(cmc);
    removeAsListenerAndDispose(addController);
    RepositoryHandler handler = repositoryHandlerFactory.getRepositoryHandler(type);
    addController = handler.createCreateRepositoryEntryController(ureq, getWindowControl());
    addController.setCreateObject(new QItemList(items));
    listenTo(addController);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryHandler(org.olat.repository.handlers.RepositoryHandler) QItemList(org.olat.modules.qpool.model.QItemList)

Example 78 with CloseableModalController

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

the class QuestionListController method doOpenRepositoryImport.

private void doOpenRepositoryImport(UserRequest ureq) {
    removeAsListenerAndDispose(importTestCtrl);
    String[] allowed;
    if (qtiModule.isCreateResourcesEnabled()) {
        allowed = new String[] { ImsQTI21Resource.TYPE_NAME, TestFileResource.TYPE_NAME, SurveyFileResource.TYPE_NAME };
    } else {
        allowed = new String[] { ImsQTI21Resource.TYPE_NAME };
    }
    importTestCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, allowed, null, translate("import.repository"), false, false, false, true, Can.copyable);
    listenTo(importTestCtrl);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), importTestCtrl.getInitialComponent(), true, translate("import.repository"));
    cmc.setContextHelp(getTranslator(), "Data Management#qb_share");
    cmc.activate();
    listenTo(cmc);
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 79 with CloseableModalController

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

the class QuestionListController method doChooseNewItemType.

private void doChooseNewItemType(UserRequest ureq) {
    removeAsListenerAndDispose(newItemOptionsCtrl);
    if (getSource() instanceof TaxonomyLevelItemsSource) {
        TaxonomyLevelItemsSource tliSource = (TaxonomyLevelItemsSource) getSource();
        newItemOptionsCtrl = new NewItemOptionsController(ureq, getWindowControl(), getSecurityCallback(), tliSource.getTaxonomyLevel(), getSource().isAdminItemSource());
    } else {
        newItemOptionsCtrl = new NewItemOptionsController(ureq, getWindowControl(), getSecurityCallback(), getSource().isAdminItemSource());
    }
    listenTo(newItemOptionsCtrl);
    removeAsListenerAndDispose(cmc);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), newItemOptionsCtrl.getInitialComponent(), true, translate("new.item"));
    cmc.activate();
    listenTo(cmc);
}
Also used : TaxonomyLevelItemsSource(org.olat.modules.qpool.ui.datasource.TaxonomyLevelItemsSource) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 80 with CloseableModalController

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

the class QuestionListController method doOpenFileImport.

private void doOpenFileImport(UserRequest ureq) {
    removeAsListenerAndDispose(importItemCtrl);
    importItemCtrl = new ImportController(ureq, getWindowControl(), getSource());
    listenTo(importItemCtrl);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), importItemCtrl.getInitialComponent(), true, translate("import.item"));
    cmc.activate();
    listenTo(cmc);
}
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