[ 
https://issues.apache.org/jira/browse/WICKET-5827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14358243#comment-14358243
 ] 

ASF GitHub Bot commented on WICKET-5827:
----------------------------------------

Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/97#discussion_r26283695
  
    --- Diff: 
wicket-core/src/main/java/org/apache/wicket/resource/CssUrlReplacer.java ---
    @@ -71,21 +82,67 @@ else if (imageCandidateUrl.isContextAbsolute())
                                // relativize against the url for the 
containing CSS file
                                Url cssUrlCopy = new Url(cssUrl);
                                cssUrlCopy.resolveRelative(imageCandidateUrl);
    -                           PackageResourceReference imageReference = new 
PackageResourceReference(scope,
    -                                   cssUrlCopy.toString());
    -                           processedUrl = cycle.urlFor(imageReference, 
null);
    +
    +                           // if the image should be processed as URL or 
base64 embedded
    +                           if (cssUrlCopy.getQueryString() != null &&
    +                                   
cssUrlCopy.getQueryString().contains(EMBED_BASE64))
    +                           {
    +                                   embedded = true;
    +                                   PackageResourceReference imageReference 
= new PackageResourceReference(scope,
    +                                           
cssUrlCopy.toString().replace("?" + EMBED_BASE64, ""));
    +                                   try
    +                                   {
    +                                           processedUrl = 
createBase64EncodedImage(imageReference);
    +                                   }
    +                                   catch (Exception e)
    +                                   {
    +                                           throw new 
WicketRuntimeException(
    +                                                   "Error while embedding 
an image into the css: " +
    +                                                           
imageReference.toString(), e);
    --- End diff --
    
    no need of `toString()`. It is called implicitly.


> Allow to apply multiple Javascript / CSS compressors
> ----------------------------------------------------
>
>                 Key: WICKET-5827
>                 URL: https://issues.apache.org/jira/browse/WICKET-5827
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 6.20.0, 7.0.0-M6
>            Reporter: Tobias Soloschenko
>            Assignee: Martin Grigorov
>            Priority: Minor
>              Labels: features
>             Fix For: 6.20.0, 7.0.0-M6
>
>
> It would be nice to be able to add several css and javascript compressions in 
> a chain. Example for CSS:
> CssRemoveCommentsCompressor > CssUrlReplacementCompressor > 
> CssMinifyCompressor
> The same would be nice for JavaScript files.
> https://github.com/apache/wicket/pull/88
> https://github.com/apache/wicket/pull/87



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to