3

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?

3
  • The 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
    – Clive
    Commented Jul 18, 2013 at 12:55
  • 1
    @Clive thanks, fixed question. And I'm afraid you may be right. If I'll do it, I'll post a self answer.
    – Mołot
    Commented Jul 18, 2013 at 12:57
  • My answer deleted as I found a bugs in it, that allowed it to fail sometimes.
    – Mołot
    Commented Jul 26, 2013 at 6:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.