extend core's draggable list script to handle locked rows

Created on 6 July 2017, about 7 years ago
Updated 9 July 2024, 2 months ago

The admin lists of entity tabs currently have JS draggability turned off, because the core JS script for this doesn't account for locked rows, which we have because we can't change the weight of tabs that aren't provided by entity tab entities.

Rows that can't change their weight need to be taken into consideration in several ways:

- the script reassigns the weights of all rows when they are rearranged, and produces different values for the lowest weight (I imagine there's a rule for determining this, but I've not looked at the code enough). If some rows have locked weights, then these apply a constraint to where to anchor the range of weights. Eg, if you start with one normal row, then one locked row at weight 1, then your first row MUST be at weight 0 or less.
- because weights are integers, two or more locked rows restrict how many fluid rows can go between them. Eg if you have locked rows with weights 1, 2, 5, then nothing can go between the 1 and the 2, and at most two rows between the 2 and the 5.

📌 Task
Status

Active

Version

1.0

Component

User interface

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024