There appears to be two minor issues with the updateField function in tabledrag.js

1. If there are multiple draggable tables on one page and rowSettings.relationship == 'parent' and it doesn't find a previous row, then it will grab the first row from the first draggable table on the page instead of the active draggable table.

Old:
sourceRow = $('tr.draggable:first').get(0);

New:
sourceRow = $($(changedRow).parents('table.tabledrag-processed').get(0)).find('tr.draggable:first');

2. If rowSettings.relationship == 'sibling' then it computes the number of indentations with '.indentations' instead of '.indentation'. and then it compares an integer representing the number of indentations to an array of indentations of the changedRow.

Old:
if ($('.indentations', previousRow).size() == $('.indentations', changedRow)) {

New:
if ($('.indentation', previousRow).size() == $('.indentation', changedRow).size()) {
CommentFileSizeAuthor
#2 tabledrag_cvsdiff.patch1.73 KBd.clarke
tabledrag.patch1.4 KBd.clarke

Comments

Status: Needs review » Needs work

The last submitted patch, tabledrag.patch, failed testing.

d.clarke’s picture

Status: Needs work » Needs review
StatusFileSize
new1.73 KB

Trying with a patch file generated from cvs diff

Status: Needs review » Needs work

The last submitted patch, tabledrag_cvsdiff.patch, failed testing.

d.clarke’s picture

Version: 6.17 » 6.x-dev
d.clarke’s picture

Status: Needs work » Needs review

#2: tabledrag_cvsdiff.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, tabledrag_cvsdiff.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.