开发者

Multi user - Drag&Drop

I have a tree ful with data that are draggable (& droppable). It all works fine, but there's one problem. When more users're working on this module (w开发者_开发技巧ith tree) and they're dragging objects around, all get mixed up. So I'm working on a solution, but I got as far as table lock in mysql. But if I do that, just one user can work on this module and that is no acceptable.

Got any ideas?


What about when a user clicks on the object a request is sent to the MySQL database requesting approval for that user to move that object.

If that object is not tagged as being moved then the database returns true and the javascript makes the object draggable. MySQL marks that row in the table with one of the fields (i.e. you create a field called locked and set it to true or false)

If the MYSQL returned false then the user would get some sort of notification that someone else was moving that object currently.

I would also create a timestamp each time a row is marked as locked so you can check if the object has been unlocked)

good luck,

Niko

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜