Player name sorting

Questions about modifications to Zuluru code, to add or change features
Post Reply
sulfur
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Player name sorting

Post by sulfur »

When viewing a list of players in sortable tables (such as on team stats, division-wide stats, etc), the sort function should logically sort by last name, not first name as it currently does.

Note that the player searches and "list all" function are exempt from this, as they separate the player first and last names from the get-go. Team rosters are also exempt, since you can't sort them at all (though, I can see a use to sort those by number, name, position, or date of joining).
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Player name sorting

Post by GregS »

The sorting in the stats pages is all done in-browser by JavaScript, which doesn't know anything about first or last names. Not sure if there's anything that can be added that would fix that. Maybe I just need to split the name into two columns?
sulfur
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Re: Player name sorting

Post by sulfur »

Keeping them in one column looks nicer, but there's likely a way to give a "sortkey" for each item.

Perhaps as simple as something like:

Code: Select all

<span style="display:none">Reeves-Stevens, Judith</span> Judith Reeves-Stevens
In the name column... where the "Reeves-Stevens, Judith" is simply "lastname, firstname"?

Might that do the trick?
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Player name sorting

Post by GregS »

Well, in the Ultimate league I'm in, people tend to know first names better than last names, so in that case sorting by first name is arguably much more user-friendly. Yet Another Configuration Option?
sulfur
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Re: Player name sorting

Post by sulfur »

Ah, good call. Hadn't considered that. Seems to be hit and miss I guess depending on where you are. Perhaps splitting into the separate names on the major stats list is the way to go then!

If it is an option, I would suggest that it be an option by user...
Post Reply