Search in sources :

Example 26 with PopupBrowserWindow

use of org.olat.core.gui.control.generic.popup.PopupBrowserWindow in project openolat by klemens.

the class CourseRuntimeController method launchCalendar.

private void launchCalendar(UserRequest ureq) {
    ControllerCreator ctrlCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(getRepositoryEntry());
            WindowControl llwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, lwControl);
            CourseCalendarController calendarController = new CourseCalendarController(lureq, llwControl, getUserCourseEnvironment());
            // use a one-column main layout
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, llwControl, calendarController);
            layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), course.getCourseEnvironment()));
            // dispose calendar on layout dispose
            layoutCtr.addDisposableChildController(calendarController);
            return layoutCtr;
        }
    };
    // wrap the content controller into a full header layout
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
    // open in new browser window
    PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
    pbw.open(ureq);
}
Also used : PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ICourse(org.olat.course.ICourse) WindowControl(org.olat.core.gui.control.WindowControl) CourseCalendarController(org.olat.course.run.calendar.CourseCalendarController) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 27 with PopupBrowserWindow

use of org.olat.core.gui.control.generic.popup.PopupBrowserWindow in project openolat by klemens.

the class OlatDmzTopNavController method doImpressum.

private void doImpressum(UserRequest ureq) {
    ControllerCreator impressumControllerCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new ImpressumDmzMainController(lureq, lwControl);
        }
    };
    PopupBrowserWindow popupBrowserWindow = Windows.getWindows(ureq).getWindowManager().createNewUnauthenticatedPopupWindowFor(ureq, impressumControllerCreator);
    popupBrowserWindow.open(ureq);
}
Also used : ImpressumDmzMainController(org.olat.core.commons.controllers.impressum.ImpressumDmzMainController) PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 28 with PopupBrowserWindow

use of org.olat.core.gui.control.generic.popup.PopupBrowserWindow in project openolat by klemens.

the class OlatFooterController method doOpenImpressum.

protected void doOpenImpressum(UserRequest ureq) {
    ControllerCreator impressumControllerCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new ImpressumMainController(lureq, lwControl);
        }
    };
    PopupBrowserWindow popupBrowserWindow;
    if (ureq.getUserSession().isAuthenticated()) {
        popupBrowserWindow = Windows.getWindows(ureq).getWindowManager().createNewPopupBrowserWindowFor(ureq, impressumControllerCreator);
    } else {
        popupBrowserWindow = Windows.getWindows(ureq).getWindowManager().createNewUnauthenticatedPopupWindowFor(ureq, impressumControllerCreator);
    }
    popupBrowserWindow.open(ureq);
}
Also used : PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) ImpressumMainController(org.olat.core.commons.controllers.impressum.ImpressumMainController) WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 29 with PopupBrowserWindow

use of org.olat.core.gui.control.generic.popup.PopupBrowserWindow in project openolat by klemens.

the class MessageListController method doOpenVisitingCard.

private void doOpenVisitingCard(UserRequest ureq, Identity creator) {
    ControllerCreator userInfoMainControllerCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new UserInfoMainController(lureq, lwControl, creator, true, false);
        }
    };
    // wrap the content controller into a full header layout
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, userInfoMainControllerCreator);
    PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
    pbw.open(ureq);
}
Also used : UserInfoMainController(org.olat.user.UserInfoMainController) PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 30 with PopupBrowserWindow

use of org.olat.core.gui.control.generic.popup.PopupBrowserWindow in project openolat by klemens.

the class ForumUIFactory method getPopupableForumController.

/**
 * Provides a popable ForumController wrapped in a titled controller.
 * @param ureq
 * @param forum
 * @param forumCallback
 * @param title
 * @return a ChiefController
 */
public static PopupBrowserWindow getPopupableForumController(UserRequest ureq, WindowControl wControl, final Forum forum, final ForumCallback forumCallback, final TitleInfo titleInfo) {
    ControllerCreator ctrlCreator = new ControllerCreator() {

        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            Controller forumWrapperController = getTitledForumController(lureq, lwControl, forum, forumCallback, titleInfo);
            // use on column layout
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, forumWrapperController);
            // dispose content on layout dispose
            layoutCtr.addDisposableChildController(forumWrapperController);
            return layoutCtr;
        }
    };
    // wrap the content controller into a full header layout
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
    PopupBrowserWindow pbw = wControl.getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
    return pbw;
}
Also used : PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) WindowControl(org.olat.core.gui.control.WindowControl) TitledWrapperController(org.olat.core.gui.control.generic.title.TitledWrapperController) ForumController(org.olat.modules.fo.ui.ForumController) Controller(org.olat.core.gui.control.Controller) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Aggregations

PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)30 UserRequest (org.olat.core.gui.UserRequest)28 WindowControl (org.olat.core.gui.control.WindowControl)28 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)28 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)10 TableEvent (org.olat.core.gui.components.table.TableEvent)10 UserInfoMainController (org.olat.user.UserInfoMainController)8 ArrayList (java.util.ArrayList)6 List (java.util.List)6 SingleIdentityChosenEvent (org.olat.basesecurity.events.SingleIdentityChosenEvent)6 TableMultiSelectEvent (org.olat.core.gui.components.table.TableMultiSelectEvent)6 Controller (org.olat.core.gui.control.Controller)6 Identity (org.olat.core.id.Identity)6 MultiIdentityChosenEvent (org.olat.basesecurity.events.MultiIdentityChosenEvent)4 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)4 ContextEntry (org.olat.core.id.context.ContextEntry)4 AssertException (org.olat.core.logging.AssertException)4 MailNotificationEditController (org.olat.core.util.mail.MailNotificationEditController)4 MailTemplate (org.olat.core.util.mail.MailTemplate)4 HashMap (java.util.HashMap)2