PDA

View Full Version : Scanlator sorting doesn't work; fix included.



Nihil
June 30, 2009, 05:09 PM
A while ago, the sorting feature on the scanlator page stopped working (well, it still sorts by name correctly, but not by releases or fans). I took a look at the Javascript, though, changed some stuff via Firefox's Web Developer plugin, and discovered why -- the names of the fields are being incorrectly passed to the sortResults function.

That is, right now the relevant code is:


<td style="padding-right: 7px; width: 70px;">
<a onclick="sortResults('total_releases');">Releases</a><span id="sortreleases"></span>
</td>
<td style="padding-right: 7px; width: 70px;">
<a onclick="sortResults('total_favorites');">Fans</a><span id="sortfans"></span>
</td>


Note that the arguments passed to sortResults are "total_releases" and "total_favorites", respectively. To fix the issue, these should be changed to "releases" and "fans".

This is a minor issue, and I'm sure you guys could've fixed it easily enough, but I figured I'd save you a few minutes of debugging anyway.

-Nihil

Lorenzo3
February 18, 2010, 11:37 AM
It was really a good experience to read out from here

Osso
February 28, 2010, 07:50 AM
Uhm yeah.... I only see this now .. :)
The sorting is fixed though and thanks for your included fix.