Hi guys, I have a question that I haven''t been able to find an answer to yet. I''m hoping I can find an answer here. I would like to be able to allow a user to visibly sort the order of rows of a table. I have a table that is used to display tabular data. It allows users to dynamically add rows of tabular data to an existing table. I would like to enable the user to be able to click on a handle at the end of each row, and sort the rows by dragging and dropping them. I would like to constrain the created draggables to the boundaries of the table. Below is the HTML I used. I did not include my javascript functions. Those are working without error. I don''t get any errors with the sortable, it simply does not work. Is it possible to make a table a Sortable? Any help is much appreciated. <table id="properties"> <thead> <tr><th>Price:</th><th>Beds:</th><th>Bath:</th></tr> </thead> <script type="text/javascript" language="javascript">Sortable.create(''properties'',{tag:''tr'', handle:''action''});</script> <!--empty place holder for dynamically added rows--> <tbody id="list"><tr><td></td></tr></tbody> <tbody id="edit"> <tr> <td><input type="text" id="price" name="price" size="10"></td> <td><input type="text" id="beds" name="beds" size="8"></td> <td><input type="text" id="baths" name="baths" size="8"></td> </tr> <tr><td colspan="3" align="right"><input type="button" onClick="add_property()" /></td></tr> </tbody> </table> LJ Kyser
Table rows, etc. can''t be sorted without a lot of extra "hackery" I believe. The only solution that I can think of is that if you start to drag a row, a new table is dynamically created with one row containing the same data as the row you''re dragging and this new "placeholder" table is dragged as a whole over the main one. Then once you release the mouse, the main table is updated with rearranged rows and the "placeholder" table that you were dragging is deleted. A "gap" row could also be dynamically created in the main table that contains no data to help show where the dragged row will go. Anyway, that''s all I can think of doing with a table off the top of my head. I''m not even sure if that would work, but it sounds like it might. :) On 8/4/05, Lonnie Kyser <ljkyser@hotmail.com> wrote:> Hi guys, > > I have a question that I haven''t been able to find an answer to yet. I''m > hoping I can find an answer here. I would like to be able to allow a user > to visibly sort the order of rows of a table. I have a table that is used > to display tabular data. It allows users to dynamically add rows of tabular > data to an existing table. I would like to enable the user to be able to > click on a handle at the end of each row, and sort the rows by dragging and > dropping them. I would like to constrain the created draggables to the > boundaries of the table. Below is the HTML I used. I did not include my > javascript functions. Those are working without error. I don''t get any > errors with the sortable, it simply does not work. Is it possible to make a > table a Sortable? Any help is much appreciated. > > <table id="properties"> > <thead> > <tr><th>Price:</th><th>Beds:</th><th>Bath:</th></tr> > </thead> > <script type="text/javascript" > language="javascript">Sortable.create(''properties'',{tag:''tr'', > handle:''action''});</script> > <!--empty place holder for dynamically added rows--> > <tbody id="list"><tr><td></td></tr></tbody> > <tbody id="edit"> > <tr> > <td><input type="text" id="price" name="price" size="10"></td> > <td><input type="text" id="beds" name="beds" size="8"></td> > <td><input type="text" id="baths" name="baths" size="8"></td> > </tr> > <tr><td colspan="3" align="right"><input type="button" > onClick="add_property()" /></td></tr> > </tbody> > </table> > > LJ Kyser > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On Thursday 04 August 2005 13:43, Andrew Kaspick wrote:> Table rows, etc. can''t be sorted without a lot of extra "hackery" I > believe.I think the best thing you can do is not to drag around the entire row or column. Instead clone the row/column heading and drag it as a proxy. Michael -- Michael Schuerig Those people who smile a lot mailto:michael@schuerig.de Watch the eyes http://www.schuerig.de/michael/ --Ani DiFranco, Outta Me, Onto You
Hi guys, Thanks for your responses so far. They both seem similar in approach, but both seem pretty complicated to me. I have no problem with something being complicated, but I am pretty new in the draggable/droppable javascript world, so any specifics or code samples would be nice. :) I am including a link to a demo version on my site that might help by seeing what I have there. I added a UL as well for comparison, but it is not even sorting. It does drag, just no drop and sort. It makes me think that maybe I am doing something wrong. Again, for those that did not receive my first post, I am trying to allow the order of the rows of the table to be sorted up and down by dragging the handle and moving the row up or down. Ideally it would be nice to have each row be inline editable as well, but I am pretty confused about how to do that. Any thoughts/suggestions/examples are VERY appreciated. Thanks to those who have thusfar responded. Example: http://thekysers.com/sortable.php Andrew said:>The only solution that I can think of is that if you start to drag a >row, a new table is dynamically created with one row containing the >same data as the row you''re dragging and this new "placeholder" table >is dragged as a whole over the main one. Then once you release the >mouse, the main table is updated with rearranged rows and the >"placeholder" table that you were dragging is deleted. A "gap" row >could also be dynamically created in the main table that contains no >data to help show where the dragged row will go. > >Anyway, that''s all I can think of doing with a table off the top of my >head. I''m not even sure if that would work, but it sounds like it >might. :)Michael said:>On Thursday 04 August 2005 13:43, Andrew Kaspick wrote: > > Table rows, etc. can''t be sorted without a lot of extra "hackery" I > > believe. > >I think the best thing you can do is not to drag around the entire row >or column. Instead clone the row/column heading and drag it as a proxy. > >MichaelHow would you do this? Would there be visual indicators of the row moving up and down like you do with the ul sortaables?
Sorry to say, but it''s technically not possible because of browser limitations. You''ll have to resort to one of suggested workarounds. Thomas Am 04.08.2005 um 20:53 schrieb Lonnie Kyser:> Again, for those that did not receive my first post, I am trying to > allow the order of the rows of the table to be sorted up and down > by dragging the handle and moving the row up or down.
Lonnie, I have played around with tables and dynamic effects, like making a table rows display property "none", and I''ll warn you that the browsers aren''t fit to handle this. I forget which browser it was, I think it was firefox, wasn''t able to render this effect properly, each time the row disappeared and reappeared the whole page would be botched after that. So I advise you to steer clear of table''s altogether. I ended up having to make a TD element with a colspan the size of my table, and embed a new table in that, and make it disappear and reappear. There must be some confusion of what type of element a TR is, block or inline or whatever. As far as I can guess it''s neither, more metadata than anything else. Your best approach would probably be to put each of your rows in a DIV tag as in the sortable example with a table inside each one. It''s just as good, but you''ll have to size each table column in order to get everything looking nice. From the simplicity of your page it appears you should have no problem making each column a static width. As far as inline editing, that is also doable, however the drag/drop library will interfere with the mouse click and focus doesn''t end up on the input element you''re trying to use, I''m not sure if there is a better solution, but I used this hack here, using onClick=''focus(this)'': <div id="drag_box2" style="width:200px;height:200px;"> <div style="width:200px;height:200px;"> <textarea width="100%" onClick="focus(this);">Drag me!</textarea> </div> </div>I use this hack as well as a hacked out "constraint box" on this page: www.cloudius.com, feel free to take what you need.Not sure if there is a better way to do the constraint box either, my javascript skills aren''t all that great.-Jeff ----- Original Message ----- From: "Lonnie Kyser" <ljkyser@hotmail.com> To: <rails-spinoffs@lists.rubyonrails.org> Sent: Thursday, August 04, 2005 12:53 PM Subject: [Rails-spinoffs] RE: Sortable Table> Hi guys, > > Thanks for your responses so far. They both seem similar in approach, but > both seem pretty complicated to me. I have no problem with something > being complicated, but I am pretty new in the draggable/droppable > javascript world, so any specifics or code samples would be nice. :) I am > including a link to a demo version on my site that might help by seeing > what I have there. I added a UL as well for comparison, but it is not > even sorting. It does drag, just no drop and sort. It makes me think > that maybe I am doing something wrong. > > Again, for those that did not receive my first post, I am trying to allow > the order of the rows of the table to be sorted up and down by dragging > the handle and moving the row up or down. Ideally it would be nice to > have each row be inline editable as well, but I am pretty confused about > how to do that. Any thoughts/suggestions/examples are VERY appreciated. > Thanks to those who have thusfar responded. > > Example: http://thekysers.com/sortable.php > > > Andrew said: > >>The only solution that I can think of is that if you start to drag a >>row, a new table is dynamically created with one row containing the >>same data as the row you''re dragging and this new "placeholder" table >>is dragged as a whole over the main one. Then once you release the >>mouse, the main table is updated with rearranged rows and the >>"placeholder" table that you were dragging is deleted. A "gap" row >>could also be dynamically created in the main table that contains no >>data to help show where the dragged row will go. >> >>Anyway, that''s all I can think of doing with a table off the top of my >>head. I''m not even sure if that would work, but it sounds like it >>might. :) > > Michael said: > >>On Thursday 04 August 2005 13:43, Andrew Kaspick wrote: >> > Table rows, etc. can''t be sorted without a lot of extra "hackery" I >> > believe. >> >>I think the best thing you can do is not to drag around the entire row >>or column. Instead clone the row/column heading and drag it as a proxy. >> >>Michael > > How would you do this? Would there be visual indicators of the row moving > up and down like you do with the ul sortaables? > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
In what way was the page botched? Did a simple screen repaint fix it? I know that with fieldsets in firefox, when I use effects like SlideUp/Down and BlindUp/Down in the fieldset, firefox renders it incorrectly and switching to another tab and back fixes it. Other than changing tabs you can force a page refresh via javascript, which is what I actually do in some cases to fix the rendering problems. On 8/4/05, Jeffrey Moss <jeff@opendbms.com> wrote:> Lonnie, > > I have played around with tables and dynamic effects, like making a table > rows display property "none", and I''ll warn you that the browsers aren''t fit > to handle this. I forget which browser it was, I think it was firefox, > wasn''t able to render this effect properly, each time the row disappeared > and reappeared the whole page would be botched after that. So I advise you > to steer clear of table''s altogether. I ended up having to make a TD element > with a colspan the size of my table, and embed a new table in that, and make > it disappear and reappear. There must be some confusion of what type of > element a TR is, block or inline or whatever. As far as I can guess it''s > neither, more metadata than anything else. > > Your best approach would probably be to put each of your rows in a DIV tag > as in the sortable example with a table inside each one. It''s just as good, > but you''ll have to size each table column in order to get everything looking > nice. From the simplicity of your page it appears you should have no problem > making each column a static width. > > As far as inline editing, that is also doable, however the drag/drop library > will interfere with the mouse click and focus doesn''t end up on the input > element you''re trying to use, I''m not sure if there is a better solution, > but I used this hack here, using onClick=''focus(this)'': > > > <div id="drag_box2" style="width:200px;height:200px;"> > <div style="width:200px;height:200px;"> > <textarea width="100%" onClick="focus(this);">Drag me!</textarea> > </div> > </div>I use this hack as well as a hacked out "constraint box" on > this page: www.cloudius.com, feel free to take what you need.Not sure if > there is a better way to do the constraint box either, my javascript skills > aren''t all that great.-Jeff > ----- Original Message ----- > From: "Lonnie Kyser" <ljkyser@hotmail.com> > To: <rails-spinoffs@lists.rubyonrails.org> > Sent: Thursday, August 04, 2005 12:53 PM > Subject: [Rails-spinoffs] RE: Sortable Table > > > > Hi guys, > > > > Thanks for your responses so far. They both seem similar in approach, but > > both seem pretty complicated to me. I have no problem with something > > being complicated, but I am pretty new in the draggable/droppable > > javascript world, so any specifics or code samples would be nice. :) I am > > including a link to a demo version on my site that might help by seeing > > what I have there. I added a UL as well for comparison, but it is not > > even sorting. It does drag, just no drop and sort. It makes me think > > that maybe I am doing something wrong. > > > > Again, for those that did not receive my first post, I am trying to allow > > the order of the rows of the table to be sorted up and down by dragging > > the handle and moving the row up or down. Ideally it would be nice to > > have each row be inline editable as well, but I am pretty confused about > > how to do that. Any thoughts/suggestions/examples are VERY appreciated. > > Thanks to those who have thusfar responded. > > > > Example: http://thekysers.com/sortable.php > > > > > > Andrew said: > > > >>The only solution that I can think of is that if you start to drag a > >>row, a new table is dynamically created with one row containing the > >>same data as the row you''re dragging and this new "placeholder" table > >>is dragged as a whole over the main one. Then once you release the > >>mouse, the main table is updated with rearranged rows and the > >>"placeholder" table that you were dragging is deleted. A "gap" row > >>could also be dynamically created in the main table that contains no > >>data to help show where the dragged row will go. > >> > >>Anyway, that''s all I can think of doing with a table off the top of my > >>head. I''m not even sure if that would work, but it sounds like it > >>might. :) > > > > Michael said: > > > >>On Thursday 04 August 2005 13:43, Andrew Kaspick wrote: > >> > Table rows, etc. can''t be sorted without a lot of extra "hackery" I > >> > believe. > >> > >>I think the best thing you can do is not to drag around the entire row > >>or column. Instead clone the row/column heading and drag it as a proxy. > >> > >>Michael > > > > How would you do this? Would there be visual indicators of the row moving > > up and down like you do with the ul sortaables? > > > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Ah, I didn''t know you could force a redraw. Good to know, however in this case it would probably have been too annoying for the user. The page had a left hand column for navigation elements and stuff, standard on many pages, rows in that column never resized when the dynamic element disappeared, and when it reappeared the left column *did* resize and ended up being longer than it was before, you repeat that over and over and the left column would just get longer and longer. This was a few months ago, but I''m pretty sure what I''ve said is accurate. Fieldset is another strange tag, is it a block, or metadata or what? I think its a block by default right? Strange... I just stick with DIV''s these days when it comes to disappearing and reappearing. -Jeff ----- Original Message ----- From: "Andrew Kaspick" <akaspick@gmail.com> To: "Jeffrey Moss" <jeff@opendbms.com> Cc: <rails-spinoffs@lists.rubyonrails.org> Sent: Thursday, August 04, 2005 1:42 PM Subject: Re: [Rails-spinoffs] RE: Sortable Table In what way was the page botched? Did a simple screen repaint fix it? I know that with fieldsets in firefox, when I use effects like SlideUp/Down and BlindUp/Down in the fieldset, firefox renders it incorrectly and switching to another tab and back fixes it. Other than changing tabs you can force a page refresh via javascript, which is what I actually do in some cases to fix the rendering problems. On 8/4/05, Jeffrey Moss <jeff@opendbms.com> wrote:> Lonnie, > > I have played around with tables and dynamic effects, like making a table > rows display property "none", and I''ll warn you that the browsers aren''t > fit > to handle this. I forget which browser it was, I think it was firefox, > wasn''t able to render this effect properly, each time the row disappeared > and reappeared the whole page would be botched after that. So I advise you > to steer clear of table''s altogether. I ended up having to make a TD > element > with a colspan the size of my table, and embed a new table in that, and > make > it disappear and reappear. There must be some confusion of what type of > element a TR is, block or inline or whatever. As far as I can guess it''s > neither, more metadata than anything else. > > Your best approach would probably be to put each of your rows in a DIV tag > as in the sortable example with a table inside each one. It''s just as > good, > but you''ll have to size each table column in order to get everything > looking > nice. From the simplicity of your page it appears you should have no > problem > making each column a static width. > > As far as inline editing, that is also doable, however the drag/drop > library > will interfere with the mouse click and focus doesn''t end up on the input > element you''re trying to use, I''m not sure if there is a better solution, > but I used this hack here, using onClick=''focus(this)'': > > > <div id="drag_box2" style="width:200px;height:200px;"> > <div style="width:200px;height:200px;"> > <textarea width="100%" onClick="focus(this);">Drag > me!</textarea> > </div> > </div>I use this hack as well as a hacked out > "constraint box" on > this page: www.cloudius.com, feel free to take what you need.Not sure if > there is a better way to do the constraint box either, my javascript > skills > aren''t all that great.-Jeff > ----- Original Message ----- > From: "Lonnie Kyser" <ljkyser@hotmail.com> > To: <rails-spinoffs@lists.rubyonrails.org> > Sent: Thursday, August 04, 2005 12:53 PM > Subject: [Rails-spinoffs] RE: Sortable Table > > > > Hi guys, > > > > Thanks for your responses so far. They both seem similar in approach, > > but > > both seem pretty complicated to me. I have no problem with something > > being complicated, but I am pretty new in the draggable/droppable > > javascript world, so any specifics or code samples would be nice. :) I > > am > > including a link to a demo version on my site that might help by seeing > > what I have there. I added a UL as well for comparison, but it is not > > even sorting. It does drag, just no drop and sort. It makes me think > > that maybe I am doing something wrong. > > > > Again, for those that did not receive my first post, I am trying to > > allow > > the order of the rows of the table to be sorted up and down by dragging > > the handle and moving the row up or down. Ideally it would be nice to > > have each row be inline editable as well, but I am pretty confused about > > how to do that. Any thoughts/suggestions/examples are VERY appreciated. > > Thanks to those who have thusfar responded. > > > > Example: http://thekysers.com/sortable.php > > > > > > Andrew said: > > > >>The only solution that I can think of is that if you start to drag a > >>row, a new table is dynamically created with one row containing the > >>same data as the row you''re dragging and this new "placeholder" table > >>is dragged as a whole over the main one. Then once you release the > >>mouse, the main table is updated with rearranged rows and the > >>"placeholder" table that you were dragging is deleted. A "gap" row > >>could also be dynamically created in the main table that contains no > >>data to help show where the dragged row will go. > >> > >>Anyway, that''s all I can think of doing with a table off the top of my > >>head. I''m not even sure if that would work, but it sounds like it > >>might. :) > > > > Michael said: > > > >>On Thursday 04 August 2005 13:43, Andrew Kaspick wrote: > >> > Table rows, etc. can''t be sorted without a lot of extra "hackery" I > >> > believe. > >> > >>I think the best thing you can do is not to drag around the entire row > >>or column. Instead clone the row/column heading and drag it as a proxy. > >> > >>Michael > > > > How would you do this? Would there be visual indicators of the row > > moving > > up and down like you do with the ul sortaables? > > > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
The refresh in my cases are unnoticeable... ie. the screen doesn''t flash. But something to keep in mind if one browser reacts strangely to dynamic effects. On 8/4/05, Jeffrey Moss <jeff@opendbms.com> wrote:> Ah, I didn''t know you could force a redraw. Good to know, however in this > case it would probably have been too annoying for the user. > > The page had a left hand column for navigation elements and stuff, standard > on many pages, rows in that column never resized when the dynamic element > disappeared, and when it reappeared the left column *did* resize and ended > up being longer than it was before, you repeat that over and over and the > left column would just get longer and longer. > > This was a few months ago, but I''m pretty sure what I''ve said is accurate. > Fieldset is another strange tag, is it a block, or metadata or what? I > think its a block by default right? Strange... I just stick with DIV''s > these days when it comes to disappearing and reappearing. > > -Jeff > > > ----- Original Message ----- > From: "Andrew Kaspick" <akaspick@gmail.com> > To: "Jeffrey Moss" <jeff@opendbms.com> > Cc: <rails-spinoffs@lists.rubyonrails.org> > Sent: Thursday, August 04, 2005 1:42 PM > Subject: Re: [Rails-spinoffs] RE: Sortable Table > > > In what way was the page botched? Did a simple screen repaint fix it? > I know that with fieldsets in firefox, when I use effects like > SlideUp/Down and BlindUp/Down in the fieldset, firefox renders it > incorrectly and switching to another tab and back fixes it. Other > than changing tabs you can force a page refresh via javascript, which > is what I actually do in some cases to fix the rendering problems. > > On 8/4/05, Jeffrey Moss <jeff@opendbms.com> wrote: > > Lonnie, > > > > I have played around with tables and dynamic effects, like making a table > > rows display property "none", and I''ll warn you that the browsers aren''t > > fit > > to handle this. I forget which browser it was, I think it was firefox, > > wasn''t able to render this effect properly, each time the row disappeared > > and reappeared the whole page would be botched after that. So I advise you > > to steer clear of table''s altogether. I ended up having to make a TD > > element > > with a colspan the size of my table, and embed a new table in that, and > > make > > it disappear and reappear. There must be some confusion of what type of > > element a TR is, block or inline or whatever. As far as I can guess it''s > > neither, more metadata than anything else. > > > > Your best approach would probably be to put each of your rows in a DIV tag > > as in the sortable example with a table inside each one. It''s just as > > good, > > but you''ll have to size each table column in order to get everything > > looking > > nice. From the simplicity of your page it appears you should have no > > problem > > making each column a static width. > > > > As far as inline editing, that is also doable, however the drag/drop > > library > > will interfere with the mouse click and focus doesn''t end up on the input > > element you''re trying to use, I''m not sure if there is a better solution, > > but I used this hack here, using onClick=''focus(this)'': > > > > > > <div id="drag_box2" style="width:200px;height:200px;"> > > <div style="width:200px;height:200px;"> > > <textarea width="100%" onClick="focus(this);">Drag > > me!</textarea> > > </div> > > </div>I use this hack as well as a hacked out > > "constraint box" on > > this page: www.cloudius.com, feel free to take what you need.Not sure if > > there is a better way to do the constraint box either, my javascript > > skills > > aren''t all that great.-Jeff > > ----- Original Message ----- > > From: "Lonnie Kyser" <ljkyser@hotmail.com> > > To: <rails-spinoffs@lists.rubyonrails.org> > > Sent: Thursday, August 04, 2005 12:53 PM > > Subject: [Rails-spinoffs] RE: Sortable Table > > > > > > > Hi guys, > > > > > > Thanks for your responses so far. They both seem similar in approach, > > > but > > > both seem pretty complicated to me. I have no problem with something > > > being complicated, but I am pretty new in the draggable/droppable > > > javascript world, so any specifics or code samples would be nice. :) I > > > am > > > including a link to a demo version on my site that might help by seeing > > > what I have there. I added a UL as well for comparison, but it is not > > > even sorting. It does drag, just no drop and sort. It makes me think > > > that maybe I am doing something wrong. > > > > > > Again, for those that did not receive my first post, I am trying to > > > allow > > > the order of the rows of the table to be sorted up and down by dragging > > > the handle and moving the row up or down. Ideally it would be nice to > > > have each row be inline editable as well, but I am pretty confused about > > > how to do that. Any thoughts/suggestions/examples are VERY appreciated. > > > Thanks to those who have thusfar responded. > > > > > > Example: http://thekysers.com/sortable.php > > > > > > > > > Andrew said: > > > > > >>The only solution that I can think of is that if you start to drag a > > >>row, a new table is dynamically created with one row containing the > > >>same data as the row you''re dragging and this new "placeholder" table > > >>is dragged as a whole over the main one. Then once you release the > > >>mouse, the main table is updated with rearranged rows and the > > >>"placeholder" table that you were dragging is deleted. A "gap" row > > >>could also be dynamically created in the main table that contains no > > >>data to help show where the dragged row will go. > > >> > > >>Anyway, that''s all I can think of doing with a table off the top of my > > >>head. I''m not even sure if that would work, but it sounds like it > > >>might. :) > > > > > > Michael said: > > > > > >>On Thursday 04 August 2005 13:43, Andrew Kaspick wrote: > > >> > Table rows, etc. can''t be sorted without a lot of extra "hackery" I > > >> > believe. > > >> > > >>I think the best thing you can do is not to drag around the entire row > > >>or column. Instead clone the row/column heading and drag it as a proxy. > > >> > > >>Michael > > > > > > How would you do this? Would there be visual indicators of the row > > > moving > > > up and down like you do with the ul sortaables? > > > > > > > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
The fieldset element has been around for ages. :) See http://www.w3.org/TR/REC-CSS2/sample.html for a list of "default" styles that are added to elements. So, by default, fieldset is a block-level element. Thomas Am 04.08.2005 um 21:54 schrieb Jeffrey Moss:> Fieldset is another strange tag, is it a block, or metadata or > what? I think its a block by default right? Strange... I just > stick with DIV''s these days when it comes to disappearing and > reappearing.
On 04/08/05, Jeffrey Moss <jeff@opendbms.com> wrote:> There must be some confusion of what type of > element a TR is,No, there is non. CSS 2 clearly states that a TR is by default of display type "table-row". Inferior browsers that don''t know the CSS table model may think different. E.g. Internet Explorer gives them display block, but handles them special due to their table row nature.> block or inline or whatever. As far as I can guess it''s > neither, more metadata than anything else.No need to guess, just look it up. Bye, Martin
Thanks to everyone who has responded with their ideas. I have changed from using a table to using nested floating divs with a width to mimic a table layout. I have updated the site to refelect that. You can see it at: http://thekysers.com/sortable.php. That is working well, as far as the visual layout goes, but I am having problems with the sorting and a problem in IE where the handle is moving but not the rest of the row. I think the problem is with the floats that I am using to line the divs up horizontally, but I am not sure. In firefox the whole row moves with the handle. In BOTH browsers, no sorting takes place unless you move the draggable up above the boundary of the container div, but it seems buggy there. I think the solution to both of the problems would be pretty simple, but I think I must be doing something wrong, or overlooking something. Any help at all would be appreciated, I have been pullling my hair out trying to fix this problem. Really I want the effect of sorting the order of the rows of the table, by drag and drop. Should I be doing this some other way? Site: http://thekysers.com/sortable.php
On 04/08/05, Thomas Fuchs <thomas@fesch.at> wrote:> Sorry to say, but it''s technically not possible because of browser > limitations.For the record, can you give some pointers on what the problem is sorting TRs? Bye, Martin