Re: Re: HTML_QuickForm_advmultiselect new feature or HTML_QuickForm request?
| From: | Justin Patrin | Date: | Tue, 14 Jun 2005 16:54:41 +0000 |
| Subject: | Re: Re: HTML_QuickForm_advmultiselect new feature or HTML_QuickForm request? | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38124@lists.php.net to get a copy of this message | ||
On 6/14/05, Philippe Jausions <Philippe.Jausions@11abacus.com> wrote:
> Laurent Laville wrote:
> > Hi Alexey, Bertrand
> >
> > In some situations, we have perharps need to give different attributes
> > to each item (option) of a multiple select box.
> >
> > Of course, it's possible to do it with a bit of code and a loop thru the
> > addOption() method of qf_select element.
> > But i think it's not so easy. I propose, and i need your opinion,
> > to add the ability to do it with the load method.
> >
> > Well, as a demo is better than a long chat, here are the feature i hope
> > to have in action.
> >
> > and source code of my new demo (6)
> >
> > http://laurent-laville.org/?mod=pear&des=pepr&act=advmultiselect&show=source_ex6
> >
> > In this demo, i've disabled the 'pear' fruit item, and gave a background
> > color to tangerine.
> > What i would like to do with such case ?
> > Gave a list of values with one restriction (pear, is unavailable but it
> > could be in an other case) and show a particular and important option
> > (fruit).
> > All is possible, because we can set all attributes we might want.
> >
>
> I was going to ask for that ;-) However, the advmultiselect doesn't
> handle that very well. Once moved, the item loses it CSS class. I wonder
> if there's a way to copy the select's option element instead of using
> the JS's "new Option()" statement. Maybe that would help preserve the
> CSS class attribute.
>
Of course this should be possible. Just use appendChild on the select
you're moving it to and then use removeChild on the original select.
> I think it would be very useful when you use a different image
> background for each option to place some little icon in front.
>
> http://www.11abacus.com/dev/pear/HTML/QuickForm/icon_in_select_list.html0I´¸ãWg`3È
> ^Ÿ+
>
--
Justin Patrin