If I add for example weight element as 1st column of table row, then using drupal_add_tabledrag('my-table', 'order', 'sibling', 'my-weight', NULL, NULL, TRUE) hides drag handle together with weight. OTOH, drupal_add_tabledrag('my-table', 'order', 'sibling', 'my-weight', NULL, NULL, FALSE) makes both drag handle and weight column show.
I was able to fix this by moving weight element to last column in a row.
I experienced it on 6.x but this probably must be fixed in 7.x then backported as usual.

Files: 
CommentFileSizeAuthor
#5 drupal-tabledrag-495100-5.patch3.18 KBskilip
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal-tabledrag-495100-5.patch. Unable to apply patch. See the log in the details link for more information. View
#2 index.php.txt980 byteshatef
#2 cron.php.txt262 byteshatef
#2 xmlrpc.php.txt352 byteshatef

Comments

crea’s picture

I guess that's because drag handle is made child of first column cell.
We need to either put it outside of first column (make separate column), make javascript smarter about it, or make it clear in documentation that one shouldn't put his $group column as 1st column.

hatef’s picture

FileSize
352 bytes
262 bytes
980 bytes
casey’s picture

Component: theme system » javascript
nod_’s picture

Version: 7.x-dev » 8.x-dev

no idea what #2 is about but we should fix this.

skilip’s picture

Status: Active » Needs review
FileSize
3.18 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal-tabledrag-495100-5.patch. Unable to apply patch. See the log in the details link for more information. View

The following patch should fix this. The script now skips table cells with the class 'tabledrag-hide' when selecting the first table cell.

Needed to move initColumns() before makeDraggable() is executed to make sure the 'tabledrag-hide' class was present.

Status: Needs review » Needs work

The last submitted patch, 5: drupal-tabledrag-495100-5.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.