Project

General

Profile

Feature #2315

dir-listing.external-js

Added by molyland about 6 years ago. Updated 11 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_dirlisting
Target version:
Start date:
2011-05-12
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:
No

Description

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 (25.9 KB) mod_dirlisting.c molyland, 2011-05-12 11:18
mod_dirlisting_patch.txt (5.83 KB) mod_dirlisting_patch.txt molyland, 2011-11-16 11:12

Related issues

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

Associated revisions

Revision cfa3d27f (diff)
Added by gstrauss 11 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
(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

History

#1 Updated by molyland about 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 about 1 year 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 dir-listing.auto-layout = "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 11 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 11 months ago

  • Status changed from Patch Pending to Fixed

Also available in: Atom