If you use the #empty property on a table, tabledrag isn't smart enough to hide the table's weight column if table is empty. This is because the "empty" text is displayed with a colspan that takes up the whole row, and tabledrag relies on a class that is only added to the weight column. That column doesn't exist in the table body when the colspan is in effect, hence tabledrag can't find the class and does nothing.
An easy way to fix this is to add the magic class to the weight column in the table header.
We use tabledrag when editing Reaction Rules and Rules Components, in both the Conditions block and the Actions block, to enable us to re-order the conditions and/or actions in the rule. This problem is apparent when first creating the rule, because at that time both the Conditions and Actions will be empty, but it is also seen when you have a Rule that has no conditions.
| Comment | File | Size | Author |
|---|---|---|---|
| tabledrag-hide-weight-when-empty.patch | 1.29 KB | tr |
Comments
Comment #3
tr commentedCommitted.