I want to use tabledrag to manage 2 kinds of elements. Let's call them branches and leaves. Branch can be parent to both branches and leaves. Leaf cannot be parent to anything. A support for class tabledrag-parent-locked
preventing change of a parent can be added, but that's not exactly what I want, I actually want to be able change parents, just to other designated parents.
So, is there any class or module to get that effect?
tabledrag-parent-locked
class is a completely custom thing based on the script in the question you linked to - core doesn't use that class at all (it's not even in the codebase). I expect you need to override the same functions as in the other post and tweak the logic to deny dropping, rather than denying indentation