Examples of StylesheetOptions


Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

    @Test
    public void duplicate_stylesheet_ignored_first_media_wins()
    {
        DocumentLinker linker = mockDocumentLinker();
        StylesheetOptions options = new StylesheetOptions("print");

        linker.addStylesheetLink(new StylesheetLink("style.css", options));

        replay();

        JavaScriptSupportImpl jss = new JavaScriptSupportImpl(linker, null, null);

        jss.importStylesheet(new StylesheetLink("style.css", options));
        jss.importStylesheet(new StylesheetLink("style.css", new StylesheetOptions("hologram")));

        jss.commit();

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

    @Test
    public void stylesheet_link()
    {
        PartialMarkupDocumentLinker linker = new PartialMarkupDocumentLinker();

        linker.addStylesheetLink(new StylesheetLink("foo.css", new StylesheetOptions("print")));
        linker.addStylesheetLink(new StylesheetLink("bar.css"));

        JSONObject reply = new JSONObject();

        linker.commit(reply);
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

    {
        String media = "print";
        JavaScriptSupport javascriptSupport = mockJavaScriptSupport();
        Asset asset = mockAsset("foo.css");

        javascriptSupport.importStylesheet(new StylesheetLink("foo.css", new StylesheetOptions(media)));

        replay();

        RenderSupport support = new RenderSupportImpl(null, null, javascriptSupport);
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

    public void add_stylesheet_link_by_url()
    {
        String media = "print";
        JavaScriptSupport javascriptSupport = mockJavaScriptSupport();

        javascriptSupport.importStylesheet(new StylesheetLink(ASSET_URL, new StylesheetOptions(media)));

        replay();

        RenderSupport support = new RenderSupportImpl(null, null, javascriptSupport);
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

            javascriptSupport.addInitializerCall("activate", focusFieldId);
    }

    public void addStylesheetLink(Asset stylesheet, String media)
    {
        javascriptSupport.importStylesheet(new StylesheetLink(stylesheet, new StylesheetOptions(media)));
    }
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

        javascriptSupport.importStylesheet(new StylesheetLink(stylesheet, new StylesheetOptions(media)));
    }

    public void addStylesheetLink(String stylesheetURL, String media)
    {
        javascriptSupport.importStylesheet(new StylesheetLink(stylesheetURL, new StylesheetOptions(media)));
    }
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

    {
        String media = "print";
        JavaScriptSupport javascriptSupport = mockJavaScriptSupport();
        Asset asset = mockAsset("foo.css");

        javascriptSupport.importStylesheet(new StylesheetLink("foo.css", new StylesheetOptions(media)));

        replay();

        RenderSupport support = new RenderSupportImpl(null, null, javascriptSupport);
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

    public void add_stylesheet_link_by_url()
    {
        String media = "print";
        JavaScriptSupport javascriptSupport = mockJavaScriptSupport();

        javascriptSupport.importStylesheet(new StylesheetLink(ASSET_URL, new StylesheetOptions(media)));

        replay();

        RenderSupport support = new RenderSupportImpl(null, null, javascriptSupport);
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

        document.newRootElement("html");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);

        linker.addStylesheetLink(new StylesheetLink("style.css", new StylesheetOptions("print")));
        linker.addScriptLink("foo.js");
        linker.addScriptLink("bar/baz.js");
        linker.addScript(InitializationPriority.IMMEDIATE, "pageInitialization();");

        linker.updateDocument(document);
View Full Code Here

Examples of org.apache.tapestry5.services.javascript.StylesheetOptions

        document.newRootElement("html").element("body").element("p").text("Ready to be updated with styles.");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);

        linker.addStylesheetLink(new StylesheetLink("foo.css"));
        linker.addStylesheetLink(new StylesheetLink("bar/baz.css", new StylesheetOptions("print")));

        linker.updateDocument(document);

        check(document, "add_style_links.txt");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.