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

Many-to-many object relation / multiselect in tag mode: support drag & drop to change order of assigned items #547

Conversation

BlackbitDevs
Copy link
Contributor

@BlackbitDevs BlackbitDevs commented Jun 3, 2024

Assume we have a many-to-many object relation in display mode = tag field.

When assigning new objects, everything works great but sometimes the order of the assigned items matters and you want to insert an item in between or change the order of already assigned items.
So if you have assigned objects /one and /three and now want to insert /two in between, then you have to currently

  1. delete assignment for/three
  2. assign /two
  3. assign /three

This is quite complicated. And depending on number of assigned elements, this is can be even more work.

This PR adds drag & drop support for the assigned items. It works like in https://fiddle.sencha.com/fiddle/i65/preview
With this you can change the order of assigned objects afterwards.

The same functionality has also been applied to multiselect fields in tag mode.

Copy link

sonarcloud bot commented Jun 3, 2024

Quality Gate Passed Quality Gate passed

Issues
22 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
6.3% Duplication on New Code

See analysis details on SonarCloud

@robertSt7
Copy link
Contributor

Hi @BlackbitDevs could you please replace var with let and const? Thanks

@BlackbitDevs
Copy link
Contributor Author

@robertSt7 Done.

Copy link

sonarcloud bot commented Aug 12, 2024

@mcop1 mcop1 self-assigned this Aug 22, 2024
@fashxp
Copy link
Member

fashxp commented Aug 30, 2024

We don't want to be picky, but we need to be careful with compliance and copyrights.

So, I'm sorry, we cannot merge this PR, as it includes code from a foreign author that has not signed our CLA.
Options to continue:

  • rewrite that piece of code that it is your own work
  • get permission of the original author

@BlackbitDevs
Copy link
Contributor Author

@adamborowski is the code in https://fiddle.sencha.com/fiddle/i65/preview from you? Would it be ok to use it in Pimcore?

@adamborowski
Copy link

@adamborowski is the code in https://fiddle.sencha.com/fiddle/i65/preview from you? Would it be ok to use it in Pimcore?

Sure

@BlackbitDevs
Copy link
Contributor Author

BlackbitDevs commented Sep 2, 2024

@fashxp Is above comment enough?

@fashxp
Copy link
Member

fashxp commented Sep 16, 2024

yes it is, thx very much @adamborowski. maybe we can translate the comments to english, test once more then it is ready to merge.

@BlackbitDevs
Copy link
Contributor Author

Have translated the comments.

Copy link

sonarcloud bot commented Sep 16, 2024

@mcop1
Copy link
Contributor

mcop1 commented Sep 19, 2024

Thanks, looks good to me.

@mcop1 mcop1 merged commit b3d14d1 into pimcore:1.x Sep 19, 2024
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants