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);
}
}
Aggregations