use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class PortalSite method createController.
@Override
protected Controller createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ORES));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ORES, new StateSite(this), wControl, true);
PortalMainController c = new PortalMainController(ureq, bwControl);
return new LayoutMain3ColsController(ureq, wControl, c);
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class PortfolioConfigForm method doPreview.
private void doPreview(UserRequest ureq) {
removeAsListenerAndDispose(previewCtr);
removeAsListenerAndDispose(columnLayoutCtr);
if (map != null) {
EPSecurityCallback secCallback = new EPSecurityCallbackImpl(false, true);
previewCtr = EPUIFactory.createPortfolioStructureMapPreviewController(ureq, getWindowControl(), map, secCallback);
} else if (binder != null && stackPanel instanceof TooledStackedPanel) {
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getReadOnlyCallback();
BinderConfiguration bConfig = BinderConfiguration.createTemplateConfig(false);
previewCtr = new BinderController(ureq, getWindowControl(), (TooledStackedPanel) stackPanel, secCallback, binder, bConfig);
} else {
return;
}
listenTo(previewCtr);
columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), previewCtr);
stackPanel.pushController(translate("preview.map"), columnLayoutCtr);
listenTo(columnLayoutCtr);
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class SPRunController method doInlineIntegration.
private void doInlineIntegration(UserRequest ureq, boolean hasEditRightsTo) {
boolean allowRelativeLinks = config.getBooleanSafe(SPEditController.CONFIG_KEY_ALLOW_RELATIVE_LINKS);
// create the possibility to float
OLATResourceable ores = OresHelper.createOLATResourceableInstance(ICourse.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
DeliveryOptions deliveryOptions = (DeliveryOptions) config.get(SPEditController.CONFIG_KEY_DELIVERYOPTIONS);
spCtr = new SinglePageController(ureq, getWindowControl(), courseFolderContainer, fileName, allowRelativeLinks, null, ores, deliveryOptions, userCourseEnv.getCourseEnvironment().isPreview());
spCtr.setAllowDownload(true);
// only for inline integration: register for controller event to forward a olatcmd to the course,
// and also to remember latest position in the script
listenTo(spCtr);
// enable edit mode if user has the according rights
if (hasEditRightsTo) {
spCtr.allowPageEditing();
// set the link tree model to internal for the HTML editor
if (linkTreeModel != null) {
spCtr.setInternalLinkTreeModel(linkTreeModel);
}
}
// create clone wrapper layout
CloneLayoutControllerCreatorCallback clccc = new CloneLayoutControllerCreatorCallback() {
public ControllerCreator createLayoutControllerCreator(UserRequest uureq, final ControllerCreator contentControllerCreator) {
return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(uureq, new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
// Wrap 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(), userCourseEnv.getCourseEnvironment()));
// Controller titledCtrl = TitledWrapperHelper.getWrapper(lureq, lwControl, ctr, courseNode, "o_sp_icon");
layoutCtr.addDisposableChildController(ctr);
return layoutCtr;
}
});
}
};
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), spCtr, courseNode, "o_sp_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.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class ImsCPHandler method createLaunchController.
@Override
public MainLayoutController createLaunchController(RepositoryEntry re, RepositoryEntrySecurity reSecurity, UserRequest ureq, WindowControl wControl) {
OLATResource res = re.getOlatResource();
File cpRoot = FileResourceManager.getInstance().unzipFileResource(res);
final LocalFolderImpl vfsWrapper = new LocalFolderImpl(cpRoot);
CPPackageConfig packageConfig = CPManager.getInstance().getCPPackageConfig(res);
final DeliveryOptions deliveryOptions = (packageConfig == null ? null : packageConfig.getDeliveryOptions());
return new CPRuntimeController(ureq, wControl, re, reSecurity, new RuntimeControllerCreator() {
@Override
public Controller create(UserRequest uureq, WindowControl wwControl, TooledStackedPanel toolbarPanel, RepositoryEntry entry, RepositoryEntrySecurity security, AssessmentMode assessmentMode) {
boolean activateFirstPage = true;
String initialUri = null;
CoreSpringFactory.getImpl(UserCourseInformationsManager.class).updateUserCourseInformations(entry.getOlatResource(), uureq.getIdentity());
CPDisplayController cpCtr = new CPDisplayController(uureq, wwControl, vfsWrapper, true, true, activateFirstPage, true, deliveryOptions, initialUri, entry.getOlatResource(), "", false);
MainLayout3ColumnsController ctr = new LayoutMain3ColsController(uureq, wwControl, cpCtr.getMenuComponent(), cpCtr.getInitialComponent(), vfsWrapper.getName());
ctr.addDisposableChildController(cpCtr);
return ctr;
}
});
}
use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.
the class ScormAPIandDisplayController method configurationChanged.
@Override
public void configurationChanged() {
if (columnLayoutCtr instanceof LayoutMain3ColsBackController) {
LayoutMain3ColsBackController layoutCtr = (LayoutMain3ColsBackController) columnLayoutCtr;
layoutCtr.deactivate();
} else if (columnLayoutCtr instanceof LayoutMain3ColsController) {
LayoutMain3ColsController layoutCtr = (LayoutMain3ColsController) columnLayoutCtr;
layoutCtr.deactivate(null);
}
}
Aggregations