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

Fix sorting of fields in an inline type #181

Merged
merged 1 commit into from
Oct 11, 2018
Merged

Conversation

ghost
Copy link

@ghost ghost commented Oct 9, 2018

The drag & drop operaiton in the backend re-orders the form elements,
such that the iteration in the Mask storage update is in the correct
order, but that order is destroyed by sortJson. This fixed sorting is
valuable to version control, so instead this commit introduces an extra
field 'order' in the column of the inline type. This is used in the TCA
generator and before the backend view renders.

Additionally, I removed a superfluous initSortable call in the backend JavaScript.
The sortable widget has already been initialized, no need to re-initialize it
with some new functions that do exactly the same.

The drag & drop operaiton in the backend re-orders the form elements,
such that the iteration in the Mask storage update is in the correct
order, but that order is destroyed by sortJson. This fixed sorting is
valuable to version control, so instead this commit introduces an extra
field 'order' in the column of the inline type. This is used in the TCA
generator and before the backend view renders.
@butu
Copy link
Collaborator

butu commented Oct 11, 2018

Thank you! :)

@ayacoo
Copy link
Contributor

ayacoo commented Dec 17, 2018

Someone tested with"Reapeating" in "Repeating"?
First Repeating sorting is fine, second Repeating sorting sorts alphabetically

mask 3.3.3

@Max-LAB
Copy link

Max-LAB commented Dec 19, 2018

Yes, I can also confirm that first Repeating sorting is fine, second Repeating sorting is not in mask 3.3.3.

Also in the second repeating element Field that should be used as label for inline element and Path to icon for irre elements are not working too.

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

Successfully merging this pull request may close these issues.

None yet

4 participants