diff --git a/.gitignore b/.gitignore index 40bcedd9..206365b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,8 @@ # Build folders to ignore -bin build -target - build.local.* +release # Eclipse diff --git a/README.md b/README.md index 0f42c519..caac9efd 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,37 @@ * Website with download, docs and demo: * Sources: +* Q&A group: h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h5ai/blob/master/LICENSE.txt). -It uses the [Faenza icon set](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) (GPL license). + + +## h5ai profits from these great projects + +* [AmplifyJS](http://amplifyjs.com) (MIT/GPL) +* [Datejs](http://www.datejs.com) (MIT) +* [Faenza icon set](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) (GPL) +* [HTML5 ★ Boilerplate](http://html5boilerplate.com) +* [jQuery](http://jquery.com) (MIT/GPL) +* [jQuery.mousewheel](http://github.com/brandonaaron/jquery-mousewheel) (MIT) +* [modernizr](http://www.modernizr.com) (MIT/BSD) ## Changelog +### v0.16 · *2011-11-02* + +* sorts translations in `options.js` +* improves HTML head sections +* refactors JavaScript and PHP a lot +* improves/fixes file selection for zipped download +* fixes scrollbar and header/footer link issues (didn't work when zipped download enabled) +* adds support for ctrl-select +* `dateFormat` in `options.js` changed, now affecting JS and PHP version +* `dateFormat` is localizable by adding it to a translation in `options.js` +* PHP version is now configurable via `php/config.php` (set custom doc root and other PHP related things) +* image thumbs and zipped download is disabled by default now, but works fine if PHP is configured + ### v0.15.2 · *2011-09-18* diff --git a/build.properties b/build.properties index 1cf65d42..061dc895 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ custom = true # project project.name = h5ai -project.version = 0.15.2 +project.version = 0.16 # src @@ -16,5 +16,5 @@ release.dir = release # tools -wepp = tools/wepp +tool.wepp = tools/wepp diff --git a/release/h5ai-0.15.2.tar.gz b/release/h5ai-0.15.2.tar.gz deleted file mode 100644 index 8b4ee6b6..00000000 Binary files a/release/h5ai-0.15.2.tar.gz and /dev/null differ diff --git a/release/h5ai-0.15.2.zip b/release/h5ai-0.15.2.zip deleted file mode 100644 index ad8cfb94..00000000 Binary files a/release/h5ai-0.15.2.zip and /dev/null differ diff --git a/src/h5ai/css/inc/extended.less b/src/h5ai/css/inc/extended.less index 6aa5b6d0..a89a2c1b 100644 --- a/src/h5ai/css/inc/extended.less +++ b/src/h5ai/css/inc/extended.less @@ -45,7 +45,7 @@ background-color: #f6f6f6; color: #e80; } - &.selected { + &.selected:not(.selecting), &.selecting:not(.selected) { border-color: rgba(240,100,0,0.2); background-color: rgba(240,100,0,0.2); } @@ -193,7 +193,7 @@ border-color: #eee; background-color: #f6f6f6; } - &.selected { + &.selected:not(.selecting), &.selecting:not(.selected) { border-color: rgba(240,100,0,0.2); background-color: rgba(240,100,0,0.2); } diff --git a/src/h5ai/footer.html b/src/h5ai/footer.html index 3eacc917..07167e41 100644 --- a/src/h5ai/footer.html +++ b/src/h5ai/footer.html @@ -27,7 +27,7 @@ - + diff --git a/src/h5ai/header.html b/src/h5ai/header.html index 21278444..11cd52a7 100644 --- a/src/h5ai/header.html +++ b/src/h5ai/header.html @@ -1,16 +1,20 @@ - + + + + + Directory index · styled with h5ai - + - - - + + +
diff --git a/src/h5ai/header.php b/src/h5ai/header.php index a6987061..6e645106 100644 --- a/src/h5ai/header.php +++ b/src/h5ai/header.php @@ -1,17 +1,21 @@ - + + + + + <?php echo $h5ai->getTitle(); ?> - + - - - + + +
@@ -56,7 +60,7 @@ - +
diff --git a/src/h5ai/js/inc/tree.js b/src/h5ai/js/inc/Connector.js similarity index 80% rename from src/h5ai/js/inc/tree.js rename to src/h5ai/js/inc/Connector.js index db7a5883..ab644855 100644 --- a/src/h5ai/js/inc/tree.js +++ b/src/h5ai/js/inc/Connector.js @@ -1,14 +1,13 @@ +/*global $, H5aiJs */ -var Tree = function (pathCache, h5ai) { - "use strict"; - /*global $*/ +H5aiJs.factory.Connector = function () { var contentTypeRegEx = /^text\/html;h5ai=/, pathnameStatusCache = {}, fetchStatus = function (pathname, callback) { - if (h5ai.settings.folderStatus[pathname]) { - callback(h5ai.settings.folderStatus[pathname]); + if (H5aiJs.h5ai.settings.folderStatus[pathname]) { + callback(H5aiJs.h5ai.settings.folderStatus[pathname]); return; } else if (pathnameStatusCache[pathname]) { callback(pathnameStatusCache[pathname]); @@ -38,18 +37,16 @@ var Tree = function (pathCache, h5ai) { if (status !== "h5ai") { path.status = status; } - path.updateHtml(); - h5ai.linkHoverStates(); + H5aiJs.html.updateHtml(path); + H5aiJs.h5ai.linkHoverStates(); }); } }, updatePaths = function () { - var ref; - - for (ref in pathCache.cache) { - updatePath(pathCache.cache[ref]); - } + $.each(H5aiJs.pathCache.cache, function (ref, cached) { + updatePath(cached); + }); }, fetchStatusAndContent = function (pathname, includeParent, callback) { @@ -79,7 +76,7 @@ var Tree = function (pathCache, h5ai) { $(html).find("#table td").closest("tr").each(function () { - var path = pathCache.getPath(pathname, this); + var path = H5aiJs.pathCache.getPath(pathname, this); if (path.isFolder && (!path.isParentFolder || includeParent)) { content[path.absHref] = path; @@ -95,7 +92,7 @@ var Tree = function (pathCache, h5ai) { fetchStatusAndContent(pathname, false, function (status, content) { - var path = pathCache.getPath(pathname); + var path = H5aiJs.pathCache.getPath(pathname); path.status = status; path.content = content; @@ -106,7 +103,7 @@ var Tree = function (pathCache, h5ai) { fetchPath(pathname, function (path) { - var parent = pathCache.splitPathname(pathname)[0]; + var parent = H5aiJs.pathCache.splitPathname(pathname)[0]; path.treeOpen = true; if (childPath) { @@ -123,25 +120,24 @@ var Tree = function (pathCache, h5ai) { fetchTree(document.location.pathname, function (path) { $("#tree") - .append(path.updateTreeHtml()) + .append(H5aiJs.html.updateTreeHtml(path)) .scrollpanel() .show(); - h5ai.shiftTree(false, true); - h5ai.linkHoverStates(); + H5aiJs.h5ai.shiftTree(false, true); + H5aiJs.h5ai.linkHoverStates(); setTimeout(function () { $("#tree").get(0).updateScrollbar(); }, 1); }); }, init = function () { - if (h5ai.settings.showTree) { + if (H5aiJs.h5ai.settings.showTree) { updatePaths(); populateTree(); } - }, - tree = { - fetchStatusAndContent: fetchStatusAndContent, - init: init }; - return tree; + return { + fetchStatusAndContent: fetchStatusAndContent, + init: init + }; }; diff --git a/src/h5ai/js/inc/extended.js b/src/h5ai/js/inc/Extended.js similarity index 61% rename from src/h5ai/js/inc/extended.js rename to src/h5ai/js/inc/Extended.js index b4641193..03d46a4e 100644 --- a/src/h5ai/js/inc/extended.js +++ b/src/h5ai/js/inc/Extended.js @@ -1,7 +1,6 @@ +/*global $, H5aiJs */ -var Extended = function (pathCache, h5ai) { - "use strict"; - /*global $*/ +H5aiJs.factory.Extended = function () { var settings = { customHeader: "h5ai.header.html", @@ -16,21 +15,19 @@ var Extended = function (pathCache, h5ai) { }, initBreadcrumb = function () { - var idx, part, - $ul = $("body > nav ul"), + var $ul = $("body > nav ul"), pathname = "/", - path = pathCache.getPath(pathname), + path = H5aiJs.pathCache.getPath(pathname), pathnameParts = document.location.pathname.split("/"); - $ul.append(path.updateCrumbHtml()); + $ul.append(H5aiJs.html.updateCrumbHtml(path)); - for (idx in pathnameParts) { - part = pathnameParts[idx]; + $.each(pathnameParts, function (idx, part) { if (part !== "") { pathname += part + "/"; - $ul.append(pathCache.getPath(pathname).updateCrumbHtml()); + $ul.append(H5aiJs.html.updateCrumbHtml(H5aiJs.pathCache.getPath(pathname))); } - } + }); }, initExtendedView = function () { @@ -40,24 +37,24 @@ var Extended = function (pathCache, h5ai) { $size = $ths.eq(3).find("a"), sortquery = document.location.search, order = { - column: (sortquery.indexOf("C=N") >= 0) ? "name" : (sortquery.indexOf("C=M") >= 0) ? "date" : (sortquery.indexOf("C=S") >= 0) ? "size" : h5ai.settings.sortorder.column, - ascending: (sortquery.indexOf("O=A") >= 0) ? true : (sortquery.indexOf("O=D") >= 0) ? false : h5ai.settings.sortorder.ascending + column: (sortquery.indexOf("C=N") >= 0) ? "name" : (sortquery.indexOf("C=M") >= 0) ? "date" : (sortquery.indexOf("C=S") >= 0) ? "size" : H5aiJs.h5ai.settings.sortorder.column, + ascending: (sortquery.indexOf("O=A") >= 0) ? true : (sortquery.indexOf("O=D") >= 0) ? false : H5aiJs.h5ai.settings.sortorder.ascending }, $icon, $ul, $li; $ul = $("