close
Skip to content

1425: Add Glossary sorting#1426

Merged
ocean90 merged 11 commits intoGlotPress:developfrom
pedro-mendonca:glossary-sorting
Oct 10, 2022
Merged

1425: Add Glossary sorting#1426
ocean90 merged 11 commits intoGlotPress:developfrom
pedro-mendonca:glossary-sorting

Conversation

@pedro-mendonca
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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