@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); } } }
@Override public void renderHead(IHeaderResponse response) { response.render(JavaScriptHeaderItem.forReference(WidgetJavaScriptResourceReference.get())); response.render( JavaScriptHeaderItem.forReference(ProgressBarJavaScriptResourceReference.get())); response.render(OnDomReadyHeaderItem.forScript(statement().render())); }
@Override public void renderHead(Component component, IHeaderResponse response) { // Gets the library settings // JQueryLibrarySettings settings = getJQueryLibrarySettings(); // jQuery Globalize resource reference // if (settings != null && settings.getJQueryGlobalizeReference() != null) { this.renderPriorityHeaderItem( JavaScriptHeaderItem.forReference(settings.getJQueryGlobalizeReference()), response); } // Additional resource references // for (ResourceReference reference : this.references) { if (reference instanceof CssResourceReference) { this.renderPriorityHeaderItem(CssHeaderItem.forReference(reference), response); } if (reference instanceof JavaScriptResourceReference) { this.renderPriorityHeaderItem(JavaScriptHeaderItem.forReference(reference), response); } } // Adds the statement // this.renderOnDomReadyScript(this.$(), response); }
@Override public void renderHead(Component c, IHeaderResponse pResponse) { String script = getCallbackName() + " = function () { " + getCallbackScript() + " }"; pResponse.render(OnDomReadyHeaderItem.forScript(script)); pResponse.render(JavaScriptHeaderItem.forReference(IMAGE_UPLOAD_JS_RESOURCE)); pResponse.render(CssHeaderItem.forReference(IMAGE_UPLOAD_CSS_RESOURCE)); }
@Override public void renderHead(IHeaderResponse response) { ResourceReference jQueryReference = this.application.getJavaScriptLibrarySettings().getJQueryReference(); response.render(JavaScriptHeaderItem.forReference(jQueryReference)); response.render(JavaScriptHeaderItem.forUrl("js/bootstrap.js", "bootstrap-js")); }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); PackageResourceReference resourceReference = new PackageResourceReference(getClass(), "follow.js"); response.render(JavaScriptHeaderItem.forReference(resourceReference, "twitterFollow")); }
@Override public Iterable<? extends HeaderItem> getDependencies() { List<HeaderItem> dependencies = Lists.newArrayList(super.getDependencies()); dependencies.add(JavaScriptHeaderItem.forReference(BootstrapJavaScriptReference.INSTANCE)); return dependencies; }
@Override public void renderHead(Component component, IHeaderResponse headerResponse) { super.renderHead(component, headerResponse); headerResponse.render(JavaScriptHeaderItem.forReference(JS)); headerResponse.render(OnDomReadyHeaderItem.forScript(createScript(component))); }
@Override public List<HeaderItem> getDependencies() { return Dependencies.combine( super.getDependencies(), JavaScriptHeaderItem.forReference( ABaseWebApplication.get().getJavaScriptLibrarySettings().getJQueryReference())); }
@Override protected void renderHead(IHeaderResponse response, Class<?> cls) { super.renderHead(response, IsisBlobOrClobPanelAbstract.class); // don't use the subclass // also include JQuery response.render( JavaScriptHeaderItem.forReference( Application.get().getJavaScriptLibrarySettings().getJQueryReference())); }
/** * Specify that charts.js depends on Google JS APIs and Wicket WebSocket JavaScript * * @return a list of dependencies */ @Override public List<HeaderItem> getDependencies() { final List<HeaderItem> dependencies = new ArrayList<HeaderItem>(); dependencies.add( JavaScriptHeaderItem.forReference( new UrlResourceReference(Url.parse("https://www.google.com/jsapi")))); return dependencies; }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.render( CssHeaderItem.forReference( new CssResourceReference(ServiceActionsPanel.class, "ServiceActionsPanel.css"))); response.render( JavaScriptHeaderItem.forReference(DropdownAutoOpenJavaScriptReference.instance())); response.render(OnDomReadyHeaderItem.forScript("$('.dropdown-toggle').dropdownHover();")); }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.render( JavaScriptHeaderItem.forReference( new JavaScriptResourceReference(AddCommentPanel.class, "AddCommentPanel.js"))); response.render( CssHeaderItem.forReference( new CssResourceReference(CommentAndVotePanel.class, "CommentAndVotePanel.css"))); }
@Override public Iterable<? extends HeaderItem> getDependencies() { final ResourceReference backingLibraryReference; if (Application.exists()) { backingLibraryReference = Application.get().getJavaScriptLibrarySettings().getJQueryReference(); } else { backingLibraryReference = JQueryResourceReference.get(); } return Dependencies.combine( super.getDependencies(), JavaScriptHeaderItem.forReference(backingLibraryReference)); }
/** * Files to reference: <link rel="stylesheet" type="text/css" href="lib/css/bootstrap.min.css" /> * <!-- Please use the newest Version of Bootstrap 3.0.X --> * <link rel="stylesheet" type="text/css" href="src/bootstrap3-wysihtml5.css" /> <link * rel="stylesheet" type="text/css" href="src/bootstrap3-wysihtml5-editor.css" /> <script * src="lib/js/jquery-1.11.1.min.js"></script> <script src="lib/js/bootstrap.min.js"></script> * <script src="lib/js/wysihtml5x-toolbar.min.js"></script> <script * src="src/bootstrap3-wysihtml5.min.js"></script> * * <p>https://github.com/Waxolunist/bootstrap3-wysihtml5-bower/ * * @author rudi */ public class Bootstrap3Wysihtml5v2 { public static final CssReferenceHeaderItem WYSIWYG_COLOR_CSS = CssHeaderItem.forReference( new AfterBootstrapCssResourceReference(Bootstrap3Wysihtml5v2.class, "wysiwyg-color.css")); public static final CssReferenceHeaderItem BOOTSTRAP3_WYSIHTML5_MIN_CSS = CssHeaderItem.forReference( new AfterBootstrapCssResourceReference( Bootstrap3Wysihtml5v2.class, "bootstrap3-wysihtml5.min.css")); public static final JavaScriptHeaderItem BOOTSTRAP3_WYSIHTML5_MIN = JavaScriptHeaderItem.forReference( new AfterBootstrapJavaScriptResourceReference( Bootstrap3Wysihtml5v2.class, "bootstrap3-wysihtml5.min.js")); public static final JavaScriptHeaderItem BOOTSTRAP3_WYSIHTML5_ALL_MIN = JavaScriptHeaderItem.forReference( new AfterBootstrapJavaScriptResourceReference( Bootstrap3Wysihtml5v2.class, "bootstrap3-wysihtml5.all.min.js")); }
@Override public List<HeaderItem> getDependencies() { List<HeaderItem> dependencies = new ArrayList<>(); Iterable<? extends HeaderItem> superDeps = super.getDependencies(); for (HeaderItem dep : superDeps) { dependencies.add(dep); } dependencies.add( JavaScriptHeaderItem.forReference( Application.get().getJavaScriptLibrarySettings().getWicketAjaxReference())); return dependencies; }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); // We need carousel response.render(JavaScriptHeaderItem.forReference(OwlCarouselResourceReference.get())); // Add carousel Javascript PackageTextTemplate tt = new PackageTextTemplate(getClass(), "RecentGamesPanel.js"); HashMap<String, String> args = new HashMap<String, String>(); args.put("carouselId", carousel.getMarkupId()); response.render(OnDomReadyHeaderItem.forScript(tt.asString(args))); }
@Override public List<HeaderItem> getDependencies() { List<HeaderItem> dependencies = new ArrayList<>(); for (Iterator<? extends HeaderItem> iterator = super.getDependencies().iterator(); iterator.hasNext(); ) { HeaderItem headerItem = iterator.next(); dependencies.add(headerItem); } dependencies.add( JavaScriptHeaderItem.forReference( Application.get().getJavaScriptLibrarySettings().getJQueryReference())); return dependencies; }
@Override public void renderHead(final Component component, final IHeaderResponse response) { super.renderHead(component, response); response.render(CssHeaderItem.forReference(BootstrapPrettifyCssReference.INSTANCE)); References.renderWithFilter( Bootstrap.getSettings(), response, JavaScriptHeaderItem.forReference(BootstrapPrettifyJavaScriptReference.INSTANCE)); response.render( OnDomReadyHeaderItem.forScript(createInitializerScript(component.getMarkupId(true)))); }
/** * @param response * @param resource */ private void addJavascriptReference(IHeaderResponse response, String resource) { response.render( JavaScriptHeaderItem.forReference( new JavaScriptResourceReference(YavBehavior.class, resource))); }
@Override public Iterable<? extends HeaderItem> getDependencies() { return Dependencies.combine( super.getDependencies(), JavaScriptHeaderItem.forReference(Bootstrap.getSettings().getJsResourceReference())); }
@Override public List<HeaderItem> getDependencies() { List<HeaderItem> dependencies = super.getDependencies(); dependencies.add(JavaScriptHeaderItem.forReference(new DataTablesJsReference())); return dependencies; }
@Override public void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); response.render(JavaScriptHeaderItem.forReference(INSTANCE)); }
@Override public void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); response.render(JavaScriptHeaderItem.forReference(getLightboxJs())); response.render(CssHeaderItem.forReference(getLightboxCss())); }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.render(JavaScriptHeaderItem.forReference(AjaxLibrariesReference.jquery_migrate)); }
@Override public void renderHead(final IHeaderResponse response) { response.render(JavaScriptHeaderItem.forReference(this)); }