You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@verizon.net> on 2003/11/18 15:22:50 UTC

Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

jeremy@apache.org wrote:

>jeremy      2003/11/18 05:16:34
>
>  Modified:    src/blocks/woody/samples/resources woody-field-styling.xsl
>  Log:
>  My sincere appologies, I committed the wrong project !!!!
>  Undoing my changes .... (I HOPE!!!)
>  
>  Revision  Changes    Path
>  1.15      +0 -5      cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl
>  
>  Index: woody-field-styling.xsl
>  ===================================================================
>  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl,v
>  retrieving revision 1.14
>  retrieving revision 1.15
>  diff -u -r1.14 -r1.15
>  --- woody-field-styling.xsl	18 Nov 2003 13:13:04 -0000	1.14
>  +++ woody-field-styling.xsl	18 Nov 2003 13:16:34 -0000	1.15
>  @@ -75,11 +75,6 @@
>       <xsl:if test="@required='true'">
>         <span class="woody-field-required"> * </span>
>       </xsl:if>
>  -    <xsl:apply-templates select="wi:help"/>
>  -  </xsl:template>
>  -
>  -  <xsl:template match="wi:help">
>  -    <a href="#" style="color:orange; font-weight: bold" onclick="alert('{normalize-space(.)}'); return false;">&#160;?&#160;</a>
>     </xsl:template>
>   
>     <xsl:template match="wi:validation-message">
>

You can try this for wi:help:

    <xsl:if test="wi:help">
      <span id="h{generate-id()}" 
style="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;">
        <div style="border-style: solid; border-width: 1px; margin: 1px; 
padding: 5px;">
          <xsl:apply-templates select="wi:help"/>
        </div>
      </span>
      <script language="JavaScript">
        var hWin<xsl:value-of select="generate-id()"/> = new 
PopupWindow('h<xsl:value-of select="generate-id()"/>');
        hWin<xsl:value-of select="generate-id()"/>.autoHide();
      </script>
      <a id="{generate-id()}" href="#" 
onclick="hWin{generate-id()}.showPopup('{generate-id()}');return 
false;"><img border="0" src="resources/help.png"/></a>
    </xsl:if>

It will generate nice popup using same Calendar.js script, and this 
popup will support html tags, not like this alert() window


Vadim



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:

> Vadim Gritsenko wrote:
>
>> Sylvain Wallez wrote:
>>
>>> Noooooooooooo!!
>>>
>>> I spent a large part of the afternoon and all this evening on these 
>>> issues and just solved them!
>>>
>>> I was just doing the final polishing before committing. Please wait 
>>> a few minutes.
>>
>>
>> It's sooooo complicated! I'd not be able to do it as I don't know 
>> javascript that well :)
>

Well, flowscript allowed me to increase my JS knowledge a lot! Using the 
same language client-side and server-side shows some benefits here.

>> Do you mind some simplifications? I.e.:
>> * Move all <div/>s just right after (or before) calendar div (in 
>> woody-field-body, <apply-templates select="//wi:help" mode="popup-div"/>
>
>
> After some thinking... I like this placing of <div>s. The only problem 
> might be in woody-lib.js, line 72:
>
>    var element = document.getElementById(this.id);
>
> AFAIU, not all currently used browsers supporting this ... At least in 
> Matt's library there are checks like:
>
>   if(document.getElementById){use_gebi=....


Yep, some polishing is needed to support some older browsers. I have to 
install a NN 4.7 to see how all this behaves.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Vadim Gritsenko <va...@verizon.net>.
Vadim Gritsenko wrote:

> Sylvain Wallez wrote:
>
>> Noooooooooooo!!
>>
>> I spent a large part of the afternoon and all this evening on these 
>> issues and just solved them!
>>
>> I was just doing the final polishing before committing. Please wait a 
>> few minutes.
>
>
>
> It's sooooo complicated! I'd not be able to do it as I don't know 
> javascript that well :)
>
> Do you mind some simplifications? I.e.:
> * Move all <div/>s just right after (or before) calendar div (in 
> woody-field-body, <apply-templates select="//wi:help" mode="popup-div"/>


After some thinking... I like this placing of <div>s. The only problem 
might be in woody-lib.js, line 72:

    var element = document.getElementById(this.id);

AFAIU, not all currently used browsers supporting this ... At least in 
Matt's library there are checks like:

   if(document.getElementById){use_gebi=....


Vadim



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Vadim Gritsenko <va...@verizon.net>.
Sylvain Wallez wrote:

> Vadim Gritsenko wrote:
>
>> Vadim Gritsenko wrote:
>>
>>> Sylvain Wallez wrote:
>>>
> <snip/>
>
>>>>
>>>> Looks super-cool. Wanna commit it?
>>>
>>>
>>>
>>
>> Ok, I'm working on it... Found some issues with IE with the above 
>> code... Will try some workaround(s)...
>
>
>
>
> Noooooooooooo!!
>
> I spent a large part of the afternoon and all this evening on these 
> issues and just solved them!
>
> I was just doing the final polishing before committing. Please wait a 
> few minutes.


It's sooooo complicated! I'd not be able to do it as I don't know 
javascript that well :)

Do you mind some simplifications? I.e.:
 * Move all <div/>s just right after (or before) calendar div (in 
woody-field-body, <apply-templates select="//wi:help" mode="popup-div"/>
 * Move script snippets to the <head/> (in woody-field-head, 
<apply-templates select="//wi:help" mode="popup-script"/>)
?

Then, init handlers and couple of functions will go away.

Vadim



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:

> Vadim Gritsenko wrote:
>
>> Sylvain Wallez wrote:
>>
<snip/>

>>>
>>> Looks super-cool. Wanna commit it?
>>
>>
>
> Ok, I'm working on it... Found some issues with IE with the above 
> code... Will try some workaround(s)...



Noooooooooooo!!

I spent a large part of the afternoon and all this evening on these 
issues and just solved them!

I was just doing the final polishing before committing. Please wait a 
few minutes.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 18 Nov 2003, at 21:22, Vadim Gritsenko wrote:

> Vadim Gritsenko wrote:
>
>> Sylvain Wallez wrote:
>>
>>> Vadim Gritsenko wrote:
>>
> ...
>
>>>> You can try this for wi:help:
>>>>
>>>>    <xsl:if test="wi:help">
>>>>      <span id="h{generate-id()}"  
>>>> style="position:absolute;visibility:hidden;background-color:white; 
>>>> layer-background-color:white;">
>>>>        <div style="border-style: solid; border-width: 1px; margin:  
>>>> 1px; padding: 5px;">
>>>>          <xsl:apply-templates select="wi:help"/>
>>>>        </div>
>>>>      </span>
>>>>      <script language="JavaScript">
>>>>        var hWin<xsl:value-of select="generate-id()"/> = new  
>>>> PopupWindow('h<xsl:value-of select="generate-id()"/>');
>>>>        hWin<xsl:value-of select="generate-id()"/>.autoHide();
>>>>      </script>
>>>>      <a id="{generate-id()}" href="#"  
>>>> onclick="hWin{generate-id()}.showPopup('{generate-id()}');return  
>>>> false;"><img border="0" src="resources/help.png"/></a>
>>>>    </xsl:if>
>>>>
>>>> It will generate nice popup using same Calendar.js script, and this  
>>>> popup will support html tags, not like this alert() window
>>>
>>>
>>>
>>>
>>> Looks super-cool. Wanna commit it?
>>
>
> Ok, I'm working on it... Found some issues with IE with the above  
> code... Will try some workaround(s)...

Turned out to be one of my better mistakes ;)

Thanks Guys

regards Jeremy

Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Vadim Gritsenko <va...@verizon.net>.
Vadim Gritsenko wrote:

> Sylvain Wallez wrote:
>
>> Vadim Gritsenko wrote:
>
...

>>> You can try this for wi:help:
>>>
>>>    <xsl:if test="wi:help">
>>>      <span id="h{generate-id()}" 
>>> style="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"> 
>>>
>>>        <div style="border-style: solid; border-width: 1px; margin: 
>>> 1px; padding: 5px;">
>>>          <xsl:apply-templates select="wi:help"/>
>>>        </div>
>>>      </span>
>>>      <script language="JavaScript">
>>>        var hWin<xsl:value-of select="generate-id()"/> = new 
>>> PopupWindow('h<xsl:value-of select="generate-id()"/>');
>>>        hWin<xsl:value-of select="generate-id()"/>.autoHide();
>>>      </script>
>>>      <a id="{generate-id()}" href="#" 
>>> onclick="hWin{generate-id()}.showPopup('{generate-id()}');return 
>>> false;"><img border="0" src="resources/help.png"/></a>
>>>    </xsl:if>
>>>
>>> It will generate nice popup using same Calendar.js script, and this 
>>> popup will support html tags, not like this alert() window
>>
>>
>>
>>
>> Looks super-cool. Wanna commit it?
>

Ok, I'm working on it... Found some issues with IE with the above 
code... Will try some workaround(s)...

Vadim



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Vadim Gritsenko <va...@verizon.net>.
Sylvain Wallez wrote:

> Vadim Gritsenko wrote:
>
>> jeremy@apache.org wrote:
>>
>>> jeremy      2003/11/18 05:16:34
>>>
>>>  Modified:    src/blocks/woody/samples/resources 
>>> woody-field-styling.xsl
>>>  Log:
>>>  My sincere appologies, I committed the wrong project !!!!
>>>  Undoing my changes .... (I HOPE!!!)
>>>  
>>>  Revision  Changes    Path
>>>  1.15      +0 -5      
>>> cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl
>>>  
>>>  Index: woody-field-styling.xsl
>>>  ===================================================================
>>>  RCS file: 
>>> /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl,v 
>>>
>>>  retrieving revision 1.14
>>>  retrieving revision 1.15
>>>  diff -u -r1.14 -r1.15
>>>  --- woody-field-styling.xsl    18 Nov 2003 13:13:04 -0000    1.14
>>>  +++ woody-field-styling.xsl    18 Nov 2003 13:16:34 -0000    1.15
>>>  @@ -75,11 +75,6 @@
>>>       <xsl:if test="@required='true'">
>>>         <span class="woody-field-required"> * </span>
>>>       </xsl:if>
>>>  -    <xsl:apply-templates select="wi:help"/>
>>>  -  </xsl:template>
>>>  -
>>>  -  <xsl:template match="wi:help">
>>>  -    <a href="#" style="color:orange; font-weight: bold" 
>>> onclick="alert('{normalize-space(.)}'); return 
>>> false;">&#160;?&#160;</a>
>>>     </xsl:template>
>>>       <xsl:template match="wi:validation-message">
>>>
>>
>> You can try this for wi:help:
>>
>>    <xsl:if test="wi:help">
>>      <span id="h{generate-id()}" 
>> style="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"> 
>>
>>        <div style="border-style: solid; border-width: 1px; margin: 
>> 1px; padding: 5px;">
>>          <xsl:apply-templates select="wi:help"/>
>>        </div>
>>      </span>
>>      <script language="JavaScript">
>>        var hWin<xsl:value-of select="generate-id()"/> = new 
>> PopupWindow('h<xsl:value-of select="generate-id()"/>');
>>        hWin<xsl:value-of select="generate-id()"/>.autoHide();
>>      </script>
>>      <a id="{generate-id()}" href="#" 
>> onclick="hWin{generate-id()}.showPopup('{generate-id()}');return 
>> false;"><img border="0" src="resources/help.png"/></a>
>>    </xsl:if>
>>
>> It will generate nice popup using same Calendar.js script, and this 
>> popup will support html tags, not like this alert() window
>
>
>
> Looks super-cool. Wanna commit it?


I don't have good icon for it ;-)
Go ahead, if you want, don't wait for me :)

Vadim



Re: cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-field-styling.xsl

Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:

> jeremy@apache.org wrote:
>
>> jeremy      2003/11/18 05:16:34
>>
>>  Modified:    src/blocks/woody/samples/resources woody-field-styling.xsl
>>  Log:
>>  My sincere appologies, I committed the wrong project !!!!
>>  Undoing my changes .... (I HOPE!!!)
>>  
>>  Revision  Changes    Path
>>  1.15      +0 -5      
>> cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl
>>  
>>  Index: woody-field-styling.xsl
>>  ===================================================================
>>  RCS file: 
>> /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl,v 
>>
>>  retrieving revision 1.14
>>  retrieving revision 1.15
>>  diff -u -r1.14 -r1.15
>>  --- woody-field-styling.xsl    18 Nov 2003 13:13:04 -0000    1.14
>>  +++ woody-field-styling.xsl    18 Nov 2003 13:16:34 -0000    1.15
>>  @@ -75,11 +75,6 @@
>>       <xsl:if test="@required='true'">
>>         <span class="woody-field-required"> * </span>
>>       </xsl:if>
>>  -    <xsl:apply-templates select="wi:help"/>
>>  -  </xsl:template>
>>  -
>>  -  <xsl:template match="wi:help">
>>  -    <a href="#" style="color:orange; font-weight: bold" 
>> onclick="alert('{normalize-space(.)}'); return false;">&#160;?&#160;</a>
>>     </xsl:template>
>>       <xsl:template match="wi:validation-message">
>>
>
> You can try this for wi:help:
>
>    <xsl:if test="wi:help">
>      <span id="h{generate-id()}" 
> style="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"> 
>
>        <div style="border-style: solid; border-width: 1px; margin: 
> 1px; padding: 5px;">
>          <xsl:apply-templates select="wi:help"/>
>        </div>
>      </span>
>      <script language="JavaScript">
>        var hWin<xsl:value-of select="generate-id()"/> = new 
> PopupWindow('h<xsl:value-of select="generate-id()"/>');
>        hWin<xsl:value-of select="generate-id()"/>.autoHide();
>      </script>
>      <a id="{generate-id()}" href="#" 
> onclick="hWin{generate-id()}.showPopup('{generate-id()}');return 
> false;"><img border="0" src="resources/help.png"/></a>
>    </xsl:if>
>
> It will generate nice popup using same Calendar.js script, and this 
> popup will support html tags, not like this alert() window


Looks super-cool. Wanna commit it?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com