From de92767e5af3f63ae16b09ceb7234db76795959b Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Tue, 17 Apr 2012 23:38:15 +0200 Subject: [PATCH] Adds support for tarred downloads. --- README.md | 2 + src/_h5ai/config.js | 19 ++-- src/_h5ai/header.html | 5 +- src/_h5ai/images/h5ai-16x16.png | Bin 409 -> 395 bytes src/_h5ai/images/h5ai-48x48.png | Bin 1550 -> 1516 bytes src/_h5ai/index.html | 7 +- .../ext/{zipped-download.js => download.js} | 28 +++--- src/_h5ai/js/inc/ext/filter.js | 4 +- src/_h5ai/js/inc/ext/l10n.js | 2 +- src/_h5ai/js/inc/ext/select.js | 2 +- src/_h5ai/js/inc/ext/sort.js | 2 +- src/_h5ai/js/inc/ext/tree.js | 2 +- src/_h5ai/js/inc/h5ai-info.js | 2 +- .../js/{ => inc/lib}/modernizr-2.5.3.min.js | 0 src/_h5ai/js/inc/main.js | 2 +- src/_h5ai/js/inc/parser/generic-json.js | 10 +- src/_h5ai/js/scripts.js | 24 +++-- src/_h5ai/php/api.php | 38 ++++---- src/_h5ai/php/inc/Archive.php | 77 +++++++++++++++ src/_h5ai/php/inc/H5ai.php | 2 +- src/_h5ai/php/inc/ZipIt.php | 89 ------------------ src/index.php | 5 +- 22 files changed, 160 insertions(+), 162 deletions(-) rename src/_h5ai/js/inc/ext/{zipped-download.js => download.js} (79%) rename src/_h5ai/js/{ => inc/lib}/modernizr-2.5.3.min.js (100%) create mode 100644 src/_h5ai/php/inc/Archive.php delete mode 100644 src/_h5ai/php/inc/ZipIt.php diff --git a/README.md b/README.md index f29cac09..cc9d9074 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,13 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h * hides broken tree view in IE < 9, adds a message to the footer * removes hash changes since they break logical browser history * fixes thumbnail size for portrait images in icon view +* fixes problems with file type recognition * adds an info page at `/_h5ai` * sort order is preserved while browsing * removes PHP error messages on thumbnail generation * fixes PHP problems with zipped download * changes crumb image for folders with an index file +* adds support for tarred downloads * adds `index.php` to use h5ai in non-Apache environments * switches from [Datejs](http://www.datejs.com) to [Moment.js](http://momentjs.com) * adds [underscore.js](http://underscorejs.org) diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js index fdb1f6af..54e2c479 100644 --- a/src/_h5ai/config.js +++ b/src/_h5ai/config.js @@ -68,6 +68,15 @@ var H5AI_CONFIG = { "footer": "_h5ai.footer.html" }, + /* + * Requires PHP on the server. + * Enable packaged download of selected entries. Supported formats: "tar", "zip". + */ + "download": { + "enabled": true, + "format": "zip" + }, + /* * Allow filtering the displayed files and folders. * Note: filters will be treated as JavaScript regular expressions @@ -181,14 +190,6 @@ var H5AI_CONFIG = { "tree": { "enabled": true, "slide": true - }, - - /* - * Requires PHP on the server. - * Enable zipped download of selected entries. - */ - "zipped-download": { - "enabled": true } }, @@ -355,7 +356,7 @@ var H5AI_CONFIG = { "folders": "Répertoires", "files": "Fichiers", "download": "télécharger", - "noMatch": "no match" + "noMatch": "rien trouvé" }, "gr": { diff --git a/src/_h5ai/header.html b/src/_h5ai/header.html index 674814af..47cccb92 100644 --- a/src/_h5ai/header.html +++ b/src/_h5ai/header.html @@ -13,7 +13,8 @@ - + +
@@ -31,8 +32,6 @@
- -