From 8670b248a95263d3f8834dd262813c4f70c2e315 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Tue, 27 Sep 2011 17:45:09 +0200 Subject: [PATCH] Refactorings. --- src/h5ai/footer.html | 2 + src/h5ai/header.php | 2 + src/h5ai/js/inc/extended.js | 23 +- src/h5ai/js/inc/h5ai.js | 135 ++- src/h5ai/js/inc/jquery.fracs.js | 871 ------------------ src/h5ai/js/inc/jquery.scrollpanel.js | 263 +++--- src/h5ai/js/inc/jquery.utils.js | 5 +- src/h5ai/js/inc/path.js | 28 +- src/h5ai/js/inc/tree.js | 13 +- src/h5ai/js/lib/jquery.fracs-core.min.js | 7 + .../js/{inc => lib}/jquery.mousewheel.min.js | 0 src/h5ai/js/main-js.js | 23 +- src/h5ai/js/main-php.js | 15 +- 13 files changed, 264 insertions(+), 1123 deletions(-) delete mode 100644 src/h5ai/js/inc/jquery.fracs.js create mode 100644 src/h5ai/js/lib/jquery.fracs-core.min.js rename src/h5ai/js/{inc => lib}/jquery.mousewheel.min.js (100%) diff --git a/src/h5ai/footer.html b/src/h5ai/footer.html index 3eacc917..1d81b3f8 100644 --- a/src/h5ai/footer.html +++ b/src/h5ai/footer.html @@ -28,6 +28,8 @@ + + diff --git a/src/h5ai/header.php b/src/h5ai/header.php index ff0f4050..79ec5817 100644 --- a/src/h5ai/header.php +++ b/src/h5ai/header.php @@ -61,6 +61,8 @@ + +
diff --git a/src/h5ai/js/inc/extended.js b/src/h5ai/js/inc/extended.js index b4641193..e741865d 100644 --- a/src/h5ai/js/inc/extended.js +++ b/src/h5ai/js/inc/extended.js @@ -1,7 +1,6 @@ +/*global $, Objects */ -var Extended = function (pathCache, h5ai) { - "use strict"; - /*global $*/ +Objects.Extended = function (pathCache, h5ai) { 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), pathnameParts = document.location.pathname.split("/"); $ul.append(path.updateCrumbHtml()); - for (idx in pathnameParts) { - part = pathnameParts[idx]; + $.each(pathnameParts, function (idx, part) { if (part !== "") { pathname += part + "/"; $ul.append(pathCache.getPath(pathname).updateCrumbHtml()); } - } + }); }, initExtendedView = function () { @@ -47,11 +44,11 @@ var Extended = function (pathCache, h5ai) { $ul = $("