Search in sources :

Example 1 with CloseableCalloutWindowController

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();
    }
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) MediaResource(org.olat.core.gui.media.MediaResource) ArrayList(java.util.ArrayList) List(java.util.List)

Example 2 with CloseableCalloutWindowController

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();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 3 with CloseableCalloutWindowController

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();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) Identity(org.olat.core.id.Identity)

Example 4 with CloseableCalloutWindowController

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();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 5 with CloseableCalloutWindowController

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();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) KalendarRenderWrapper(org.olat.commons.calendar.ui.components.KalendarRenderWrapper)

Aggregations

CloseableCalloutWindowController (org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)122 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)12 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)8 ArrayList (java.util.ArrayList)6 List (java.util.List)6 Component (org.olat.core.gui.components.Component)6 Link (org.olat.core.gui.components.link.Link)6 Identity (org.olat.core.id.Identity)6 RepositoryEntry (org.olat.repository.RepositoryEntry)6 RepositoryEntrySmallDetailsController (org.olat.repository.ui.author.RepositoryEntrySmallDetailsController)6 UserSearchController (org.olat.admin.user.UserSearchController)4 CalloutSettings (org.olat.core.gui.control.generic.closablewrapper.CalloutSettings)4 NamingException (javax.naming.NamingException)2 LdapContext (javax.naming.ldap.LdapContext)2 KalendarRenderWrapper (org.olat.commons.calendar.ui.components.KalendarRenderWrapper)2 UserRequest (org.olat.core.gui.UserRequest)2 Choice (org.olat.core.gui.components.choice.Choice)2 FormToggle (org.olat.core.gui.components.form.flexible.elements.FormToggle)2 SingleSelection (org.olat.core.gui.components.form.flexible.elements.SingleSelection)2 JSAndCSSComponent (org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent)2