Class JavascriptPluginInclusion


  • public class JavascriptPluginInclusion
    extends Object
    This class embeds the process of the inclusion of some Javascript plugins used in Silverpeas.

    It acts as a mixin for the tags that which to include a specific tag in order to use the functionality of the underlying plugin.

    Author:
    mmoquillon
    • Method Detail

      • module

        public static org.apache.ecs.Element module​(String src)
      • script

        public static org.apache.ecs.Element script​(String src)
      • script

        public static org.apache.ecs.Element script​(String src,
                                                    Consumer<org.apache.ecs.xhtml.script> consumer)
      • scriptContent

        public static org.apache.ecs.Element scriptContent​(String content)
        Centralization of script instantiation.
        Parameters:
        content - the script content.
        Returns:
        the Element instance representing the script content.
      • print

        public static org.apache.ecs.Element print​(String href)
        Centralization of print instantiation.
        Parameters:
        href - the URL of the print css source.
        Returns:
        the representation of the print css.
      • link

        public static org.apache.ecs.Element link​(String href)
        Centralization of link instantiation.
        Returns:
        the representation of the css.
      • link

        public static org.apache.ecs.Element link​(String href,
                                                  Consumer<org.apache.ecs.xhtml.link> consumer)
        Centralization of link instantiation.
        Returns:
        the representation of the css.
      • includeMinimalSilverpeas

        public static org.apache.ecs.ElementContainer includeMinimalSilverpeas​(org.apache.ecs.ElementContainer xhtml,
                                                                               String language)
      • includeIFrameAjaxTransport

        public static org.apache.ecs.ElementContainer includeIFrameAjaxTransport​(org.apache.ecs.ElementContainer xhtml)
      • includeAutoresize

        public static org.apache.ecs.ElementContainer includeAutoresize​(org.apache.ecs.ElementContainer xhtml)
      • getDynamicSubscriptionJavascriptLoadContent

        public static String getDynamicSubscriptionJavascriptLoadContent​(String jsCallback)
        Includes a dynamic loading of Silverpeas subscription JQuery Plugin. This plugin depends on the 'popup' one and handles its loading.
        Parameters:
        jsCallback - javascript routine as string (without function declaration that wraps it) that is always performed after that the plugin existence is verified.
        Returns:
        the container that contains the script loading.
      • normalizeWebResourceUrl

        public static String normalizeWebResourceUrl​(String url)
        Normalizes the given url in order to handle:
        • js and css minify
        • version append in order to handle the cache
        Parameters:
        url - the URL to normalize.
        Returns:
        the normalized URL