Closed brianjgeiger closed 10 years ago
I may be able to work around this on my side, as I have to reload all the data in any case, though it might look a bit odd depending.
It doesn't look like I can easily work around this; I don't have easy access to the grid when I'm responding to the onDrop event, so when the data changes under me, I have a tough time reloading the proper folders. Ideally, if we are lazy-loading anyways, it should lazy-load the appropriate folders once the drop events are handled rather than directly manipulating the data. Failing that, letting me have an option to not modify the grid and letting me handle it all would be great.
As of 87306cf, HGrid.Draggable objects (and all plugins henceforth) have access to their HGrid through their grid
attribute.
Will this be enough for your needs, or will you still need an option to prevent the grid manipulation?
It will probably be enough, but I'll need to try it out to be sure.
I have it working, but it will be inefficient if someone copies something out of a folder with many items, such as the 'All My Projects' smart folder, because I have to reload it in order to get the item back that was removed as part of the drag. If I don't have to reload, then it looks better and, in the case of a large smart folder, will save a lot of time.
It doesn't look right as is. It would be really great to be able to optionally disable this functionality. But it does work consistently now.
Added a temporary enableMove
flag that will take of this
The draggable plugin is currently moving things whenever they are dropped. I need to update this based on info we get back from the server. The biggest problem is sometimes things are being copied and not moved, and they shouldn't be removed from the original folder.