for example:
[{
"data": "reference",
"attr": {
"id": "0"
},
"state": "open",
"children": [
[{
"data": "one",
"attr": {
"id": "1"
},
"state": "closed"
}, {
"data": "two",
"attr": {
"id": "2"
}
}]
]
}, {
"data": "recycle bin",
"attr": {
"id": "bin"
},
"state": "closed",
"children": []
}]
i need to deny delete/move/rename “reference” & “recycle bin” nodes with “dnd”, “crrm” and “context menu” plugins
For avoiding moves using the crrm plugin you could do:
In summary, you need to return TRUE for allowing the move, or FALSE otherwise. So you check that the node’s ID being moved is not the reference one, or the recycle bin one.
Please take a look at the jsTree documentation for accomplishing the other tasks, as everything you need is there. Don’t be lazy 🙂