I am using tree and try to prevent dnd on Nodes. I want to limit the dnd functionality to only allow sorting, not to move a node to another node.
In other words, if the Target-Node has the class tree-node-bottom or -top it's ok, if it has tree-node-append its forbidden.
I dont want to test it onDrop because i want to give the User Feedback on moving the Node.
I've tried onDragOver like this:
...
onDragOver : function(target,source) {
if( $(target).hasClass('tree-node-append') )
return false;
else
return true;
},
...
but this alters the classes permanently. It is ok whenn you drag the source-Node over the target-Node for the first time. But then, the targetNode will never again bekome the class tree-node-bottom or -top.
What happens exactly when i return false in onDragOver? Does this permanently disable a node?
Can anyone help? Iv'e searched the Forum and found a solution for prevent moving before and after a Node, but this does not help me. It also is not realy preventing the dragOver, it only changes the class to tree-node-append.
Thanks so far and btw: merry christmas