Examples of LayoutMain3ColsController


Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

  }

  public void event(UserRequest ureq, Component source, Event event) {
    if (source == pushButton){     
      VelocityContainer container = this.createVelocityContainer("guidemo-pushpop");
      LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), null, null, container, null);
      listenTo(layoutCtr);
      windowStack.push(layoutCtr.getInitialComponent());
     
      container.put("guidemo.window.control.push", pushButton);
      container.put("guidemo.window.control.pop", popButton);
      container.contextPut("stack", getStackHTMLRepresentation());
      getWindowControl().pushToMainArea(container);
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

      if (state == null) {
        glossaryMarkerCtr.setTextMarkingEnabled(false);
      } else {
        glossaryMarkerCtr.setTextMarkingEnabled(state.booleanValue());
      }
      columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), luTree, toolComp, glossaryMarkerCtr.getInitialComponent(), "course" + this.course.getResourceableId());       
    } else {
      columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), luTree, toolComp, contentP, "courseRun" + this.course.getResourceableId());             
    }
    listenTo(columnLayoutCtr);

    // activate the custom course css if any
    setCustomCSS(CourseFactory.getCustomCourseCss(ureq.getUserSession(), uce.getCourseEnvironment()));

    // decide what is show fist - a tool since activaded this way or the regular
    // course view
    if (showAssessmentTool) {
      launchAssessmentTool(ureq, assessmentViewIdentifier);
      coursemain = createVelocityContainer("index");
      coursemain.put("coursemain", all);
    } else {
      all.setContent(columnLayoutCtr.getInitialComponent());
      coursemain = createVelocityContainer("index");
      // see function gotonode in functions.js to see why we need the
      // repositoryentry-key here:
      // it is to correctly apply external links using course-internal links via
      // javascript
      coursemain.contextPut("courserepokey", courseRepositoryEntry.getKey());
      coursemain.put("coursemain", all);
    }
   
    putInitialPanel(coursemain);
   
    //disposed message controller
    //must be created beforehand
    Panel empty = new Panel("empty");//empty panel set as "menu" and "tool"
    Controller courseCloser = CourseFactory.createDisposedCourseRestartController(ureq, wControl, courseRepositoryEntry.getResourceableId());
    Controller disposedRestartController = new LayoutMain3ColsController(ureq, wControl, empty, empty, courseCloser.getInitialComponent(), "disposed course" + this.course.getResourceableId());
    setDisposedMsgController(disposedRestartController);
   
    // add as listener to course so we are being notified about course events:
    // - publish changes
    // - assessment events
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

      // will not be disposed on course run dispose, popus up as new
      // browserwindow
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          Controller notesCtr = new NoteController(lureq, course, getExtendedCourseTitle(lureq.getLocale()), lwControl);
          LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, notesCtr.getInitialComponent(), null);
          layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), uce.getCourseEnvironment()));
          layoutCtr.addDisposableChildController(notesCtr); // dispose glossary on layout dispose
          return layoutCtr;
        }         
      };
      //wrap the content controller into a full header layout
      ControllerCreator popupLayoutCtr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
      //open in new browser window
      openInNewBrowserWindow(ureq, popupLayoutCtr);
      //
    } else if (cmd.equals(TOOLBOX_LINK_COURSECONFIG)) {
      //FIXME:pb:a better workflows to link a course detail page from course run
      //was brasato getWindowControl().getDTabs().activateStatic(ureq, RepositorySite.class.getName(),RepositoryMainController.JUMPFROMEXTERN + RepositoryMainController.JUMPFROMCOURSE + courseRepositoryEntry.getKey().toString());
      DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
      if(dts != null){
        dts.activateStatic(ureq, RepositorySite.class.getName(),RepositoryMainController.JUMPFROMEXTERN + RepositoryMainController.JUMPFROMCOURSE + courseRepositoryEntry.getKey().toString());
      }else{
        //help course in popup window can not display detail page
        getWindowControl().setInfo("detail can not be displayed here");
      }
      return;
    } else if (cmd.equals(ACTION_BOOKMARK)) { // add bookmark
      RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
      bookmarkController = new AddAndEditBookmarkController(ureq, getWindowControl(), re.getDisplayname(), "", re, re.getOlatResource()
          .getResourceableTypeName());
      listenTo(bookmarkController);
      contentP.pushContent(bookmarkController.getInitialComponent());
    } else if (cmd.equals(ACTION_CALENDAR)) { // popup calendar
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(courseRepositoryEntry);
          WindowControl llwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, lwControl);
          CourseCalendarController calendarController = new CourseCalendarController(lureq, llwControl, course);         
          // use a one-column main layout
          LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, llwControl, null, null, calendarController.getInitialComponent(), null);
          layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), uce.getCourseEnvironment()));
          layoutCtr.addDisposableChildController(calendarController); // dispose calendar on layout dispose
          return layoutCtr;         
        }         
      };
      //wrap the content controller into a full header layout
      ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

   * @param initialUri can be NULL, will use first page then
   * @return A main layout controller
   */
  public MainLayout3ColumnsController createMainLayoutController(UserRequest ureq, WindowControl wControl, VFSContainer rootContainer, boolean showMenu, boolean activateFirstPage, String initialUri, OLATResourceable ores) {
    CPDisplayController cpCtr = new CPDisplayController(ureq, wControl, rootContainer, showMenu, activateFirstPage, initialUri, ores);   
    MainLayout3ColumnsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, cpCtr.getMenuComponent(), null, cpCtr.getInitialComponent(), rootContainer.getName());
    layoutCtr.addDisposableChildController(cpCtr); // cascade disposing requests
    return layoutCtr;
  }
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

      toolC.addHeader(translate(NLS_COMMAND_DELETENODE_HEADER));
      toolC.addLink(CMD_DELNODE, translate(NLS_COMMAND_DELETENODE), CMD_DELNODE, "b_toolbox_delete");
      toolC.addLink(CMD_MOVENODE, translate(NLS_COMMAND_MOVENODE), CMD_MOVENODE, "b_toolbox_move");
      toolC.addLink(CMD_COPYNODE, translate(NLS_COMMAND_COPYNODE), CMD_COPYNODE, "b_toolbox_copy");
     
      columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), menuTree, toolC.getInitialComponent(), main, "course" + course.getResourceableId());     
      columnLayoutCtr.addCssClassToMain("o_editor");
      listenTo(columnLayoutCtr);
      putInitialPanel(columnLayoutCtr.getInitialComponent());

      // add as listener to course so we are being notified about course events:
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

    toolC = ToolFactory.createToolController(getWindowControl());
    listenTo(toolC);
    toolC.addHeader(translate("tool.name"));
    toolC.addLink("cmd.close",translate("command.closearchiver"), null, "b_toolbox_close");
       
    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), menuTree, toolC.getInitialComponent(), main, "course" + ores.getResourceableId());
    listenTo(columnLayoutCtr); // cleanup on dispose
    putInitialPanel(columnLayoutCtr.getInitialComponent());
  }
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

        empty = new Panel("empty");      Translator translator = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
        contentCtr = MessageUIFactory.createInfoMessage(ureq, getWindowControl(), translator.translate("status.currently.locked.title"), translator.translate("status.currently.locked"));
        listenTo(contentCtr); // auto dispose later
        Component resComp = contentCtr.getInitialComponent();

        columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), empty, empty, resComp, /*do not save no prefs*/null);
        listenTo(columnLayoutCtr); // auto dispose later
        putInitialPanel(columnLayoutCtr.getInitialComponent());
      }
   
      @Override
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

    // Activate correct position in menu
    INode firstChild = tm.getRootNode().getChildAt(0);
    olatMenuTree.setSelectedNodeId(firstChild.getIdent());

    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), olatMenuTree, null, dmzPanel, "useradminmain");
    columnLayoutCtr.addCssClassToMain("o_loginscreen");
    listenTo(columnLayoutCtr); // for later autodisposing
    putInitialPanel(columnLayoutCtr.getInitialComponent());
  }
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

    listenTo(toolC);
    if (groupType.equals(BusinessGroup.TYPE_RIGHTGROUP)) toolC.addHeader(translate("tools.title.rightmanagement"));
    else toolC.addHeader(translate("tools.title.groupmanagement"));
    toolC.addLink(CMD_CLOSE, translate(CMD_CLOSE), null, "b_toolbox_close");
    // now build layout controller
    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), olatMenuTree, toolC.getInitialComponent(), contextListVC, null);
    listenTo(columnLayoutCtr); // cleanup on dispose
  }
View Full Code Here

Examples of org.olat.core.commons.fullWebApp.LayoutMain3ColsController

          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, null, null, ctr.getInitialComponent(),
                  null);
              layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), userCourseEnv.getCourseEnvironment()));
             
              Controller wrappedCtrl = TitledWrapperHelper.getWrapper(lureq, lwControl, ctr, STCourseNode.this, ICON_CSS_CLASS);
              layoutCtr.addDisposableChildController(wrappedCtrl);
              return layoutCtr;
            }
          });
        }
      };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.