Ability to disable tabledrag form fields

Created on 22 April 2021, over 4 years ago
Updated 20 April 2023, over 2 years ago

Problem/Motivation

When the weight field is disabled, it's still possible to use drag and drop. It should be possible to disable drag and drop also.

User interface changes

it will be enough to change the opacity and the cursor when hovering.

โœจ Feature request
Status

Needs work

Version

9.5

Component
Renderย  โ†’

Last updated about 9 hours ago

Created by

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine eugene.brit Kyiv ๐Ÿ‡บ๐Ÿ‡ฆ

    re-roll for 10.0.x

  • last update over 2 years ago
    Custom Commands Failed
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine eugene.brit Kyiv ๐Ÿ‡บ๐Ÿ‡ฆ

    re-roll for 10.3.x

  • ๐Ÿ‡ต๐Ÿ‡นPortugal gueguerreiro Lisboa

    The patch unfortunately does not work on Claro/Gin. Claro overwrites the CSS for tabledrag, so the core tabledrag.css file included in the patch is not used. And then Gin overwrites the JS for tabledrag, so the core tabledrag.js included in the patch is not used. There's a lot of overwriting happening for tabledrag ๐Ÿ˜…

    Also, I notice that the JS is not correct. It's trying to use the handle variable when it doesn't exist, leading to the tabledrag feature breakingโ€”whether it is disabled or not. Not only that, but it also seems to try to add the disabled class only when a user attempts to drag an item, not during table initialization.

    I created a patch (For 10.3) that changes the JS implementation (it simply checks if tabledrag is disabled, and if so, does not even add the event for mouse drag, and instead adds the disabled class to the handlers so they appear greyed out and cannot be interacted with), and also adds the CSS rules for the Claro override.

    I'm also adding a separate patch for Gin, if it's useful for anyone.

Production build 0.71.5 2024