diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2014-08-14 05:38:40 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-14 09:53:03 -0600 |
commit | a03e7729547ccf635e0e023caa8bc3bad32bb0e2 (patch) | |
tree | 3971c7e2052775d104e1dfe9ab394fc6150c5d25 /theme | |
parent | a6fe3a2234acbc741a0bba54b352e24f8501a41c (diff) | |
download | subsurface-a03e7729547ccf635e0e023caa8bc3bad32bb0e2.tar.gz |
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>
Diffstat (limited to 'theme')
-rw-r--r-- | theme/list_lib.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js index ecdf5df6c..abd790178 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -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) |