[relocate event] to be able to pass arguments of the relocate function the new and the old position of the item.
From DrSchizo : One nice addition would be to pass as arguments of the relocate function the new and the old position of the item. For instance, my script is saving the new location in real time, and not only after clicking on a "save" button. I managed to do it by exporting the toArray output and comparing it with a saved version, but it could have been not much easier to do, especially since the previous and current index and parent id should be retrieved in the script just before triggering the relocate event (at least, once the bug will be fixed).
+1
+1 Also - there should be a way to prevent the movement. Like you drag an item, call some ajax save on drop and if it fails for some reason - there should be a way to revert the tree to it's old state, so it stays in sync with the DB state.
Btw., what is the point of the relocate event, when original jquery ui sortable start and stop events are working quite fine, incl. the preventDefault ?