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

1425: Add Glossary sorting #1426

Merged
merged 11 commits into from
Oct 10, 2022
Merged

Conversation

pedro-mendonca
Copy link
Member

@pedro-mendonca pedro-mendonca commented May 4, 2022

Add sorting to columns Item and Translation.

  • Add tablesorter to Glossary view
  • Set sorteable columns with properties set within ´´
  • Set rows with class editor as child rows to keep below the parent on sorting
  • Update CSS to only show the arrow sort icon and cursor pointer on sorteable column headers

Fixes #1425

@pedro-mendonca pedro-mendonca requested a review from ocean90 May 4, 2022 10:13
@pedro-mendonca
Copy link
Member Author

@ocean90 initially I've added the script to the bottom of the glossary-view.php as in the project.php, but as we have a glossary.js, thought it would be better to add it here.
Let me know what do you think is best.

I left the minifcation for after your review.

@pedro-mendonca
Copy link
Member Author

pedro-mendonca commented May 4, 2022

There is still an issue on clicking the details, the row is not in the correct order.

Another thing, might be better to add the 'sorter' ID on the <td> to avoid future mapping issues, as some columns are optional, depending on the editing permissions of the user.

@pedro-mendonca
Copy link
Member Author

On e78b9a7 the editor rows are always after the main row, fixing the sorting issue.

@ocean90 ocean90 added this to the 4.0 milestone Oct 10, 2022
@ocean90 ocean90 merged commit 7f9edcd into GlotPress:develop Oct 10, 2022
@pedro-mendonca pedro-mendonca deleted the glossary-sorting branch December 14, 2022 10:09
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.

Glossary: Add sorting to the table
2 participants