Search in sources :

Example 56 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.

the class HighScoreRunController method event.

@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == links[0] || source == links[1] || source == links[2]) {
        List<String> persons = new ArrayList<>();
        Link link;
        if (source == links[0]) {
            link = links[0];
            buildMemberList(persons, 0);
        } else if (source == links[1]) {
            link = links[1];
            buildMemberList(persons, 1);
        } else {
            link = links[2];
            buildMemberList(persons, 2);
        }
        if (calloutCtr == null) {
            VelocityContainer podiumcalloutVC = createVelocityContainer("podiumcallout");
            podiumcalloutVC.contextPut("persons", persons);
            calloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), podiumcalloutVC, link, "This is a title in a callout window", false, null);
            calloutCtr.activate();
            listenTo(calloutCtr);
        } else {
            removeAsListenerAndDispose(calloutCtr);
            calloutCtr = null;
        }
    } else if (source == this.flc.getFormItemComponent()) {
        if ("show".equals(event.getCommand())) {
            doUpdateShowConfig(ureq, true);
        } else if ("hide".equals(event.getCommand())) {
            doUpdateShowConfig(ureq, false);
        }
    }
}
Also used : ArrayList(java.util.ArrayList) CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) Link(org.olat.core.gui.components.link.Link) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 57 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.

the class EditorMainController method doOpenStatusOverview.

private void doOpenStatusOverview(UserRequest ureq) {
    removeAsListenerAndDispose(statusCtr);
    statusCtr = new EditorStatusController(ureq, getWindowControl());
    listenTo(statusCtr);
    euce.getCourseEditorEnv().validateCourse();
    StatusDescription[] courseStatus = euce.getCourseEditorEnv().getCourseStatus();
    statusCtr.updateStatus(cetm, courseStatus);
    calloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), statusCtr.getInitialComponent(), statusLink, "", true, null);
    listenTo(calloutCtrl);
    calloutCtrl.activate();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 58 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.

the class CourseRuntimeController method launchCourseSearch.

private void launchCourseSearch(UserRequest ureq) {
    // do not dispose SearchInputController after search to remain able to listen to its events
    removeAsListenerAndDispose(courseSearchCalloutCtr);
    courseSearchCalloutCtr = null;
    removeAsListenerAndDispose(searchController);
    searchController = null;
    SearchServiceUIFactory searchServiceUIFactory = (SearchServiceUIFactory) CoreSpringFactory.getBean(SearchServiceUIFactory.class);
    searchController = searchServiceUIFactory.createInputController(ureq, getWindowControl(), DisplayOption.STANDARD, null);
    listenTo(searchController);
    courseSearchCalloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), searchController.getInitialComponent(), searchLink.getDispatchID(), null, true, null);
    courseSearchCalloutCtr.addDisposableChildController(searchController);
    courseSearchCalloutCtr.activate();
    listenTo(courseSearchCalloutCtr);
}
Also used : SearchServiceUIFactory(org.olat.search.SearchServiceUIFactory) CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 59 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.

the class CourseReminderListController method doOpenTools.

private void doOpenTools(UserRequest ureq, ReminderRow row, FormLink link) {
    removeAsListenerAndDispose(toolsCtrl);
    removeAsListenerAndDispose(toolsCalloutCtrl);
    toolsCtrl = new ToolsController(ureq, getWindowControl(), row);
    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)

Example 60 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.

the class WeeklyCalendarController method doOpenEventCallout.

private void doOpenEventCallout(UserRequest ureq, KalendarEvent calEvent, KalendarRenderWrapper calWrapper, String targetDomId) {
    if (eventCalloutCtr != null && eventDetailsCtr != null)
        return;
    removeAsListenerAndDispose(eventCalloutCtr);
    removeAsListenerAndDispose(eventDetailsCtr);
    eventDetailsCtr = new CalendarDetailsController(ureq, getWindowControl(), calEvent, calWrapper);
    listenTo(eventDetailsCtr);
    Component eventCmp = eventDetailsCtr.getInitialComponent();
    eventCalloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), eventCmp, targetDomId, "Event", true, "o_cal_event_callout");
    listenTo(eventCalloutCtr);
    eventCalloutCtr.activate();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) Component(org.olat.core.gui.components.Component)

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