use of org.olat.repository.controllers.ReferencableEntriesSearchController in project openolat by klemens.
the class CourseOverviewController method doSearchRepoEntries.
private void doSearchRepoEntries(UserRequest ureq, SearchType type, String title) {
removeAsListenerAndDispose(repoSearchCtr);
removeAsListenerAndDispose(cmc);
RepositoryEntryFilter filter = new ManagedEntryfilter();
repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.getCourseTypeName() }, filter, translate("choose"), false, false, true, true, Can.all);
repoSearchCtr.setUserObject(type);
listenTo(repoSearchCtr);
cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
}
use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.
the class EPMapRunController method popUpCreateMapFromTemplateBox.
private void popUpCreateMapFromTemplateBox(UserRequest ureq) {
String title = translate("create.map");
String commandLabel = translate("create.map.selectTemplate");
removeAsListenerAndDispose(searchTemplateCtrl);
searchTemplateCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { EPTemplateMapResource.TYPE_NAME }, commandLabel, false, false, false, false);
listenTo(searchTemplateCtrl);
createMapBox = new CloseableModalController(getWindowControl(), title, searchTemplateCtrl.getInitialComponent(), true, title);
createMapBox.setCustomWindowCSS("o_sel_add_map_template_window");
listenTo(createMapBox);
createMapBox.activate();
}
use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.
the class FeedNodeEditController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == chooseButton || source == changeButton) {
searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq, resourceTypeName, translate(BUTTON_CHOOSE_FEED));
listenTo(searchController);
cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true, translate(BUTTON_CREATE_FEED));
cmc.activate();
} else if (source == previewLink) {
// Preview as modal dialogue only if the config is valid
RepositoryEntry re = node.getReferencedRepositoryEntry();
if (re == null) {
// The repository entry has been deleted meanwhile.
showError("error.repoentrymissing");
} else {
FeedSecurityCallback callback = new FeedPreviewSecurityCallback();
feedController = uiFactory.createMainController(re.getOlatResource(), ureq, getWindowControl(), callback, course.getResourceableId(), node.getIdent());
cmcFeedCtr = new CloseableModalController(getWindowControl(), translate("command.close"), feedController.getInitialComponent());
listenTo(cmcFeedCtr);
cmcFeedCtr.activate();
}
} else if (source == editLink) {
boolean launched = CourseNodeFactory.getInstance().launchReferencedRepoEntryEditor(ureq, getWindowControl(), node);
if (!launched) {
RepositoryEntry re = node.getReferencedRepositoryEntry();
if (re == null) {
showError("error.repoentrymissing");
} else {
showError("error.wrongtype");
}
}
}
}
use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.
the class AssignmentEditController method doSelectForm.
private void doSelectForm(UserRequest ureq) {
if (searchFormCtrl != null)
return;
searchFormCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, EvaluationFormResource.TYPE_NAME, translate("select.form"));
listenTo(searchFormCtrl);
cmc = new CloseableModalController(getWindowControl(), translate("close"), searchFormCtrl.getInitialComponent(), true, translate("select.form"));
cmc.suppressDirtyFormWarningOnClose();
listenTo(cmc);
cmc.activate();
}
use of org.olat.repository.controllers.ReferencableEntriesSearchController 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