[mod_dirlisting] js column sort for dirlist table (fixes #613, fixes #2315)
commitcfa3d27fc3f6c62350ea12f52a95e1c54ee547b7
authorGlenn Strauss <gstrauss@gluelogic.com>
Thu, 11 Aug 2016 04:08:43 +0000 (11 00:08 -0400)
committerGlenn Strauss <gstrauss@gluelogic.com>
Thu, 11 Aug 2016 04:27:11 +0000 (11 00:27 -0400)
treeb95816298cd75260a6a8ee8bc0e403da49ba4fc3
parent09a663b95b9d986b2272878ea6e5548ce928ded6
[mod_dirlisting] js column sort for dirlist table (fixes #613, fixes #2315)

copied javascript from mod_status and from lighttpd2 mod_dirlist

modified and specialized for stable dirlist sorting by name

Partial implementation of Apache autoindex request query arguments
  (https://httpd.apache.org/docs/current/en/mod/mod_autoindex.html)
If query string is supplied, allow specifying initial column to sort
  ?C=N name (default)
  ?C=M last-modified, then by name
  ?C=S size, then by name
  ?C=T type, then by name
  ?C=D type, then by name
and O=[AD] can be added for descending or ascending order, e.g.
  ?C=N&O=D descending (default)
  ?C=N&O=A ascending

(While functional, no effort was made on js performance.
 Patches welcome)

New directive dir-listing.external-js for user to replace sorting js

Note: dir-listing.external-js or default js sorting is enabled only
if dir-listing.auto-layout = "enable" (which is the default)

x-ref:
  "client-selectable directory list sorting"
  https://redmine.lighttpd.net/issues/613
  "dir-listing.external-js"
  https://redmine.lighttpd.net/issues/2315
src/mod_dirlisting.c