- last update
over 2 years ago Custom Commands Failed - ๐ต๐น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.