use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.
the class TableController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
*/
public void event(final UserRequest ureq, final Component source, final Event event) {
if (source == table) {
String cmd = event.getCommand();
if (cmd.equalsIgnoreCase(Table.COMMAND_SORTBYCOLUMN)) {
tableSort.setDirty(true);
} else if (!cmd.equalsIgnoreCase(Table.COMMAND_SHOW_PAGES) && !cmd.equalsIgnoreCase(Table.COMMAND_PAGEACTION_SHOWALL)) {
// forward to table controller listener
fireEvent(ureq, event);
}
} else if (source == contentVc) {
handleCommandsOfTableVcContainer(ureq, event);
} else if (source == preferenceLink && tableConfig.getPreferencesKey() != null) {
colsChoice = getColumnListAndTheirVisibility();
removeAsListenerAndDispose(cmc);
cmc = new CloseableCalloutWindowController(ureq, getWindowControl(), colsChoice, preferenceLink, translate("title.changecols"), true, "");
listenTo(cmc);
cmc.activate();
} else if (source == downloadLink && tableConfig.isDownloadOffered()) {
TableExporter tableExporter = tableConfig.getDownloadOffered();
MediaResource mr = tableExporter.export(table);
ureq.getDispatchResult().setResultingMediaResource(mr);
} else if (source == colsChoice) {
if (event == Choice.EVNT_VALIDATION_OK) {
// sideeffect on table and prefs
applyAndcheckChangedColumnsChoice(ureq, colsChoice.getSelectedRows());
} else if (event == Choice.EVNT_FORM_RESETED) {
// sideeffect on table and prefs
List<Integer> visibleCols = table.getDefaultVisibleColumnsToResetColumnsChoice();
applyAndcheckChangedColumnsChoice(ureq, visibleCols);
} else {
// cancelled
cmc.deactivate();
}
} else if (source == resetLink) {
table.setSearchString(null);
modelChanged();
}
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.
the class SendDocumentsByEMailController method doAddEmail.
protected void doAddEmail(UserRequest ureq) {
String title = translate("add.email");
removeAsListenerAndDispose(emailCalloutCtrl);
boolean allowExtern = FolderConfig.getSendDocumentToExtern();
emailCalloutCtrl = new EMailCalloutCtrl(ureq, getWindowControl(), allowExtern);
listenTo(emailCalloutCtrl);
removeAsListenerAndDispose(calloutCtrl);
calloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), emailCalloutCtrl.getInitialComponent(), addEmailLink, title, true, null);
listenTo(calloutCtrl);
calloutCtrl.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.
the class IdentityListCourseNodeController method doOpenTools.
private void doOpenTools(UserRequest ureq, AssessedIdentityElementRow row, FormLink link) {
removeAsListenerAndDispose(toolsCtrl);
removeAsListenerAndDispose(toolsCalloutCtrl);
Identity assessedIdentity = securityManager.loadIdentityByKey(row.getIdentityKey());
toolsCtrl = createCalloutController(ureq, assessedIdentity);
listenTo(toolsCtrl);
toolsCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), toolsCtrl.getInitialComponent(), link.getFormDispatchId(), "", true, "");
listenTo(toolsCalloutCtrl);
toolsCalloutCtrl.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.
the class AssessmentIdentityCourseController method doSelectCourseNode.
private void doSelectCourseNode(UserRequest ureq) {
removeAsListenerAndDispose(courseNodeChooserCtrl);
removeAsListenerAndDispose(courseNodeChooserCalloutCtrl);
courseNodeChooserCtrl = new CourseNodeSelectionController(ureq, getWindowControl(), courseEntry);
listenTo(courseNodeChooserCtrl);
if (currentCourseNode != null) {
courseNodeChooserCtrl.selectedCourseNode(currentCourseNode);
} else {
courseNodeChooserCtrl.selectedCourseNode(treeOverviewCtrl.getSelectedCourseNode());
}
courseNodeChooserCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), courseNodeChooserCtrl.getInitialComponent(), courseNodeSelectionLink, "", true, "");
listenTo(courseNodeChooserCalloutCtrl);
courseNodeChooserCalloutCtrl.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.
the class CalendarPersonalConfigurationController method doShowFeedURL.
private void doShowFeedURL(UserRequest ureq, FormLink link, CalendarPersonalConfigurationRow row) {
removeAsListenerAndDispose(feedUrlCtrl);
removeAsListenerAndDispose(calloutCtrl);
KalendarRenderWrapper calendarWrapper = row.getWrapper();
if (!StringHelper.containsNonWhitespace(row.getToken())) {
calendarWrapper.setToken(RandomStringUtils.randomAlphanumeric(6));
calendarManager.saveCalendarConfigForIdentity(calendarWrapper, getIdentity());
}
String calFeedLink = row.getFeedUrl(getIdentity());
feedUrlCtrl = new CalendarURLController(ureq, getWindowControl(), calFeedLink);
listenTo(feedUrlCtrl);
calloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), feedUrlCtrl.getInitialComponent(), link.getFormDispatchId(), "", true, "");
listenTo(calloutCtrl);
calloutCtrl.activate();
}
Aggregations