foxtrick icon indicating copy to clipboard operation
foxtrick copied to clipboard

Detect dates in automatic table sort

Open minj opened this issue 7 years ago • 3 comments

From: Tatonyo PostID: 16963779.649 To: Piekie Re: 16963779.648 Datetime: 2017-09-12 17:56 Message:

I'm sorry.

There may be an error on a player's injury history page when you want to sort by date. It does not take into account the year and the month before the day. First consider the day and then the month and then the year.

I use foxtrick 55.0.2


Foxtrick 0.17.0.1 release mozilla - Stage: false - Skin: normal - ca - ltr - 360 x 592 - Mozilla/5.0 (Android 6.0; Mobile; rv:55.0) Gecko/55.0 Firefox/55.0 - Linux armv8l

minj avatar Sep 30 '17 22:09 minj

This is due to the fact that there is an additional, hidden row in the injury history table. Screenshot 2019-11-13 at 20 25 57

The contents of the first column of that row are empty, thus the Foxtrick.util.time.getDateFromText function does not consider it being a date. This results in the is_date flag being set to false in table-sort.js.

I will need to look into this further before committing a fix to make sure that I'm not introducing any sort of regression. I don't have time for that today sadly.

gleerman avatar Nov 13 '19 19:11 gleerman

No problem. This file is included in the huge changeset that I've been meaning to finally merge so it would probably lead to conflicts.

2019-11-13, tr, 20:31 gleerman [email protected] rašė:

This is due to the fact that there is an additional, hidden row in the injury history table. [image: Screenshot 2019-11-13 at 20 25 57] https://user-images.githubusercontent.com/5098787/68796954-faeb5380-0653-11ea-88cd-db14304cbd64.png

The contents of the first column of that row are empty, thus the Foxtrick.util.time.getDateFromText function does not consider it being a date. This results in the is_date flag being set to false in table-sort.js https://github.com/minj/foxtrick/blob/master/content/shortcuts-and-tweaks/table-sort.js#L110 .

I will need to look into this further before committing a fix to make sure that I'm not introducing any sort of regression. I don't have time for that today sadly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/minj/foxtrick/issues/1534?email_source=notifications&email_token=AAH42A23BPK3IDXOTO4TKZ3QTRIZJA5CNFSM4D5G2ST2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED7LDHA#issuecomment-553562524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH42A52N7MJVJDQSSMS54TQTRIZJANCNFSM4D5G2STQ .

minj avatar Nov 14 '19 00:11 minj

@gleerman still interested in contributing?

minj avatar Jun 28 '20 10:06 minj