Hi, I would like if anybody has already developed swap bettween to html select multiple, with scriptaculous. I would like do like this http://cyberdummy.co.uk/test/dd.php but not with only ul and li. So I would like use 2 select multiple and plug it a javascript control (with scriptaculous) to manage swap with drag/drop like rico http://openrico.org/rico/demos.page?demo=rico_drag_and_drop_custom_draggable ) I have read at http://wiki.script.aculo.us/scriptaculous/revision/EffectsTreasureChest?rev=14, we must develop customizable drag, but how use with 2 combos select multiple? Thank you for your response. Regards Angelo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2006-Sep-28 06:30 UTC
Re: Swap between 2 combo (html select multple)
Angelo zerr a écrit :> Hi, > I would like if anybody has already developed swap bettween to html > select multiple, with scriptaculous. > I would like do like this http://cyberdummy.co.uk/test/dd.php > <http://cyberdummy.co.uk/test/dd.php> > but not with only ul and li. So I would like use 2 select multiple and > plug it a javascript control (with scriptaculous) > to manage swap with drag/drop like rico > http://openrico.org/rico/demos.page?demo=rico_drag_and_drop_custom_draggable)All those examples do *not* use select controls. The Rico one only kinda emulates a listbox, when it is actually a scrollable div with internal spans (built in JS, no less!).> I have read at > http://wiki.script.aculo.us/scriptaculous/revision/EffectsTreasureChest?rev=14 > <http://wiki.script.aculo.us/scriptaculous/revision/EffectsTreasureChest?rev=14>, > we must develop customizable drag, but how use with 2 combos select > multiple?I''m not too sure whether this will be simple enough to be worth it. You might end up having to rewrite the whole D''n''D logic based on mouse events on the two controls, which, again, might not be as browser-portable as you''d like. Before going further down that road, why exactly do you need select multiples? Can''t you emulate this some other way? -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Hi , thank you for your reponse. I would like use html select multiple to store it items. I''m developping with Struts and I''m planning to develop a taglib which generate javascript control (see at http://jscontrolstags.sourceforge.net/) for swap items betwwen 2 combobox. So I want populate the 2 combobox with standard HTML select (with struts you can use <html:select). The javascript swap control will hide the 2 combo and will display 2 divs with ul and li. When you post swap an item, the javascript control will update select. After a post of form, you get options selected coming from the standard html select. But with the solution with div, I''m afraid to develop all events (like Ctrl+A for select all items, Ctrl => select an item) into div although html select multiple manage it. Angelo 2006/9/28, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>:> > > Angelo zerr a écrit : > > Hi, > > I would like if anybody has already developed swap bettween to html > > select multiple, with scriptaculous. > > I would like do like this http://cyberdummy.co.uk/test/dd.php > > <http://cyberdummy.co.uk/test/dd.php> > > but not with only ul and li. So I would like use 2 select multiple and > > plug it a javascript control (with scriptaculous) > > to manage swap with drag/drop like rico > > > http://openrico.org/rico/demos.page?demo=rico_drag_and_drop_custom_draggable > ) > > All those examples do *not* use select controls. The Rico one only > kinda emulates a listbox, when it is actually a scrollable div with > internal spans (built in JS, no less!). > > > I have read at > > > http://wiki.script.aculo.us/scriptaculous/revision/EffectsTreasureChest?rev=14 > > < > http://wiki.script.aculo.us/scriptaculous/revision/EffectsTreasureChest?rev=14 > >, > > we must develop customizable drag, but how use with 2 combos select > > multiple? > > I''m not too sure whether this will be simple enough to be worth it. You > might end up having to rewrite the whole D''n''D logic based on mouse > events on the two controls, which, again, might not be as > browser-portable as you''d like. > > Before going further down that road, why exactly do you need select > multiples? Can''t you emulate this some other way? > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2006-Sep-30 15:11 UTC
Re: Swap between 2 combo (html select multple)
Hey Angelo, sorry for the delay, Angelo zerr a écrit :> So I want populate the 2 combobox with standard HTML select (with struts > you can use <html:select). The javascript swap control will hide the 2 > combo and will display 2 divs with ul and li. When you post swap an > item, the javascript control will update select. After a post of form, > you get options selected coming from the standard html select. > > But with the solution with div, I''m afraid to develop all events (like > Ctrl+A for select all items, Ctrl => select an item) into div although > html select multiple manage it.Trying to masquerade actual selects behind JS-generated DIVs might prove quite a hurdle, especially in a cross-browser context. Browsers relying on native controls for selects, like IE6, will force you to work hard in order not to have the selects overlap your DIVs... Regarding events: you''d have to totally disable the native selects, and indeed manage all your key-mouse logic manually inside the DIVs, that''s for sure. Maybe you can get some hints from the Autocompleter.Base code in controls.js, which also simulates a drop-down based on a DIV with ul/li inside. It''s not *that* hard to code, don''t worry. Handling the Ctrl and Shift keys, plus clicks, is rather straightforward and cross-browser, AFAIK. As a final note, you''d have to make your DIVs use the same tabindex as the original selects, if any were defined (just some on-the-side thought). ''HTH -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Hi christophe, no problem for your delay. I have found a control which manage selectable item (Ctrl+Shift,...) at http://www.remor.com/selectable-list/. I want use it, and add capability to drag/drop items and filled ul/li witj options of select. As soon as I finsih my control I tell you. Regards Angelo 2006/9/30, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>:> > > Hey Angelo, sorry for the delay, > > Angelo zerr a écrit : > > So I want populate the 2 combobox with standard HTML select (with struts > > you can use <html:select). The javascript swap control will hide the 2 > > combo and will display 2 divs with ul and li. When you post swap an > > item, the javascript control will update select. After a post of form, > > you get options selected coming from the standard html select. > > > > But with the solution with div, I''m afraid to develop all events (like > > Ctrl+A for select all items, Ctrl => select an item) into div although > > html select multiple manage it. > > Trying to masquerade actual selects behind JS-generated DIVs might prove > quite a hurdle, especially in a cross-browser context. Browsers relying > on native controls for selects, like IE6, will force you to work hard in > order not to have the selects overlap your DIVs... > > Regarding events: you''d have to totally disable the native selects, and > indeed manage all your key-mouse logic manually inside the DIVs, that''s > for sure. Maybe you can get some hints from the Autocompleter.Base code > in controls.js, which also simulates a drop-down based on a DIV with > ul/li inside. It''s not *that* hard to code, don''t worry. Handling the > Ctrl and Shift keys, plus clicks, is rather straightforward and > cross-browser, AFAIK. > > As a final note, you''d have to make your DIVs use the same tabindex as > the original selects, if any were defined (just some on-the-side thought). > > ''HTH > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---