Laurie Harper
2005-Aug-24 11:06 UTC
[Rails-spinoffs] scriptaculous: Draggable and table rows
I''m trying to add drag/drop for moving rows between two tables, and not having much luck... I can get images to be drag-able OK so I know all the script files are in the right place ;-) But no joy with table rows. Is this a Draggable and/or Javascript/HTML limitation? Here''s what I''m trying: <html> <head> <script type="text/javascript" src="/js/prototype.js"></script> <script type="text/javascript" src="/js/scriptaculous/effects.js"></script> <script type="text/javascript" src="/js/scriptaculous/dragdrop.js"></script> </head> <body> <table cellpadding="3" cellspacing="10"> <tr id="row1"> <td>1</td><td> <img alt="img" id="item1" src="/img1.png" /> <script type="text/javascript">new Draggable(''item1'', {revert:true})</script> </td> </tr> <tr id="row2"> <td>2</td><td> <img alt="img" id="item2" src="/img1.png" /> </td> </tr> <script type="text/javascript">new Draggable(''row2'', {revert:true})</script> </table> </body> </html> I can drag the image out of row one, but can''t drag the table row at all (dragging greys it out, but it stays in place.) I''m using 1.1beta1 w/ the prototype 1.4.0_pre2 distribution from scriptaculous. Any hints appreciated! L. -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/ -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/
Thomas Fuchs
2005-Aug-24 11:14 UTC
[Rails-spinoffs] scriptaculous: Draggable and table rows
That''s a browser limitation. You can''t use drag/drop or sortables with table rows. Personally, in this situation, i use DIV elements containing fixed- width floating SPANs as columns. Thomas Am 24.08.2005 um 18:25 schrieb Laurie Harper:> I''m trying to add drag/drop for moving rows between two tables, and > not having much luck... I can get images to be drag-able OK so I > know all the script files are in the right place ;-) But no joy > with table rows. Is this a Draggable and/or Javascript/HTML > limitation?
Laurie Harper
2005-Aug-24 14:21 UTC
[Rails-spinoffs] scriptaculous: Draggable and table rows
I was afraid you''d say that... seems a shame to ditch tables that actually are semantically relevant just to get some UI goodness :-) I guess an alternative would be to provide a drag-able ''handle'' image in each table row, though. I''ll have to see if I can ''fake'' a row-width border around the image during dragging! L. On 24-Aug-05, at 12:32 PM, Thomas Fuchs wrote:> That''s a browser limitation. You can''t use drag/drop or sortables with > table rows. > > Personally, in this situation, i use DIV elements containing > fixed-width floating SPANs as columns. > > Thomas > > Am 24.08.2005 um 18:25 schrieb Laurie Harper: > > >> I''m trying to add drag/drop for moving rows between two tables, and >> not having much luck... I can get images to be drag-able OK so I know >> all the script files are in the right place ;-) But no joy with table >> rows. Is this a Draggable and/or Javascript/HTML limitation? >> > >-- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/
Laurie Harper
2005-Aug-29 15:45 UTC
[Rails-spinoffs] scriptaculous: Draggable and table rows
Hm, I just tried the same thing with Rico and was able to get dragable table rows no problem. What''s the limitation that prevents Scriptaculous supporting this? L. On 24-Aug-05, at 3:39 PM, Laurie Harper wrote:> I was afraid you''d say that... seems a shame to ditch tables that > actually are semantically relevant just to get some UI goodness :-) I > guess an alternative would be to provide a drag-able ''handle'' image in > each table row, though. I''ll have to see if I can ''fake'' a row-width > border around the image during dragging! > > L. > > On 24-Aug-05, at 12:32 PM, Thomas Fuchs wrote: > >> That''s a browser limitation. You can''t use drag/drop or sortables >> with table rows. >> >> Personally, in this situation, i use DIV elements containing >> fixed-width floating SPANs as columns. >> >> Thomas >> >> Am 24.08.2005 um 18:25 schrieb Laurie Harper: >> >> >> >>> I''m trying to add drag/drop for moving rows between two tables, and >>> not having much luck... I can get images to be drag-able OK so I >>> know all the script files are in the right place ;-) But no joy with >>> table rows. Is this a Draggable and/or Javascript/HTML limitation? >>> >>> >> >> >> > > > > -- > Laurie Harper > Open Source advocate, Java geek: http://www.holoweb.net/laurie > Founder, Zotech Software: http://www.zotechsoftware.com/ > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/
Thomas Fuchs
2005-Aug-31 04:40 UTC
[Rails-spinoffs] scriptaculous: Draggable and table rows
Can you provide a working example that supports this on Firefox, IE and Safari...? Thomas Am 29.08.2005 um 22:46 schrieb Laurie Harper:> Hm, I just tried the same thing with Rico and was able to get > dragable table rows no problem. What''s the limitation that prevents > Scriptaculous supporting this?