Player name sorting

Questions about modifications to Zuluru code, to add or change features

Player name sorting

Postby sulfur » Mon Dec 16, 2013 4:07 pm

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).
sulfur
 
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Re: Player name sorting

Postby GregS » Mon Dec 16, 2013 4:14 pm

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?
GregS
Site Admin
 
Posts: 236
Joined: Thu Jan 06, 2011 4:58 pm

Re: Player name sorting

Postby sulfur » Mon Dec 16, 2013 4:19 pm

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?
sulfur
 
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Re: Player name sorting

Postby GregS » Mon Dec 16, 2013 4:23 pm

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?
GregS
Site Admin
 
Posts: 236
Joined: Thu Jan 06, 2011 4:58 pm

Re: Player name sorting

Postby sulfur » Mon Dec 16, 2013 4:31 pm

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...
sulfur
 
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron