Problem/Motivation
It would be nice to be able to lock items when using table drag; to support this the tabledrag script should account for this disabled/locked items when updating weights.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | interdiff-2_3.txt | 468 bytes | gauravvvv |
| #3 | 3388503-3.patch | 665 bytes | gauravvvv |
| #2 | 3388503-2-D10.patch | 682 bytes | casey |
| #2 | 3388503-2.patch | 682 bytes | casey |
Issue fork drupal-3388503
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
casey commentedSomething like this would work.
To lock a row, it should not have a draggable class and its weight should be disabled. Also, this patch only works for (not select) inputs as weight.
Comment #3
gauravvvv commentedFixed ccf issue, attached interdiff for same
Comment #6
joachim commentedConverted this to an MR with the patches so far committed.
I can see a corner case which this does not handle yet: suppose two locked items have the *same* weight.
It should not be possible to drag an item in between these two items, because there is no way to set a weight to go in between them.