@Override
 public void renderHead(final IHeaderResponse response) {
   super.renderHead(response);
   response.render(
       JavaScriptReferenceHeaderItem.forReference(
           Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
   response.render(
       StringHeaderItem.forString(WicketUtils.getCssForFavicon(getUrl("/favicon.ico"))));
   if (WebConfiguration.isDevelopmentMode() == true) {
     response.render(
         CssReferenceHeaderItem.forUrl(
             "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".css"));
   } else {
     response.render(
         CssReferenceHeaderItem.forUrl(
             "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".min.css"));
   }
   response.render(CssReferenceHeaderItem.forUrl("mobile/projectforge.css"));
   response.render(JavaScriptReferenceHeaderItem.forUrl("mobile/jquery.mobile/myconfig.js"));
   if (WebConfiguration.isDevelopmentMode() == true) {
     // response.renderJavaScriptReference("mobile/jquery.mobile/myconfig.js");
     response.render(
         JavaScriptReferenceHeaderItem.forUrl(
             "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".js"));
   } else {
     // response.renderJavaScriptReference("mobile/jquery.mobile/myconfig.js");
     response.render(
         JavaScriptReferenceHeaderItem.forUrl(
             "mobile/jquery.mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".min.js"));
   }
 }
Example #2
0
  @Override
  public void renderHead(IHeaderResponse response) {

    // includes jquery, required by the placeholder plugin (wicket only include jquery if he need
    // it)
    response.render(
        new PriorityHeaderItem(
            JavaScriptHeaderItem.forReference(
                getApplication().getJavaScriptLibrarySettings().getJQueryReference())));

    List<HeaderContribution> cssContribs =
        getGeoServerApplication().getBeansOfType(HeaderContribution.class);
    for (HeaderContribution csscontrib : cssContribs) {
      try {
        if (csscontrib.appliesTo(this)) {
          PackageResourceReference ref = csscontrib.getCSS();
          if (ref != null) {
            response.render(CssReferenceHeaderItem.forReference(ref));
          }

          ref = csscontrib.getJavaScript();
          if (ref != null) {
            response.render(JavaScriptHeaderItem.forReference(ref));
          }

          ref = csscontrib.getFavicon();
        }
      } catch (Throwable t) {
        LOGGER.log(Level.WARNING, "Problem adding header contribution", t);
      }
    }
  }
Example #3
0
  @Override
  public void renderHead(final IHeaderResponse response) {
    super.renderHead(response);

    response.render(CssReferenceHeaderItem.forReference(CSS));
  }