From ff846fb6d0d6666630f173189698d2060585e065 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Fri, 8 Dec 2017 09:09:46 +0000 Subject: [PATCH] Add reverse sort by date --- webif/html/browse/index.jim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index e00ea03..aecac16 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -330,6 +330,7 @@ proc s_time {a b} { set files [readdir -nocomplain $dir] switch $order { 1 { set files [lsort -command s_time $files] } + 2 { set files [lreverse [lsort -command s_time $files]] } default { set files [lsort -nocase $files] } } @@ -344,7 +345,7 @@ Directories: $dircount, Files: $filecount # Sort icons puts "
" -set sortlist {{0 sort_name name} {1 sort_date date}} +set sortlist {{0 sort_name name} {1 sort_date date} {2 sort_date reverse-date}} foreach sl $sortlist { lassign $sl index img descr