You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Rick Tessner <ri...@onnadayr.ca> on 2004/04/29 19:16:16 UTC
[patch] [copyless] Discrepancy in skin images used between static
and webapp sites
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.
--
Rick Tessner <ri...@onnadayr.ca>
Re: [patch] [copyless] Discrepancy in skin images used between static
and webapp sites
Posted by Juan Jose Pablos <ch...@che-che.com>.
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/**"/>