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

Sortable Table in Manage Files #169

Closed
Nicola1971 opened this issue Aug 10, 2017 · 13 comments
Closed

Sortable Table in Manage Files #169

Nicola1971 opened this issue Aug 10, 2017 · 13 comments

Comments

@Nicola1971
Copy link

Nicola1971 commented Aug 10, 2017

I think sorting columns in Manage Files is a missing feature: it would be useful to see latest modified files (ie: hacking) and files sizes.

Evo use old tablesort.js library for sorting tables in some manager pages (schedule, messages, view children in documents overview (no more works in 1.3x) )

here you can see all manager pages where is used https://github.com/modxcms/evolution/search?utf8=%E2%9C%93&q=tablesort&type=

this old library does not work properly with complex fields like file sizes (does not understand b, Kb, Mb...), so in the past we (tried but) never used for Manage Files page.

I want to replace tablesort.js with a better library : tablesorter https://github.com/christianbach/tablesorter.

Actually i've only added to manage files and tweaked to work with file size:
download

download

what do you think? I continue? :)

@Nicola1971 Nicola1971 changed the title Sortable Tables in Manage Files Sortable Table in Manage Files Aug 10, 2017
@64j
Copy link
Member

64j commented Aug 10, 2017

@Nicola1971
I changed the sorting as an example here site/manager/#?a=13
If everything suits you, i can easily replace it with what you offer.

@64j
Copy link
Member

64j commented Aug 10, 2017

@Nicola1971
View manager logs

image

@64j
Copy link
Member

64j commented Aug 10, 2017

@Nicola1971
Can be replaced in a file manager/actions/files.dynamic.php

image

@64j
Copy link
Member

64j commented Aug 10, 2017

@Nicola1971 It is advisable to change the script written in native JS

For example, as here https://github.com/tristen/tablesort

@Nicola1971
Copy link
Author

@64j

Can be replaced in a file manager/actions/files.dynamic.php

yes, It's like I did ;)

@Nicola1971 It is advisable to change the script written in native JS
For example, as here https://github.com/tristen/tablesort

nice, but need to check if works with filesize

@64j
Copy link
Member

64j commented Aug 10, 2017

@Nicola1971 No, sorting by file size does not work correctly.(((

@Nicola1971
Copy link
Author

@64j
Most of sortable table library does not. I've tested various library but still the same issue with file size.

Suggestion: we can use tablesorter.js just for the file manager and styling like other tables in the manager (and move these tables to native js)

@64j
Copy link
Member

64j commented Aug 10, 2017

@Nicola1971 Here it works

http://tristen.ca/tablesort/demo/

@Nicola1971
Copy link
Author

Nicola1971 commented Aug 10, 2017

@64j Yes! :)
https://github.com/tristen/tablesort/blob/gh-pages/src/sorts/tablesort.filesize.js

i'm not a js master, but looks good to me :)

I will check tomorrow, now is like 2am in Italy :)

@Nicola1971
Copy link
Author

@64 tested http://tristen.ca/tablesort/demo/ in Manage Files

Pros: works with filesize
Cons: date sort not work properly with Manage Files dates (date + hours)

@64
Copy link

64 commented Aug 11, 2017

Looks like you pinged the wrong guy :) @Nicola1971

@Nicola1971
Copy link
Author

@64 sorry :)

@Seiger
Copy link

Seiger commented May 23, 2023

Added to EVO 3.2.1

@Seiger Seiger closed this as completed May 23, 2023
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

5 participants