Feature #2315


Added by molyland almost 6 years ago. Updated 9 months ago.

Target version:
Start date:
Due date:
% Done:


Missing in 1.5.x:


Append option to dir-listing module to import a javascript external file in the dir-listing default html page.
For example: <script type="text/javascript" src="script.js"></script>.
This patch is append to release 1.4.28

mod_dirlisting.c View (25.9 KB) molyland, 2011-05-12 11:18

mod_dirlisting_patch.txt View (5.83 KB) molyland, 2011-11-16 11:12

Related issues

Related to Feature #613: client-selectable directory list sorting, patch included Fixed

Associated revisions

Revision cfa3d27f (diff)
Added by gstrauss 9 months ago

[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
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 = "enable" (which is the default)

"client-selectable directory list sorting"


#1 Updated by molyland almost 6 years ago

  • Assignee deleted (molyland)
  • % Done changed from 0 to 100

#2 Updated by ghost_1987 over 5 years ago

  • Status changed from New to Patch Pending

Please add this feature into official source tree for the next release

#3 Updated by spaam over 5 years ago

thats not a patch.. run svn diff and send us the output from that command.
svn diff > adding_external_js.patch or something.

#4 Updated by molyland over 5 years ago

This is the proposed patch for mod_dirlisting.c (changeset 2799)

#5 Updated by stbuehler over 5 years ago

Don't renumber the options.

#6 Updated by gstrauss about 1 year ago

  • Related to Feature #613: client-selectable directory list sorting, patch included added

#7 Updated by gstrauss 12 months ago

  • Status changed from Patch Pending to Need Feedback

A directive dir-listing.head-insert would be more generic. It would be similar to IndexHeadInsert from Apache 2.4 which inserts an configured string into head section.

I realize that your patch modeled off of dir-listing.external-css. The reason dir-listing.external-css can not be fold into a more generic dir-listing.head-insert is that if dir-listing.external-css is not specified, then mod_dirlisting provides a default CSS.

Note: this would only be enabled if = "enable" (which is the default)

(and when updating this patch, please also read the previous feedback instructing not to renumber the options)

#8 Updated by gstrauss 9 months ago

  • Status changed from Need Feedback to Patch Pending
  • Target version changed from 1.4.x to 1.4.42

#9 Updated by gstrauss 9 months ago

  • Status changed from Patch Pending to Fixed

Also available in: Atom