From d5994254525da47a5af80fe36b8638476eee2fb9 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Mon, 4 Jul 2011 16:26:35 +0200 Subject: [PATCH] Some comments and documentation. --- README.md | 8 +++++--- src/h5ai/options.js | 8 +++++++- target/h5ai/options.js | 10 ++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index be6c59e75..301df8323 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Everything you need is located in folder `target`. * Copy folder `h5ai` to the web-root directory of your server or alternativly set an alias `/h5ai/` to this folder. -* Add the content of file `dot.htaccess` to the `.htaccess` file inside the directory - you want to be styled (you might have to create this file). This directory and any subdirectories will be - styled by h5ai. +* Add the content of file `dot.htaccess` to the `.htaccess` file inside the directory you want to be + styled (you might have to create this file). This directory and any subdirectories will be styled by h5ai. +* Adjust `options.js` inside the `h5ai` folder to your needs. Defaults will be fine for a start. Optionally add `h5ai.header.html` and/or `h5ai.footer.html` files to any of the styled folders to [display custom top or bottom sections](http://larsjung.de/h5ai/sample/customize). The content of those files @@ -52,6 +52,8 @@ please respect their rights. * refactored js * added basic options support +* commented options.js +* optional tree sidebar ### v0.5.2 diff --git a/src/h5ai/options.js b/src/h5ai/options.js index de3d9dbfc..15475290f 100644 --- a/src/h5ai/options.js +++ b/src/h5ai/options.js @@ -21,7 +21,13 @@ h5aiOptions = { /* * Associative array of folders and their HTTP status codes to - * avoid HEAD requests to that folders. + * avoid HEAD requests to that folders. The key (folder) must start + * and end with a slash (/). + * For example: + * "/some/folder/": 200 + * will always return HTTP status 200 (OK), which will be interpreted + * as a non auto indexed folder, that means a folder containing an + * appropriate default index file. */ folderStatus: { /* diff --git a/target/h5ai/options.js b/target/h5ai/options.js index de3d9dbfc..cf0981e70 100644 --- a/target/h5ai/options.js +++ b/target/h5ai/options.js @@ -17,11 +17,17 @@ h5aiOptions = { * to the folders, and therefore will invoke index.php scripts. Use * folderStatus below to avoid such requests. */ - showTree: false, + showTree: true, /* * Associative array of folders and their HTTP status codes to - * avoid HEAD requests to that folders. + * avoid HEAD requests to that folders. The key (folder) must start + * and end with a slash (/). + * For example: + * "/some/folder/": 200 + * will always return HTTP status 200 (OK), which will be interpreted + * as a non auto indexed folder, that means a folder containing an + * appropriate default index file. */ folderStatus: { /*