Open GoogleCodeExporter opened 8 years ago
Sorry, I entered this as a defect. It's clearly NOT a defect.
Original comment by jacaete...@gmail.com
on 27 Jun 2008 at 6:34
Original comment by danvdk
on 30 Jun 2009 at 7:12
try this jquery plugin
http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
Original comment by maxstrue...@gmail.com
on 30 Jun 2009 at 8:24
Is it possible to modify this existing code to handle rows? This seems one of
the
most light-weight code for dragging-dropping items.
Original comment by silico...@gmail.com
on 11 Sep 2009 at 11:57
Hi maxstruever,
Just FYI - I did have a look at the link you mentioned above, but it seems
overkill
to use a 55kb framework for a simple functionality. I'm trying to tweak the
code so
it works on rows instead of columns, but it doesn't seem to work right now.
Original comment by silico...@gmail.com
on 12 Sep 2009 at 1:58
Hmmm - I attempted an extensive modification of the code in order to get it to
work
with rows, but I ran into a Javascript limitation. There appears to be no way of
addressing the columns element like we address the rows.
See function makeDraggable(). There appears to be no equivalent of
table.rows[0] for
columns.
// The thead business is taken straight from sorttable.
makeDraggable: function(table) {
if (table.getElementsByTagName('thead').length == 0) {
the = document.createElement('thead');
the.appendChild(table.rows[0]);
table.insertBefore(the,table.firstChild);
}
PS: I have no idea of what I'm doing. I was trying to replace (manually) all
references to rows to columns, and vice-versa, but ran into this problem above.
Original comment by silico...@gmail.com
on 12 Sep 2009 at 3:05
I'm guessing you can just use the DOM structure to get a single row. Tables are
defined in row-major order (like
<table><tr><td>..., not <table><td><tr>), so the TR element should contain all
the columns for a row.
Original comment by danvdk
on 13 Sep 2009 at 4:35
Original issue reported on code.google.com by
jacaete...@gmail.com
on 27 Jun 2008 at 6:33