I have tree structure in my application like folders when I click on folders on same page its going to show all files under that folder
with an ajax call.
Folders has many files.
So now my problem is, I want to drag file from one folder to another folder. So that if files folder_id which I am dragging is 1, when I drop it to Folder 2, in back end it should update as folder_id= 2
I am not getting any idea to do this,
- How can I enable user to drag file and drop in any folders
- Once he dragged and dropped, how should I update in back end
You can also use Ext. http://docs.sencha.com/ext-js/4-1/#!/example/tree/reorder.html
The way you update your back end is by a simple Ajax call that passes the current state of the tree.