You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@apache.org> on 2003/11/19 17:53:57 UTC
New woody multivaluefield styling: the double listbox
Hi all,
Woody goodie of the day, I wrote a new styling for multivalue fields. We
already had list-type="checkbox", list-type="listbox" and we now have
list-type="double-listbox".
This displays two lists with buttons between them to switch items
between the lists. The selected values are on the left.
This again relies on Matt Kruse's JS libraries (thanks Matt!) and
required to add a generic infrastructure in the woody JS library to
register "handlers" that are called either during "onload" of the
document or "onsubmit" of the form.
You can have a look at it in the "Boolean fields" tab in the "Various"
example.
Enjoy ;-)
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: New woody multivaluefield styling: the double listbox
Posted by Sylvain Wallez <sy...@apache.org>.
Leszek Gawron wrote:
>On Fri, Nov 21, 2003 at 10:04:55AM +0100, Sylvain Wallez wrote:
>
>
>>Most of the JS code has been moved in the "woody-lib.js" file, and the
>>produced HTML now contains only calls to these functions.
>>
>>Is this what you meant, or did I missed something?
>>
>>
>More or less :)
>
>Another question: I have a calendar control that I like more than
>CalendarPopup. How can I add the new styling code and not change the standard
>woody stylesheets?
>
>
The woody stylesheets are designed to allow this: in your specific
stylesheet (that includes woody-field-styling.xsl and
woody-page-styling.xsl), just override the prodived template:
<xsl:template match="wi:field[wi:styling/@type='date']" priority="2">
... your calendar here...
</xsl:template>
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: New woody multivaluefield styling: the double listbox
Posted by Leszek Gawron <ou...@wlkp.org>.
On Fri, Nov 21, 2003 at 10:04:55AM +0100, Sylvain Wallez wrote:
> Most of the JS code has been moved in the "woody-lib.js" file, and the
> produced HTML now contains only calls to these functions.
>
> Is this what you meant, or did I missed something?
More or less :)
Another question: I have a calendar control that I like more than
CalendarPopup. How can I add the new styling code and not change the standard
woody stylesheets?
ouzo
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ ouzo@wlkp.org _\\()//_
.'/()\'. Phone: +48(501)720812 / // \\ \
\\ // recursive: adj; see recursive | \__/ |
Re: New woody multivaluefield styling: the double listbox
Posted by Sylvain Wallez <sy...@apache.org>.
Leszek Gawron wrote:
>On Wed, Nov 19, 2003 at 05:53:57PM +0100, Sylvain Wallez wrote:
>
>
>>Hi all,
>>
>>Woody goodie of the day, I wrote a new styling for multivalue fields. We
>>already had list-type="checkbox", list-type="listbox" and we now have
>>list-type="double-listbox".
>>
>>This displays two lists with buttons between them to switch items
>>between the lists. The selected values are on the left.
>>
>>This again relies on Matt Kruse's JS libraries (thanks Matt!) and
>>required to add a generic infrastructure in the woody JS library to
>>register "handlers" that are called either during "onload" of the
>>document or "onsubmit" of the form.
>>
>>You can have a look at it in the "Boolean fields" tab in the "Various"
>>example.
>>
>>
>Would it be possible to add the appropriate javascript code to the page only
>if a certain feature is being used? Including all the javascript code in the
>page makes it more heavy and also a bit messy.
>
>
Most of the JS code has been moved in the "woody-lib.js" file, and the
produced HTML now contains only calls to these functions.
Is this what you meant, or did I missed something?
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: New woody multivaluefield styling: the double listbox
Posted by Leszek Gawron <ou...@wlkp.org>.
On Wed, Nov 19, 2003 at 05:53:57PM +0100, Sylvain Wallez wrote:
> Hi all,
>
> Woody goodie of the day, I wrote a new styling for multivalue fields. We
> already had list-type="checkbox", list-type="listbox" and we now have
> list-type="double-listbox".
>
> This displays two lists with buttons between them to switch items
> between the lists. The selected values are on the left.
>
> This again relies on Matt Kruse's JS libraries (thanks Matt!) and
> required to add a generic infrastructure in the woody JS library to
> register "handlers" that are called either during "onload" of the
> document or "onsubmit" of the form.
>
> You can have a look at it in the "Boolean fields" tab in the "Various"
> example.
Would it be possible to add the appropriate javascript code to the page only
if a certain feature is being used? Including all the javascript code in the
page makes it more heavy and also a bit messy.
ouzo
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ ouzo@wlkp.org _\\()//_
.'/()\'. Phone: +48(501)720812 / // \\ \
\\ // recursive: adj; see recursive | \__/ |
Re: New woody multivaluefield styling: the double listbox
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 19 Nov 2003, at 16:53, Sylvain Wallez wrote:
> This again relies on Matt Kruse's JS libraries (thanks Matt!) and
> required to add a generic infrastructure in the woody JS library to
> register "handlers" that are called either during "onload" of the
> document or "onsubmit" of the form.
>
Unfortunately there are several problems with these libraries when
using the built-in browser in MacOSX, Safari (based on Conqueror
khtml).
For instance:
Help popups do not go away.
Editing the year in the Calendar causes Safari to crash.
When you view <http://localhost:8888/samples/woody/form1> from Safari,
the repeater at the bottom, is full of checkboxes, not fields. (!!!!)
I have reported these problems to Apple (several times already ....)
They all work fine in Mozilla ..... so beware, if your users have
Safari, they will not be able to use your forms properly and you may
not realise !!!!
> You can have a look at it in the "Boolean fields" tab in the "Various"
> example.
I am confused .... I cannot see anything that looks like it might be
the "double listbox" you describe (in Mozilla or Safari).
regards Jeremy