From 9b3cdb5583d23bb139322c3e7d56da038439d54a Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Fri, 25 Oct 2013 12:19:27 +0300 Subject: [PATCH] Clickable table headers change sort direction Make table headers clickable, for changing sorting direction of the entries. Clicking on the name of the headers selects ascending direction, clicking on the arrow next to it, chooses descending direction. The arrow symbol, for simplicity, is an Unicode down-arrow symbol, which all reasonably modern browsers should display fine. Also, most text-only browsers will show the arrow correctly when running on Unicode-compatible terminals. --- template.h | 14 +++++++------- template.html | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/template.h b/template.h index d40374f..04962c7 100644 --- a/template.h +++ b/template.h @@ -65,9 +65,9 @@ static const u_char t06_list1[] = "" "\n" "" "" -"File Name" -"File Size" -"Date" +"File Name  ↓ " +"File Size  ↓ " +"Date  ↓ " "" "" "\n" @@ -87,12 +87,12 @@ static const u_char t08_foot1[] = "" "" ; #define NFI_TEMPLATE_SIZE (0 \ - + nfi_sizeof_ssz(t05_body2) \ - + nfi_sizeof_ssz(t06_list1) \ - + nfi_sizeof_ssz(t07_list2) \ - + nfi_sizeof_ssz(t08_foot1) \ + nfi_sizeof_ssz(t01_head1) \ + nfi_sizeof_ssz(t02_head2) \ + nfi_sizeof_ssz(t03_head3) \ + nfi_sizeof_ssz(t04_body1) \ + + nfi_sizeof_ssz(t05_body2) \ + + nfi_sizeof_ssz(t06_list1) \ + + nfi_sizeof_ssz(t07_list2) \ + + nfi_sizeof_ssz(t08_foot1) \ ) diff --git a/template.html b/template.html index caf30b2..1abe65c 100644 --- a/template.html +++ b/template.html @@ -63,9 +63,9 @@ - File Name - File Size - Date + File Name  ↓  + File Size  ↓  + Date  ↓