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.pull/8/head
parent
1226d363be
commit
9b3cdb5583
14
template.h
14
template.h
|
@ -65,9 +65,9 @@ static const u_char t06_list1[] = ""
|
|||
"\n"
|
||||
"<thead>"
|
||||
"<tr>"
|
||||
"<th>File Name</th>"
|
||||
"<th>File Size</th>"
|
||||
"<th>Date</th>"
|
||||
"<th><a href=\"?C=N&O=A\">File Name</a> <a href=\"?C=N&O=D\"> ↓ </a></th>"
|
||||
"<th><a href=\"?C=S&O=A\">File Size</a> <a href=\"?C=S&O=D\"> ↓ </a></th>"
|
||||
"<th><a href=\"?C=M&O=A\">Date</a> <a href=\"?C=M&O=D\"> ↓ </a></th>"
|
||||
"</tr>"
|
||||
"</thead>"
|
||||
"\n"
|
||||
|
@ -87,12 +87,12 @@ static const u_char t08_foot1[] = ""
|
|||
"</html>"
|
||||
;
|
||||
#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) \
|
||||
)
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>File Name</th>
|
||||
<th>File Size</th>
|
||||
<th>Date</th>
|
||||
<th><a href="?C=N&O=A">File Name</a> <a href="?C=N&O=D"> ↓ </a></th>
|
||||
<th><a href="?C=S&O=A">File Size</a> <a href="?C=S&O=D"> ↓ </a></th>
|
||||
<th><a href="?C=M&O=A">Date</a> <a href="?C=M&O=D"> ↓ </a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
Loading…
Reference in New Issue