Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot rearrange files uploaded by clicking upload icons. #828

Closed
koxu1996 opened this issue Dec 30, 2016 · 2 comments
Closed

Cannot rearrange files uploaded by clicking upload icons. #828

koxu1996 opened this issue Dec 30, 2016 · 2 comments

Comments

@koxu1996
Copy link
Contributor

Steps to reproduce the issue

  1. Select images
  2. Upload by clicking upload icon under each thumbnail
  3. You cannot rearrange image, although drag icon is avaliable.

Cause

sortable.js is looking for $(".file-preview-thumbnails .file-initial-thumbs"), but single uploaded images are in $(".file-preview-thumbnails .file-initial-thumbs"). I think they should be moved to div.file-initial-thumbs.

@koxu1996 koxu1996 changed the title Cannot rearrange files uploaded by clicking icons. Cannot rearrange files uploaded by clicking upload icons. Dec 30, 2016
@kartik-v
Copy link
Owner

kartik-v commented Dec 30, 2016

Yes the problem will be that all such images need to be in ONE single container with file-initial-thumbs class for sortable plugin to drag and drop within that for any rearrangement.

It will however cause some UI problems. This means with the above change when clicking the single upload button in the thumbnail, the uploaded images derived in initial preview will move to one container and that will cause a UI problem as if you have 5 thumbnails and you upload IMAGE_1 and IMAGE_5 via single upload button, then IMAGE_1 and IMAGE_5 will be moved to beginning within file-initial-thumbs with init preview, while IMAGE_2, IMAGE_3, and IMAGE_4 will appear after that as not uploaded. This may not be user friendly as user will perceive IMAGE_5 to have moved before IMAGE_2.

I suggest that it remain the way that the sortable for such case should not be enabled until someone refreshes the page and the initial preview is derived based on the batch sent by server (for sortable to be then used effectively to rearrange).

@kartik-v
Copy link
Owner

I think I will solve this with another workaround code. Will update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants