You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Gavin (JIRA)" <ji...@apache.org> on 2007/03/05 12:18:51 UTC
[jira] Commented: (FOR-960) PNG Images not transparent in IE6 or
below
[ https://issues.apache.org/jira/browse/FOR-960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477990 ]
Gavin commented on FOR-960:
---------------------------
Looking in the source I see
<img alt="MyGroup" class="logoImage" src="images/group.png" title="MyGroup Description" />
<img alt="MyProject" class="logoImage" src="images/project.png" title="MyProject Description" />
Can anyone see where the class="logoImage" is applied, I can't locate it at present.
For this fix to work I need to create a unique id="logoImage1" and id="logoImage2" for each one.
> PNG Images not transparent in IE6 or below
> ------------------------------------------
>
> Key: FOR-960
> URL: https://issues.apache.org/jira/browse/FOR-960
> Project: Forrest
> Issue Type: Bug
> Components: Dispatcher (aka views)
> Affects Versions: 0.8-dev
> Reporter: Gavin
> Assigned To: Gavin
> Fix For: 0.8-dev
>
>
> As an example, the project logo images appear with a white-ish background when viewed in IE6 or earlier. Fine in Firefox etc.
> This can be overcome with an AlphaImageLoader fix applied.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Commented: (FOR-960) PNG Images not transparent in IE6 or below
Posted by "Gav...." <br...@brightontown.com.au>.
Ross, this is where I'm at so far.
I'll link this thread to the issue also,
thanks
Gav...
> -----Original Message-----
> From: Gav.... [mailto:brightoncomputers@brightontown.com.au]
> Sent: Tuesday, 13 March 2007 8:21 PM
> To: dev@forrest.apache.org
> Subject: RE: [jira] Commented: (FOR-960) PNG Images not transparent in IE6
> or below
>
>
>
> > -----Original Message-----
> > From: David Crossley [mailto:crossley@apache.org]
> > Sent: Tuesday, 6 March 2007 8:31 AM
> > To: dev@forrest.apache.org
> > Subject: Re: [jira] Commented: (FOR-960) PNG Images not transparent in
> IE6
> > or below
> >
> > Gavin (JIRA) wrote:
> > >
> > > [ https://issues.apache.org/jira/browse/FOR-960
> > >
> > > Gavin commented on FOR-960:
> > > ---------------------------
> > >
> > > Looking in the source I see
> > >
> > > <img alt="MyGroup" class="logoImage" src="images/group.png"
> > title="MyGroup Description" />
> > >
> > > <img alt="MyProject" class="logoImage" src="images/project.png"
> > title="MyProject Description" />
> > >
> > > Can anyone see where the class="logoImage" is applied, I can't locate
> it
> > at present.
> > >
> > > For this fix to work I need to create a unique id="logoImage1" and
> > id="logoImage2" for each one.
> >
> > [whiteboard/plugins]$ find org.apache.forrest.plugin.internal.dispatcher
> > org.apache.forrest.themes.core -name *.xsl | xargs grep -l logoImage
> >
> org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common
> > /xslt/html/renderlogo.xsl
> >
> org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common
> > /xslt/html/site-to-xhtml.xsl
> >
> > -David
>
> Very grateful for this David, thanks.
>
> However I have come unstuck already,
>
> Working with dispatcher so Thorsten I guess is the best call, but whoever
> has any ideas as to what I have/not done.
>
> In renderlogo.xsl I have :-
>
> <xsl:template name="renderlogo">
> <xsl:param name="name"/>
> <xsl:param name="url"/>
> <xsl:param name="logo"/>
> <xsl:param name="class"/>
> <xsl:param name="width"/>
> <xsl:param name="height"/>
> <xsl:param name="root"/>
> <xsl:param name="description"/>
> <a href="{$url}">
> <xsl:choose>
> <xsl:when test="$logo and not($logo = '')">
> <img alt="{$name}">
> <xsl:choose>
> <xsl:when test="$class and not($class='')">
> <xsl:attribute name="class"><xsl:value-of
> select="$class"/></xsl:attribute>
> </xsl:when>
> <xsl:otherwise><xsl:attribute name="class"><xsl:value-of
> select="logoImageGav"/></xsl:attribute></xsl:otherwise>
> </xsl:choose>
> <xsl:attribute name="src">
> <xsl:if test="not(starts-with($logo,
> 'http://'))"><xsl:value-of select="$root"/></xsl:if>
> <xsl:value-of select="$logo"/>
> </xsl:attribute>
> <xsl:if test="$width">
> <xsl:attribute name="width"><xsl:value-of
> select="$width"/></xsl:attribute>
> </xsl:if>
> <xsl:if test="$height">
> <xsl:attribute name="height"><xsl:value-of
> select="$height"/></xsl:attribute>
> </xsl:if>
> <xsl:if test="$description">
> <xsl:attribute name="title"><xsl:value-of
> select="$description"/></xsl:attribute>
> </xsl:if>
> </img>
> </xsl:when>
> <xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
> </xsl:choose>
> </a>
> </xsl:template>
>
> </xsl:stylesheet>
>
> In branding-logo.ft :-
>
> <forrest:template
> xmlns:forrest="http://apache.org/forrest/templates/1.0"
> name="branding-logo" inputFormat="xsl">
>
> <xsl:stylesheet version="1.1"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:include
> href="cocoon://prepare.contract.html.helper-render-image"/>
> <xsl:param name="defaultVariables" select="'test.html'"/>
> <xsl:param name="branding-logo-name"/>
> <xsl:param name="branding-logo-description"/>
> <xsl:param name="branding-logo-url"/>
> <xsl:param name="branding-logo-logo"/>
> <xsl:param name="branding-logo-class"/>
> <xsl:param name="branding-logo-over"/>
> <xsl:param name="branding-logo-width"/>
> <xsl:param name="branding-logo-height"/>
> <xsl:variable name="root"
> select="$defaultVariables/*/*[@name='root']/@value"/>
> <xsl:template match="/">
> <forrest:content>
> <forrest:part>
> <xsl:comment>+
> |start Logo
> +</xsl:comment>
> <xsl:call-template name="renderlogo">
> <xsl:with-param name="name"
> select="normalize-space($branding-logo-name)"/>
> <xsl:with-param name="url"
> select="normalize-space($branding-logo-url)"/>
> <xsl:with-param name="logo"
> select="normalize-space($branding-logo-logo)"/>
> <xsl:with-param name="class"
> select="normalize-space($branding-logo-class)"/>
> <xsl:with-param name="rollover"
> select="normalize-space($branding-logo-over)"/>
> <xsl:with-param name="width"
> select="normalize-space($branding-logo-width)"/>
> <xsl:with-param name="height"
> select="normalize-space($branding-logo-height)"/>
> <xsl:with-param name="root" select="$root"/>
> <xsl:with-param name="description"
> select="normalize-space($branding-logo-description)"/>
> </xsl:call-template>
> <xsl:comment>+
> |end group Logo
> +</xsl:comment>
> </forrest:part>
>
> In pelt-html.vt.xml I have :-
>
> <forrest:hook class="logo">
> <forrest:contract name="branding-logo">
> <forrest:property name="branding-logo-name">
> MyGroup</forrest:property>
> <forrest:property name="branding-logo-description">MyGroup
> Description</forrest:property>
> <forrest:property name="branding-logo-url">
> http://mygroup.org/</forrest:property>
> <forrest:property name="branding-logo-logo">
> images/group.png</forrest:property>
> <forrest:property name="branding-logo-class">
> logoImage3</forrest:property>
> </forrest:contract>
> </forrest:hook>
> <forrest:hook class="logo">
> <forrest:contract name="branding-logo">
> <forrest:property name="branding-logo-name">
> MyProject</forrest:property>
> <forrest:property name="branding-logo-description">MyProject
> Description</forrest:property>
> <forrest:property name="branding-logo-url">
> http://myproj.mygroup.org/</forrest:property>
> <forrest:property name="branding-logo-logo">
> images/project.png</forrest:property>
> </forrest:contract>
> </forrest:hook>
>
> What do I expect to get ?
>
> The first logo contains an @class value so I expect it to be
> class="logoImage3"
>
> The second logo does not specify an @class so the default should appear
> which I for testing reasons called it and expect class="logoImageGav"
>
> But what I get on a forrest run of a seed-sample dispatcher site -
>
> I STILL get both logos with a class="logoImage"
>
> Arrggh, I though I'd over-ridden that in renderlogo.xsl (which is in
> /common/xslt/html -- I tried also copying and modifying into the
> pelt/xslt/html with no difference.
>
> Any ideas, sorry, asking lots of Q's this week.
>
> Gav...
RE: [jira] Commented: (FOR-960) PNG Images not transparent in IE6 or below
Posted by "Gav...." <br...@brightontown.com.au>.
> -----Original Message-----
> From: David Crossley [mailto:crossley@apache.org]
> Sent: Tuesday, 6 March 2007 8:31 AM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-960) PNG Images not transparent in IE6
> or below
>
> Gavin (JIRA) wrote:
> >
> > [ https://issues.apache.org/jira/browse/FOR-960
> >
> > Gavin commented on FOR-960:
> > ---------------------------
> >
> > Looking in the source I see
> >
> > <img alt="MyGroup" class="logoImage" src="images/group.png"
> title="MyGroup Description" />
> >
> > <img alt="MyProject" class="logoImage" src="images/project.png"
> title="MyProject Description" />
> >
> > Can anyone see where the class="logoImage" is applied, I can't locate it
> at present.
> >
> > For this fix to work I need to create a unique id="logoImage1" and
> id="logoImage2" for each one.
>
> [whiteboard/plugins]$ find org.apache.forrest.plugin.internal.dispatcher
> org.apache.forrest.themes.core -name *.xsl | xargs grep -l logoImage
> org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common
> /xslt/html/renderlogo.xsl
> org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common
> /xslt/html/site-to-xhtml.xsl
>
> -David
Very grateful for this David, thanks.
However I have come unstuck already,
Working with dispatcher so Thorsten I guess is the best call, but whoever
has any ideas as to what I have/not done.
In renderlogo.xsl I have :-
<xsl:template name="renderlogo">
<xsl:param name="name"/>
<xsl:param name="url"/>
<xsl:param name="logo"/>
<xsl:param name="class"/>
<xsl:param name="width"/>
<xsl:param name="height"/>
<xsl:param name="root"/>
<xsl:param name="description"/>
<a href="{$url}">
<xsl:choose>
<xsl:when test="$logo and not($logo = '')">
<img alt="{$name}">
<xsl:choose>
<xsl:when test="$class and not($class='')">
<xsl:attribute name="class"><xsl:value-of
select="$class"/></xsl:attribute>
</xsl:when>
<xsl:otherwise><xsl:attribute name="class"><xsl:value-of
select="logoImageGav"/></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:attribute name="src">
<xsl:if test="not(starts-with($logo,
'http://'))"><xsl:value-of select="$root"/></xsl:if>
<xsl:value-of select="$logo"/>
</xsl:attribute>
<xsl:if test="$width">
<xsl:attribute name="width"><xsl:value-of
select="$width"/></xsl:attribute>
</xsl:if>
<xsl:if test="$height">
<xsl:attribute name="height"><xsl:value-of
select="$height"/></xsl:attribute>
</xsl:if>
<xsl:if test="$description">
<xsl:attribute name="title"><xsl:value-of
select="$description"/></xsl:attribute>
</xsl:if>
</img>
</xsl:when>
<xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
</xsl:choose>
</a>
</xsl:template>
</xsl:stylesheet>
In branding-logo.ft :-
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
name="branding-logo" inputFormat="xsl">
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include
href="cocoon://prepare.contract.html.helper-render-image"/>
<xsl:param name="defaultVariables" select="'test.html'"/>
<xsl:param name="branding-logo-name"/>
<xsl:param name="branding-logo-description"/>
<xsl:param name="branding-logo-url"/>
<xsl:param name="branding-logo-logo"/>
<xsl:param name="branding-logo-class"/>
<xsl:param name="branding-logo-over"/>
<xsl:param name="branding-logo-width"/>
<xsl:param name="branding-logo-height"/>
<xsl:variable name="root"
select="$defaultVariables/*/*[@name='root']/@value"/>
<xsl:template match="/">
<forrest:content>
<forrest:part>
<xsl:comment>+
|start Logo
+</xsl:comment>
<xsl:call-template name="renderlogo">
<xsl:with-param name="name"
select="normalize-space($branding-logo-name)"/>
<xsl:with-param name="url"
select="normalize-space($branding-logo-url)"/>
<xsl:with-param name="logo"
select="normalize-space($branding-logo-logo)"/>
<xsl:with-param name="class"
select="normalize-space($branding-logo-class)"/>
<xsl:with-param name="rollover"
select="normalize-space($branding-logo-over)"/>
<xsl:with-param name="width"
select="normalize-space($branding-logo-width)"/>
<xsl:with-param name="height"
select="normalize-space($branding-logo-height)"/>
<xsl:with-param name="root" select="$root"/>
<xsl:with-param name="description"
select="normalize-space($branding-logo-description)"/>
</xsl:call-template>
<xsl:comment>+
|end group Logo
+</xsl:comment>
</forrest:part>
In pelt-html.vt.xml I have :-
<forrest:hook class="logo">
<forrest:contract name="branding-logo">
<forrest:property name="branding-logo-name">
MyGroup</forrest:property>
<forrest:property name="branding-logo-description">MyGroup
Description</forrest:property>
<forrest:property name="branding-logo-url">
http://mygroup.org/</forrest:property>
<forrest:property name="branding-logo-logo">
images/group.png</forrest:property>
<forrest:property name="branding-logo-class">
logoImage3</forrest:property>
</forrest:contract>
</forrest:hook>
<forrest:hook class="logo">
<forrest:contract name="branding-logo">
<forrest:property name="branding-logo-name">
MyProject</forrest:property>
<forrest:property name="branding-logo-description">MyProject
Description</forrest:property>
<forrest:property name="branding-logo-url">
http://myproj.mygroup.org/</forrest:property>
<forrest:property name="branding-logo-logo">
images/project.png</forrest:property>
</forrest:contract>
</forrest:hook>
What do I expect to get ?
The first logo contains an @class value so I expect it to be
class="logoImage3"
The second logo does not specify an @class so the default should appear
which I for testing reasons called it and expect class="logoImageGav"
But what I get on a forrest run of a seed-sample dispatcher site -
I STILL get both logos with a class="logoImage"
Arrggh, I though I'd over-ridden that in renderlogo.xsl (which is in
/common/xslt/html -- I tried also copying and modifying into the
pelt/xslt/html with no difference.
Any ideas, sorry, asking lots of Q's this week.
Gav...
Re: [jira] Commented: (FOR-960) PNG Images not transparent in IE6 or below
Posted by David Crossley <cr...@apache.org>.
Gavin (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/FOR-960
>
> Gavin commented on FOR-960:
> ---------------------------
>
> Looking in the source I see
>
> <img alt="MyGroup" class="logoImage" src="images/group.png" title="MyGroup Description" />
>
> <img alt="MyProject" class="logoImage" src="images/project.png" title="MyProject Description" />
>
> Can anyone see where the class="logoImage" is applied, I can't locate it at present.
>
> For this fix to work I need to create a unique id="logoImage1" and id="logoImage2" for each one.
[whiteboard/plugins]$ find org.apache.forrest.plugin.internal.dispatcher org.apache.forrest.themes.core -name *.xsl | xargs grep -l logoImage
org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/renderlogo.xsl
org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/site-to-xhtml.xsl
-David