コード例 #1
0
/**
 * Description:<br>
 * TODO: Felix Jost Class Description for Trans
 *
 * <p>Initial Date: 24.01.2007 <br>
 *
 * @author Felix Jost, http://www.goodsolutions.ch
 */
public class GuiStackSimpleImpl implements GuiStack {
  private static final String VELOCITY_ROOT = Util.getPackageVelocityRoot(GuiStackSimpleImpl.class);

  private Panel contentPanel;

  /** */
  public GuiStackSimpleImpl(Component initialComponent) {
    contentPanel = new Panel("simpleguistack");
    contentPanel.setContent(initialComponent);
  }

  /*
   * (non-Javadoc)
   * @see org.olat.core.gui.control.GuiStack#pushModalDialog(java.lang.String, org.olat.core.gui.components.Component)
   */
  @Override
  public void pushModalDialog(Component content) {
    // wrap the component into a modal foreground dialog with alpha-blended-background
    VelocityContainer inset =
        new VelocityContainer("simpleinset", VELOCITY_ROOT + "/simpleinset.html", null, null);
    inset.put("cont", content);
    contentPanel.pushContent(inset);
  }

  /*
   * (non-Javadoc)
   * @see org.olat.core.gui.control.GuiStack#pushContent(org.olat.core.gui.components.Component)
   */
  @Override
  public void pushContent(Component newContent) {
    contentPanel.pushContent(newContent);
  }

  /*
   * (non-Javadoc)
   * @see org.olat.core.gui.control.GuiStack#popContent()
   */
  @Override
  public void popContent() {
    contentPanel.popContent();
  }

  /*
   * (non-Javadoc)
   * @see org.olat.core.gui.control.GuiStack#getPanel()
   */
  @Override
  public Panel getPanel() {
    return contentPanel;
  }

  /*
   * (non-Javadoc)
   * @see org.olat.core.gui.control.GuiStack#getModalPanel()
   */
  @Override
  public Panel getModalPanel() {
    return null;
  }
}
コード例 #2
0
  @Override
  protected Component createInitialComponent(final UserRequest ureq) {
    setVelocityRoot(Util.getPackageVelocityRoot(getClass()));

    weeklyStatisticVc_ = this.createVelocityContainer("weeklystatisticparent");

    weeklyStatisticFormVc_ = this.createVelocityContainer("weeklystatisticform");
    form_ = new DateChooserForm(ureq, getWindowControl(), 8 * 7);
    listenTo(form_);
    weeklyStatisticFormVc_.put("statisticForm", form_.getInitialComponent());
    weeklyStatisticFormVc_.contextPut("statsSince", getStatsSinceStr(ureq));

    weeklyStatisticVc_.put("weeklystatisticform", weeklyStatisticFormVc_);

    final Component parentInitialComponent = super.createInitialComponent(ureq);
    weeklyStatisticVc_.put("statistic", parentInitialComponent);

    return weeklyStatisticVc_;
  }
コード例 #3
0
/**
 * redirect for the OpenID connect Implicit Workflow.
 *
 * <p>Initial date: 19.07.2016<br>
 *
 * @author srosse, [email protected], http://www.frentix.com
 */
public class JSRedirectWindowController extends DefaultChiefController {
  private static final String VELOCITY_ROOT =
      Util.getPackageVelocityRoot(JSRedirectWindowController.class);

  public JSRedirectWindowController(UserRequest ureq) {
    Translator trans =
        Util.createPackageTranslator(JSRedirectWindowController.class, ureq.getLocale());
    VelocityContainer msg =
        new VelocityContainer("jsredirect", VELOCITY_ROOT + "/js_redirect.html", trans, this);

    String callbackUrl = Settings.getServerContextPathURI() + OAuthConstants.CALLBACK_PATH;
    msg.contextPut("callbackUrl", callbackUrl);

    Windows ws = Windows.getWindows(ureq);
    WindowBackOffice wbo =
        ws.getWindowManager()
            .createWindowBackOffice("jsredirectwindow", this, new WindowSettings());
    Window w = wbo.getWindow();
    msg.contextPut("theme", w.getGuiTheme());
    w.setContentPane(msg);
    setWindow(w);
  }

  @Override
  public String getWindowTitle() {
    return null;
  }

  @Override
  public boolean isLoginInterceptionInProgress() {
    return false;
  }

  @Override
  public boolean hasStaticSite(Class<? extends SiteInstance> type) {
    return false;
  }

  @Override
  public void addBodyCssClass(String cssClass) {
    //
  }

  @Override
  public void removeBodyCssClass(String cssClass) {
    //
  }

  @Override
  public void addCurrentCustomCSSToView(CustomCSS customCSS) {
    //
  }

  @Override
  public void removeCurrentCustomCSSFromView() {
    //
  }

  /**
   * @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)
   */
  @Override
  public void event(UserRequest ureq, Component source, Event event) {
    //
  }

  /** @see org.olat.core.gui.control.DefaultController#doDispose(boolean) */
  @Override
  protected void doDispose() {
    //
  }
}