Hi, I''m trying to use sortables to sort table rows and move them between different tables (yes, it''s actual tabular data ;). However, either I don''t know how to use the tag property of Sortable.create properly, or it''s only working for li''s. Since it''s probably the first option, could someone post an example of sorting tr tags and move them from table to table? Thanks Victor -- Victor Jalencas <Victor.Jalencas@gmail.com>
Sorry to say, but drag-and-drop doesn''t work for table rows because of browser limitations. No workarounds for this. Thomas Am 21.07.2005 um 23:40 schrieb victor jalencas:> Hi, > > I''m trying to use sortables to sort table rows and move them between > different tables (yes, it''s actual tabular data ;). However, either I > don''t know how to use the tag property of Sortable.create properly, or > it''s only working for li''s. Since it''s probably the first option, > could someone post an example of sorting tr tags and move them from > table to table? > > Thanks > > Victor > -- > Victor Jalencas <Victor.Jalencas@gmail.com> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Hi Victor, As Thomas says, TR tags won''t work, because of the way they are implemented in browsers. I''ve had success with the Sortable using DIV elements as tag type, and overriding tag: in the options array passed in to create(). It is possible to create tabular controls using DIVs rather than the table tags - I think this is what ActiveWidget''s grid does (http://www.activewidgets.com/grid/), but you do lose some of the automatic column sizing and other handy features when you move to DIVs. Dave --- Author, ''Ajax in Action'' http://www.manning.com/books/crane Blog: http://dave.sunwheeltech.com/wordpress/>From: victor jalencas victor.jalencas@gmail.com> >Subject: [Rails-spinoffs] Question about sortables > >Hi, > > I''m trying to use sortables to sort table rows and move them between >different tables (yes, it''s actual tabular data ;). However, either I >don''t know how to use the tag property of Sortable.create properly, or >it''s only working for li''s. Since it''s probably the first option, >could someone post an example of sorting tr tags and move them from >table to table? > >Thanks > >Victor >-- >Victor Jalencas Victor.Jalencas@gmail.com> >
Thanks to all that responded. I''d have preferred to use a table, mostly for semantic righteousness, but I can use the li perfectly as well, and with the same looks. Just wanted to make sure anyway that the fault was not on my side. However, if as you said is mostly due to browser limitations (and not to DOM limitations, for example, though I can''t think of a plausible one), shouldn''t this be filed in their respective bug-tracking systems, so that it is eventually corrected? Thanks Victor On 7/22/05, dave crane <dave@cranefamily.force9.co.uk> wrote:> Hi Victor, > > As Thomas says, TR tags won''t work, because of the way they are implemented in > browsers. I''ve had success with the Sortable using DIV elements as tag type, and > overriding tag: in the options array passed in to create(). It is possible to > create tabular controls using DIVs rather than the table tags - I think this is > what ActiveWidget''s grid does (http://www.activewidgets.com/grid/), but you do > lose some of the automatic column sizing and other handy features when you move > to DIVs. > > Dave > --- > Author, ''Ajax in Action'' > http://www.manning.com/books/crane > Blog: http://dave.sunwheeltech.com/wordpress/ > > > >From: victor jalencas victor.jalencas@gmail.com> > >Subject: [Rails-spinoffs] Question about sortables > > > >Hi, > > > > I''m trying to use sortables to sort table rows and move them between > >different tables (yes, it''s actual tabular data ;). However, either I > >don''t know how to use the tag property of Sortable.create properly, or > >it''s only working for li''s. Since it''s probably the first option, > >could someone post an example of sorting tr tags and move them from > >table to table? > > > >Thanks > > > >Victor > >-- > >Victor Jalencas Victor.Jalencas@gmail.com> > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Victor Jalencas <Victor.Jalencas@gmail.com>