use of org.olat.modules.tu.IframeTunnelController in project OpenOLAT by OpenOLAT.
the class TUEditController 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(UserRequest ureq, Component source, Event event) {
if (source == previewButton) {
// those must be links
Controller tunnelRunCtr;
if (config.getBooleanSafe(TUConfigForm.CONFIG_IFRAME)) {
tunnelRunCtr = new IframeTunnelController(ureq, getWindowControl(), config);
} else {
tunnelRunCtr = new TURunController(getWindowControl(), config, ureq, courseNode, PreviewConfigHelper.getPreviewCourseEnvironment(true, true, course));
}
if (previewLayoutCtr != null)
previewLayoutCtr.dispose();
// preview layout: only center column (col3) used
previewLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), tunnelRunCtr);
stackPanel.pushController(translate("preview"), previewLayoutCtr);
}
}
use of org.olat.modules.tu.IframeTunnelController in project openolat by klemens.
the class TURunController method doLaunch.
private void doLaunch(UserRequest ureq) {
boolean iniframe = config.getBooleanSafe(TUConfigForm.CONFIG_IFRAME);
// create the possibility to float
CloneableController controller;
if (iniframe) {
// Do not dispose this controller if the course is closed...
IframeTunnelController ifC = new IframeTunnelController(ureq, getWindowControl(), config);
controller = ifC;
} else {
TunnelController tuC = new TunnelController(ureq, getWindowControl(), config);
controller = tuC;
}
listenTo(controller);
// create clone wrapper layout
CloneLayoutControllerCreatorCallback clccc = new CloneLayoutControllerCreatorCallback() {
public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
@SuppressWarnings("synthetic-access")
public Controller createController(UserRequest lureq, WindowControl lwControl) {
// wrapp in column layout, popup window needs a layout controller
Controller ctr = contentControllerCreator.createController(lureq, lwControl);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, ctr);
layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), courseEnv));
layoutCtr.addDisposableChildController(ctr);
return layoutCtr;
}
});
}
};
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), controller, courseNode, "o_tu_icon");
if (ctrl instanceof CloneableController) {
cloneC = new CloneController(ureq, getWindowControl(), (CloneableController) ctrl, clccc);
listenTo(cloneC);
main.setContent(cloneC.getInitialComponent());
} else {
throw new AssertException("Controller must be cloneable");
}
}
use of org.olat.modules.tu.IframeTunnelController in project OpenOLAT by OpenOLAT.
the class TURunController method doLaunch.
private void doLaunch(UserRequest ureq) {
boolean iniframe = config.getBooleanSafe(TUConfigForm.CONFIG_IFRAME);
// create the possibility to float
CloneableController controller;
if (iniframe) {
// Do not dispose this controller if the course is closed...
IframeTunnelController ifC = new IframeTunnelController(ureq, getWindowControl(), config);
controller = ifC;
} else {
TunnelController tuC = new TunnelController(ureq, getWindowControl(), config);
controller = tuC;
}
listenTo(controller);
// create clone wrapper layout
CloneLayoutControllerCreatorCallback clccc = new CloneLayoutControllerCreatorCallback() {
public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
@SuppressWarnings("synthetic-access")
public Controller createController(UserRequest lureq, WindowControl lwControl) {
// wrapp in column layout, popup window needs a layout controller
Controller ctr = contentControllerCreator.createController(lureq, lwControl);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, ctr);
layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), courseEnv));
layoutCtr.addDisposableChildController(ctr);
return layoutCtr;
}
});
}
};
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), controller, courseNode, "o_tu_icon");
if (ctrl instanceof CloneableController) {
cloneC = new CloneController(ureq, getWindowControl(), (CloneableController) ctrl, clccc);
listenTo(cloneC);
main.setContent(cloneC.getInitialComponent());
} else {
throw new AssertException("Controller must be cloneable");
}
}
use of org.olat.modules.tu.IframeTunnelController in project openolat by klemens.
the class TUEditController 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(UserRequest ureq, Component source, Event event) {
if (source == previewButton) {
// those must be links
Controller tunnelRunCtr;
if (config.getBooleanSafe(TUConfigForm.CONFIG_IFRAME)) {
tunnelRunCtr = new IframeTunnelController(ureq, getWindowControl(), config);
} else {
tunnelRunCtr = new TURunController(getWindowControl(), config, ureq, courseNode, PreviewConfigHelper.getPreviewCourseEnvironment(true, true, course));
}
if (previewLayoutCtr != null)
previewLayoutCtr.dispose();
// preview layout: only center column (col3) used
previewLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), tunnelRunCtr);
stackPanel.pushController(translate("preview"), previewLayoutCtr);
}
}
Aggregations