forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Pablos <che...@che-che.com>
Subject Re: [patch] [copyless] Discrepancy in skin images used between static and webapp sites
Date Thu, 29 Apr 2004 17:39:11 GMT
Applied.
Thanks for this.
Cheers,
Cheche
Rick Tessner escribió:
> Hi all,
> 
> There's a discrepancy that I'm seeing between the skin images used in
> the static site vs. those used in a webapp site.
> 
> In particular, I've been using the tigris-style skin and the pdfdoc.gif
> that is being used in the webapp is the one that is defined in the
> tigris-style skin.
> 
> In the statically generated site, the pdfdoc.gif used is the one from
> the common/images.
> 
> Looking through the core/targets/site.xml, I noticed that the <copy>
> task that does the copying of the common and skin images has two
> <fileset> defined.
> 
> It's not clear to me whether the order in of the <fileset> elements in
> the <copy> element define the order in which the copy should happen.
> 
> The webapp sitemaps are very clear in the order that the images should
> be used: First if the requested image exists in the skin, use it. 
> Otherwise, use the common image if it exists.
> 
> The same seems to be implied in the <copy> task, however it does not
> seem to happen that way.  At least under my platform (SuSE Linux 9.0,
> java 1.4.2).
> 
> A quick review of the Ant docs did not say whether the multiple
> <fileset> definitions will result in having the files copied in
> <fileset> order.
> 
> Splitting the <copy> tasks with two <fileset> elements into two separate
> <copy> tasks results in a more consistent skinning between the static
> and webapp generated docs.  (The relevant <copy> tasks are within a
> <sequential> element, which guarantees the individual <copy> tasks will
> happen in the order specified ... that doesn't seem to affect the order
> of  the <fileset> within the <copy> task however) .
> 
> Patch is attached, if this is indeed considered an issue.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/core/targets/site.xml
> ===================================================================
> --- src/core/targets/site.xml	(revision 10385)
> +++ src/core/targets/site.xml	(working copy)
> @@ -97,20 +97,30 @@
>          <mkdir dir="${project.site-dir}/skin/images"/>
>           <!-- FIXME: we will only be using either project skins or forrest skins
- only copy those necessary (don't forget common) -->
>           <!-- Copy forrest skin images -->
> +         <!-- Do the common ones first followed by those for the skin. -->
>          <copy toDir="${project.site-dir}/skin/images" overwrite="true"
>            failonerror="false">
>             <fileset dir="${forrest.skins-dir}/common/images"/>
> +        </copy>
> +        <copy toDir="${project.site-dir}/skin/images" overwrite="true"
> +          failonerror="false">
>             <fileset dir="${forrest.skins-dir}/${project.skin}/images"/>
>          </copy>
> +
>          <!-- Copy project skin images -->
> +        <!-- Do the common ones first followed by those for the skin. -->
>          <copy toDir="${project.site-dir}/skin/images" overwrite="true"
>            failonerror="false">
>            <fileset dir="${project.skins-dir}/common/images"/>
> +        </copy>
> +        <copy toDir="${project.site-dir}/skin/images" overwrite="true"
> +          failonerror="false">
>            <fileset dir="${project.skins-dir}/${project.skin}/images"/>
>          </copy>
>   
>  
>          <!-- Copy all other non-resource files -->
> +        <!-- Do the common ones first followed by those for the skin. -->
>          <copy toDir="${project.site-dir}/skin" 
>            overwrite="true"
>            failonerror="false">
> @@ -119,13 +129,20 @@
>              <exclude name="images/**"/>
>              <exclude name="xslt/**"/>
>            </fileset>
> +        </copy>
> +        <copy toDir="${project.site-dir}/skin" 
> +          overwrite="true"
> +          failonerror="false">
> +          <mapper type="flatten"/>
>            <fileset dir="${forrest.skins-dir}/${project.skin}">
>              <exclude name="images/**"/>
>              <exclude name="xslt/**"/>
>            </fileset>
>          </copy>
>          
> +        
>          <!-- Copy all other non-resource files from project skins-->
> +        <!-- Do the common ones first followed by those for the skin. -->
>          <copy toDir="${project.site-dir}/skin" 
>            overwrite="true"
>            failonerror="false">
> @@ -134,6 +151,11 @@
>              <exclude name="images/**"/>
>              <exclude name="xslt/**"/>
>            </fileset>
> +        </copy>
> +        <copy toDir="${project.site-dir}/skin" 
> +          overwrite="true"
> +          failonerror="false">
> +          <mapper type="flatten"/>
>            <fileset dir="${project.skins-dir}/${project.skin}">
>              <exclude name="images/**"/>
>              <exclude name="xslt/**"/>



Mime
View raw message