Search in sources :

Example 6 with JavaScriptResourceReference

use of org.apache.wicket.request.resource.JavaScriptResourceReference in project openmeetings by apache.

the class UploadDialog method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    super.renderHead(response);
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(UploadDialog.class, "upload.js"))));
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference)

Example 7 with JavaScriptResourceReference

use of org.apache.wicket.request.resource.JavaScriptResourceReference in project openmeetings by apache.

the class RoomPanel method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    super.renderHead(response);
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(interview ? INTERVIEWWB_JS_REFERENCE : WB_JS_REFERENCE)));
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(RoomPanel.class, "room.js"))));
    if (room.isVisible()) {
        response.render(OnDomReadyHeaderItem.forScript(roomEnter.getCallbackScript()));
    }
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference)

Example 8 with JavaScriptResourceReference

use of org.apache.wicket.request.resource.JavaScriptResourceReference in project openmeetings by apache.

the class BasePage method internalRenderHead.

protected void internalRenderHead(IHeaderResponse response) {
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference())));
    super.renderHead(response);
    final String suffix = DEVELOPMENT == getApplication().getConfigurationType() ? "" : ".min";
    response.render(CssHeaderItem.forUrl(String.format("css/theme_om/jquery-ui%s.css", suffix)));
    response.render(CssHeaderItem.forUrl(String.format("css/theme%s.css", suffix)));
    if (isRtl()) {
        response.render(CssHeaderItem.forUrl(String.format("css/theme-rtl%s.css", suffix)));
    }
    if (!Strings.isEmpty(getGaCode())) {
        response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(BasePage.class, "om-ga.js"))));
        StringBuilder script = new StringBuilder("initGA('");
        script.append(getGaCode()).append("');").append(isMainPage() ? "initHash()" : "init()").append(';');
        response.render(OnDomReadyHeaderItem.forScript(script));
    }
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference)

Example 9 with JavaScriptResourceReference

use of org.apache.wicket.request.resource.JavaScriptResourceReference in project openmeetings by apache.

the class UserMultiChoice method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    super.renderHead(response);
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(getClass(), "user-multi-choice.js"), "user-multi-choice")));
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference)

Example 10 with JavaScriptResourceReference

use of org.apache.wicket.request.resource.JavaScriptResourceReference in project wicket by apache.

the class FilteredHeaderPage method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    // rendered at the default header bucket
    final JavaScriptResourceReference topJsReference = new JavaScriptResourceReference(FilteredHeaderPage.class, "top.js");
    response.render(new FilteredHeaderItem(JavaScriptHeaderItem.forReference(topJsReference), FilteringHeaderResponse.DEFAULT_HEADER_FILTER_NAME));
    // rendered at the bottom of the body bucket
    JQueryPluginResourceReference bottomJs = new JQueryPluginResourceReference(FilteredHeaderPage.class, "bottom.js") {

        private static final long serialVersionUID = 1L;

        @Override
        public List<HeaderItem> getDependencies() {
            List<HeaderItem> dependencies = super.getDependencies();
            // WICKET-4566 : depend on a resource which is rendered in a different bucket
            dependencies.add(JavaScriptHeaderItem.forReference(topJsReference));
            return dependencies;
        }
    };
    response.render(JavaScriptHeaderItem.forReference(bottomJs));
}
Also used : JQueryPluginResourceReference(org.apache.wicket.resource.JQueryPluginResourceReference) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference) HeaderItem(org.apache.wicket.markup.head.HeaderItem) JavaScriptHeaderItem(org.apache.wicket.markup.head.JavaScriptHeaderItem)

Aggregations

JavaScriptResourceReference (org.apache.wicket.request.resource.JavaScriptResourceReference)12 PriorityHeaderItem (org.apache.wicket.markup.head.PriorityHeaderItem)6 ArrayList (java.util.ArrayList)3 HeaderItem (org.apache.wicket.markup.head.HeaderItem)2 JavaScriptHeaderItem (org.apache.wicket.markup.head.JavaScriptHeaderItem)2 JQueryPluginResourceReference (org.apache.wicket.resource.JQueryPluginResourceReference)2 Chart (br.com.digilabs.jqplot.Chart)1 BarChart (br.com.digilabs.jqplot.chart.BarChart)1 PieChart (br.com.digilabs.jqplot.chart.PieChart)1 Highlighter (br.com.digilabs.jqplot.elements.Highlighter)1 ChatMessage (org.apache.openmeetings.db.entity.basic.ChatMessage)1 Room (org.apache.openmeetings.db.entity.room.Room)1 DefaultJavaScriptCompressor (org.apache.wicket.javascript.DefaultJavaScriptCompressor)1 IJavaScriptCompressor (org.apache.wicket.javascript.IJavaScriptCompressor)1 CssHeaderItem (org.apache.wicket.markup.head.CssHeaderItem)1 JavaScriptReferenceHeaderItem (org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem)1 FilteredHeaderItem (org.apache.wicket.markup.head.filter.FilteredHeaderItem)1 MockApplication (org.apache.wicket.mock.MockApplication)1 CssResourceReference (org.apache.wicket.request.resource.CssResourceReference)1