Package org.olat.core.gui.components.htmlheader.jscss

Examples of org.olat.core.gui.components.htmlheader.jscss.CustomCSS


      // Set the custom CSS URL that is used by the current tab or site if
      // available. The reason why we do this here and not in the constructor is
      // that during the constructing phase this property is not yet set on the
      // window.
      Window myWindow = getWindowControl().getWindowBackOffice().getWindow();
      CustomCSS currentCustomCSS = (CustomCSS) myWindow.getAttribute(BaseFullWebappController.CURRENT_CUSTOM_CSS_KEY);
      if (currentCustomCSS != nullcustomCssURL = currentCustomCSS.getCSSURL();
      // done, remove us as listener
      getWindowControl().getWindowBackOffice().removeCycleListener(this);
    }
  }
View Full Code Here


  /**
   * Remove the current custom css from the view
   */
  protected void removeCurrentCustomCSSFromView() {
    Window myWindow = getWindowControl().getWindowBackOffice().getWindow();
    CustomCSS currentCustomCSS = (CustomCSS) myWindow.getAttribute(CURRENT_CUSTOM_CSS_KEY);
    if (currentCustomCSS != null) {
      // remove css and js from view
      mainVc.remove(currentCustomCSS.getJSAndCSSComponent());
      myWindow.removeAttribute(CURRENT_CUSTOM_CSS_KEY);
    }
  }
View Full Code Here

   * @param usess The user session
   * @param courseEnvironment the course environment
   * @return The custom course css or NULL if no course css is available
   */
  public static CustomCSS getCustomCourseCss(UserSession usess, CourseEnvironment courseEnvironment) {
    CustomCSS customCSS = null;
    CourseConfig courseConfig = courseEnvironment.getCourseConfig();
    if (courseConfig.hasCustomCourseCSS()) {
      // Notify the current tab that it should load a custom CSS
      VFSContainer courseContainer = courseEnvironment.getCourseFolderContainer();
      customCSS = new CustomCSS(courseContainer, courseConfig.getCssLayoutRef(), usess);
    }
    return customCSS;
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.htmlheader.jscss.CustomCSS

Copyright © 2018 www.massapicom. 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.