Problem/Motivation

When dragging a group of table rows (e.g. in a hierarchical menu), the classes for "tree-child", "tree-child-first", and "tree-child-horizontal" are not added. This makes it so that the visual representation of the tree being dragged is not shown. The last class, "tree-child-last" actually continues to work.

Here's a screenshot *while dragging* an item. You can see the lack of tree indicators except for the last item (Views).

Proposed resolution

Fix the addition of classes in Drupal.tableDrag.prototype.row.prototype.findChildren().

Remaining tasks

Review and test.

User interface changes

None, other than fixing the functionality

API changes

None.

Files: 
CommentFileSizeAuthor
#1 after.png59.07 KBquicksketch
#1 before.png58.35 KBquicksketch
#1 tabledrag-tree-child-2277785.patch1.65 KBquicksketch
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 71,694 pass(es). View

Comments

quicksketch’s picture

Status: Active » Needs review
FileSize
1.65 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 71,694 pass(es). View
58.35 KB
59.07 KB

Patch attached. I also changed the variable "currentRow" to be "$currentRow", since it's a jQuery object. Since this is a variable scoped inside of .findChildren() it shouldn't have any other effect and just makes that function follow our variable naming pattern.

Attached before and after photos as well.

quicksketch’s picture

Issue summary: View changes
nod_’s picture

Status: Needs review » Needs work

Any chance you can change the rowIndentation signature so that it follows jQuery's wrong order for each() params instead of having to use this? rowIndentation(indentNum, el)

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.