cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: adding a close control to help popups
Date Fri, 03 Sep 2004 09:10:12 GMT

On 2 Sep 2004, at 13:55, Steven Noels wrote:

> On 02 Sep 2004, at 13:55, Jeremy Quinn wrote:
>> Does anyone object to my adding this modification to the CForms XSLT ?
> Please do. It's been annoying me as well. Top left might be better 
> since sometimes these pop-ups are chopped off by my right browser edge 
> as well.

Thanks for your response Steven.
I tried it on the left, but it is not quite so discreet, ie. it has a 
bigger effect on the overall layout.

I am away all next week, and pretty busy until then, so I am not sure 
if I will have a chance to apply this before I go.

If you would like to experiment for yourself, here is what I did .....

this is a template in "forms-advanced-field-styling.xsl" :

<xsl:template match="fi:help">
   <xsl:variable name="id" select="generate-id()"/>
   <div class="forms-help" id="help{$id}" style="visibility:hidden; 
	<!-- close button -->
     <span style="float:right"><a href="#" 
onClick="helpWin{$id}.hidePopup();return false;"><img align="top" 
alt="close" src="{$resources-uri}/close.gif" height="6" 
	<!-- / close button -->
     <xsl:apply-templates select="node()"/>
   <script type="text/javascript">
     var helpWin<xsl:value-of select="$id"/> = 
forms_createPopupWindow('help<xsl:value-of select="$id"/>');
   <a id="{$id}" name="{$id}" href="#" 
onclick="helpWin{$id}.showPopup('{$id}');return false;">
     <!-- TODO: i18n key for helppopup -->
     <img src="{$resources-uri}/help.gif" alt="helppopup"/>

And the gif (if it helps) is here -->
View raw message