HTML: Sort by number based on the chosen number format.

Sorting by the number must be based on either subsurface number or the
regular indexing as choosed in settings.json

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-08-14 05:38:40 +03:00 committed by Dirk Hohndel
parent a6fe3a2234
commit a03e772954

View file

@ -374,9 +374,14 @@ function cmpNumAsc(j, iSmaller)
return items[j].subsurface_number < items[iSmaller].subsurface_number;
}
function cmpNumAsc(j, iSmaller)
{
return settings.subsurfaceNumbers === '0' ? items[j].number < items[iSmaller].number : items[j].subsurface_number < items[iSmaller].subsurface_number;
}
function cmpNumDes(j, iSmaller)
{
return items[j].subsurface_number > items[iSmaller].subsurface_number;
return settings.subsurfaceNumbers === '0' ? items[j].number > items[iSmaller].number : items[j].subsurface_number > items[iSmaller].subsurface_number;
}
function cmpTimeAsc(j, iSmaller)