Search in sources :

Example 6 with SelectionElement

use of org.olat.core.gui.components.form.flexible.elements.SelectionElement in project OpenOLAT by OpenOLAT.

the class CourseOptionsController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == addGlossaryCommand) {
        glossarySearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, GlossaryResource.TYPE_NAME, translate("select"));
        listenTo(glossarySearchCtr);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), glossarySearchCtr.getInitialComponent());
        listenTo(cmc);
        cmc.activate();
    } else if (source == removeGlossaryCommand) {
        doRemoveGlossary();
        setSaveButtonDirty();
    } else if (source == addFolderCommand) {
        if (checkForFolderNodesAdd(ureq)) {
            folderSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, SharedFolderFileResource.TYPE_NAME, translate("select"));
            listenTo(folderSearchCtr);
            cmc = new CloseableModalController(getWindowControl(), translate("close"), folderSearchCtr.getInitialComponent());
            listenTo(cmc);
            cmc.activate();
        }
    } else if (source == removeFolderCommand) {
        if (checkForFolderNodesRemove(ureq)) {
            doRemoveSharedFolder();
            setSaveButtonDirty();
        }
    } else if (toolbarEl == source) {
        if (!toolbarEl.isSelected(0)) {
            showWarning("chkbx.toolbar.off.warning");
        }
        updateToolbar();
        setSaveButtonDirty();
    } else if (source instanceof SelectionElement || source == folderReadOnlyEl || source == menuEl) {
        setSaveButtonDirty();
    } else if (saveButton == source) {
        doSave(ureq);
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) SelectionElement(org.olat.core.gui.components.form.flexible.elements.SelectionElement) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Aggregations

SelectionElement (org.olat.core.gui.components.form.flexible.elements.SelectionElement)6 UserManager (org.olat.user.UserManager)4 MultipleSelectionElement (org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 Translator (org.olat.core.gui.translator.Translator)2 ReferencableEntriesSearchController (org.olat.repository.controllers.ReferencableEntriesSearchController)2