From ebec62adac1aec4524a09d5037e5fdce992dcd9c Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Sat, 26 Nov 2011 20:53:51 +0100 Subject: [PATCH 1/3] Changes a lot... forgot to commit. --- README.md | 27 +- build.properties | 5 +- build.xml | 29 +- src/{h5ai => _h5ai}/.htaccess | 0 src/{h5ai => _h5ai}/cache/readme.md | 0 src/_h5ai/config.js | 411 ++++++++++++++++ src/{h5ai => _h5ai}/css/inc/extended.less | 25 +- src/_h5ai/css/inc/h5bp-norm.less | 295 +++++++++++ src/{h5ai => _h5ai}/css/inc/main.less | 39 +- src/{h5ai => _h5ai}/css/inc/mixins.less | 0 src/_h5ai/css/inc/responsive.less | 36 ++ src/{h5ai => _h5ai}/css/inc/table.less | 0 src/{h5ai => _h5ai}/css/inc/tree.less | 13 +- src/{h5ai => _h5ai}/css/main-js.less | 0 src/{h5ai => _h5ai}/css/main-php.less | 0 src/{h5ai => _h5ai}/footer.html | 12 +- src/{h5ai => _h5ai}/footer.php | 0 src/_h5ai/header.html | 31 ++ src/{h5ai => _h5ai}/header.php | 46 +- src/{h5ai => _h5ai}/icons/16x16/archive.png | Bin src/{h5ai => _h5ai}/icons/16x16/audio.png | Bin src/{h5ai => _h5ai}/icons/16x16/authors.png | Bin src/{h5ai => _h5ai}/icons/16x16/bin.png | Bin src/{h5ai => _h5ai}/icons/16x16/blank.png | Bin src/{h5ai => _h5ai}/icons/16x16/bmp.png | Bin src/{h5ai => _h5ai}/icons/16x16/c.png | Bin src/{h5ai => _h5ai}/icons/16x16/calc.png | Bin src/{h5ai => _h5ai}/icons/16x16/cd.png | Bin src/{h5ai => _h5ai}/icons/16x16/copying.png | Bin src/{h5ai => _h5ai}/icons/16x16/cpp.png | Bin src/{h5ai => _h5ai}/icons/16x16/css.png | Bin src/{h5ai => _h5ai}/icons/16x16/deb.png | Bin src/{h5ai => _h5ai}/icons/16x16/default.png | Bin src/{h5ai => _h5ai}/icons/16x16/doc.png | Bin src/{h5ai => _h5ai}/icons/16x16/draw.png | Bin src/{h5ai => _h5ai}/icons/16x16/eps.png | Bin src/{h5ai => _h5ai}/icons/16x16/exe.png | Bin src/_h5ai/icons/16x16/folder-home.png | Bin 0 -> 618 bytes src/_h5ai/icons/16x16/folder-open.png | Bin 0 -> 431 bytes src/_h5ai/icons/16x16/folder-page.png | Bin 0 -> 591 bytes .../icons/16x16/folder-parent.png | Bin src/_h5ai/icons/16x16/folder.png | Bin 0 -> 395 bytes src/{h5ai => _h5ai}/icons/16x16/gif.png | Bin src/{h5ai => _h5ai}/icons/16x16/gzip.png | Bin src/{h5ai => _h5ai}/icons/16x16/h.png | Bin src/{h5ai => _h5ai}/icons/16x16/hpp.png | Bin src/{h5ai => _h5ai}/icons/16x16/html.png | Bin src/{h5ai => _h5ai}/icons/16x16/ico.png | Bin src/{h5ai => _h5ai}/icons/16x16/image.png | Bin src/{h5ai => _h5ai}/icons/16x16/install.png | Bin src/{h5ai => _h5ai}/icons/16x16/java.png | Bin src/{h5ai => _h5ai}/icons/16x16/jpg.png | Bin src/{h5ai => _h5ai}/icons/16x16/js.png | Bin src/{h5ai => _h5ai}/icons/16x16/log.png | Bin src/{h5ai => _h5ai}/icons/16x16/makefile.png | Bin src/{h5ai => _h5ai}/icons/16x16/package.png | Bin src/{h5ai => _h5ai}/icons/16x16/pdf.png | Bin src/{h5ai => _h5ai}/icons/16x16/php.png | Bin src/{h5ai => _h5ai}/icons/16x16/playlist.png | Bin src/{h5ai => _h5ai}/icons/16x16/png.png | Bin src/{h5ai => _h5ai}/icons/16x16/pres.png | Bin src/{h5ai => _h5ai}/icons/16x16/psd.png | Bin src/{h5ai => _h5ai}/icons/16x16/py.png | Bin src/{h5ai => _h5ai}/icons/16x16/rar.png | Bin src/{h5ai => _h5ai}/icons/16x16/rb.png | Bin src/{h5ai => _h5ai}/icons/16x16/readme.png | Bin src/{h5ai => _h5ai}/icons/16x16/rpm.png | Bin src/{h5ai => _h5ai}/icons/16x16/rss.png | Bin src/{h5ai => _h5ai}/icons/16x16/rtf.png | Bin src/{h5ai => _h5ai}/icons/16x16/script.png | Bin src/{h5ai => _h5ai}/icons/16x16/source.png | Bin src/{h5ai => _h5ai}/icons/16x16/sql.png | Bin src/{h5ai => _h5ai}/icons/16x16/tar.png | Bin src/{h5ai => _h5ai}/icons/16x16/tex.png | Bin src/{h5ai => _h5ai}/icons/16x16/text.png | Bin src/{h5ai => _h5ai}/icons/16x16/tiff.png | Bin src/{h5ai => _h5ai}/icons/16x16/unknown.png | Bin src/{h5ai => _h5ai}/icons/16x16/vcal.png | Bin src/{h5ai => _h5ai}/icons/16x16/video.png | Bin src/{h5ai => _h5ai}/icons/16x16/xml.png | Bin src/{h5ai => _h5ai}/icons/16x16/zip.png | Bin src/{h5ai => _h5ai}/icons/48x48/archive.png | Bin src/{h5ai => _h5ai}/icons/48x48/audio.png | Bin src/{h5ai => _h5ai}/icons/48x48/authors.png | Bin src/{h5ai => _h5ai}/icons/48x48/bin.png | Bin src/{h5ai => _h5ai}/icons/48x48/blank.png | Bin src/{h5ai => _h5ai}/icons/48x48/bmp.png | Bin src/{h5ai => _h5ai}/icons/48x48/c.png | Bin src/{h5ai => _h5ai}/icons/48x48/calc.png | Bin src/{h5ai => _h5ai}/icons/48x48/cd.png | Bin src/{h5ai => _h5ai}/icons/48x48/copying.png | Bin src/{h5ai => _h5ai}/icons/48x48/cpp.png | Bin src/{h5ai => _h5ai}/icons/48x48/css.png | Bin src/{h5ai => _h5ai}/icons/48x48/deb.png | Bin src/{h5ai => _h5ai}/icons/48x48/default.png | Bin src/{h5ai => _h5ai}/icons/48x48/doc.png | Bin src/{h5ai => _h5ai}/icons/48x48/draw.png | Bin src/{h5ai => _h5ai}/icons/48x48/eps.png | Bin src/{h5ai => _h5ai}/icons/48x48/exe.png | Bin src/_h5ai/icons/48x48/folder-home.png | Bin 0 -> 2034 bytes src/_h5ai/icons/48x48/folder-open.png | Bin 0 -> 1577 bytes src/_h5ai/icons/48x48/folder-page.png | Bin 0 -> 2161 bytes .../icons/48x48/folder-parent.png | Bin src/_h5ai/icons/48x48/folder.png | Bin 0 -> 1516 bytes src/{h5ai => _h5ai}/icons/48x48/gif.png | Bin src/{h5ai => _h5ai}/icons/48x48/gzip.png | Bin src/{h5ai => _h5ai}/icons/48x48/h.png | Bin src/{h5ai => _h5ai}/icons/48x48/hpp.png | Bin src/{h5ai => _h5ai}/icons/48x48/html.png | Bin src/{h5ai => _h5ai}/icons/48x48/ico.png | Bin src/{h5ai => _h5ai}/icons/48x48/image.png | Bin src/{h5ai => _h5ai}/icons/48x48/install.png | Bin src/{h5ai => _h5ai}/icons/48x48/java.png | Bin src/{h5ai => _h5ai}/icons/48x48/jpg.png | Bin src/{h5ai => _h5ai}/icons/48x48/js.png | Bin src/{h5ai => _h5ai}/icons/48x48/log.png | Bin src/{h5ai => _h5ai}/icons/48x48/makefile.png | Bin src/{h5ai => _h5ai}/icons/48x48/package.png | Bin src/{h5ai => _h5ai}/icons/48x48/pdf.png | Bin src/{h5ai => _h5ai}/icons/48x48/php.png | Bin src/{h5ai => _h5ai}/icons/48x48/playlist.png | Bin src/{h5ai => _h5ai}/icons/48x48/png.png | Bin src/{h5ai => _h5ai}/icons/48x48/pres.png | Bin src/{h5ai => _h5ai}/icons/48x48/psd.png | Bin src/{h5ai => _h5ai}/icons/48x48/py.png | Bin src/{h5ai => _h5ai}/icons/48x48/rar.png | Bin src/{h5ai => _h5ai}/icons/48x48/rb.png | Bin src/{h5ai => _h5ai}/icons/48x48/readme.png | Bin src/{h5ai => _h5ai}/icons/48x48/rpm.png | Bin src/{h5ai => _h5ai}/icons/48x48/rss.png | Bin src/{h5ai => _h5ai}/icons/48x48/rtf.png | Bin src/{h5ai => _h5ai}/icons/48x48/script.png | Bin src/{h5ai => _h5ai}/icons/48x48/source.png | Bin src/{h5ai => _h5ai}/icons/48x48/sql.png | Bin src/{h5ai => _h5ai}/icons/48x48/tar.png | Bin src/{h5ai => _h5ai}/icons/48x48/tex.png | Bin src/{h5ai => _h5ai}/icons/48x48/text.png | Bin src/{h5ai => _h5ai}/icons/48x48/tiff.png | Bin src/{h5ai => _h5ai}/icons/48x48/unknown.png | Bin src/{h5ai => _h5ai}/icons/48x48/vcal.png | Bin src/{h5ai => _h5ai}/icons/48x48/video.png | Bin src/{h5ai => _h5ai}/icons/48x48/xml.png | Bin src/{h5ai => _h5ai}/icons/48x48/zip.png | Bin src/{h5ai => _h5ai}/images/ascending.png | Bin src/{h5ai => _h5ai}/images/blank.png | Bin src/{h5ai => _h5ai}/images/crumb.png | Bin src/{h5ai => _h5ai}/images/descending.png | Bin src/{h5ai => _h5ai}/images/download.png | Bin src/{h5ai => _h5ai}/images/h5ai-16x16.png | Bin src/{h5ai => _h5ai}/images/h5ai-48x48.png | Bin src/{h5ai => _h5ai}/images/home.png | Bin src/{h5ai => _h5ai}/images/loading.png | Bin src/{h5ai => _h5ai}/images/page.png | Bin src/{h5ai => _h5ai}/images/tree.png | Bin src/{h5ai => _h5ai}/images/view-details.png | Bin src/{h5ai => _h5ai}/images/view-icons.png | Bin src/_h5ai/js/inc/Connector.js | 115 +++++ src/_h5ai/js/inc/Core.js | 399 +++++++++++++++ src/_h5ai/js/inc/Extended.js | 127 +++++ src/_h5ai/js/inc/Html.js | 264 ++++++++++ src/_h5ai/js/inc/Path.js | 95 ++++ src/_h5ai/js/inc/Sort.js | 157 ++++++ src/_h5ai/js/inc/Util.js | 115 +++++ src/_h5ai/js/inc/ZippedDownload.js | 110 +++++ src/{h5ai => _h5ai}/js/inc/lib/amplify.min.js | 0 src/{h5ai => _h5ai}/js/inc/lib/date.js | 0 .../js/inc/lib/jquery.fracs-core.min.js | 0 src/_h5ai/js/inc/lib/jquery.min.js | 4 + src/_h5ai/js/inc/lib/jquery.mousewheel.js | 87 ++++ .../js/inc/lib/jquery.scrollpanel.js | 25 +- src/{h5ai => _h5ai}/js/libs.js | 2 +- src/_h5ai/js/main-js.js | 29 ++ src/_h5ai/js/main-php.js | 25 + src/{h5ai => _h5ai}/js/modernizr.min.js | 0 src/{h5ai => _h5ai}/php/api.php | 0 src/_h5ai/php/config.php | 27 + src/{h5ai => _h5ai}/php/inc/Cache.php | 0 src/{h5ai => _h5ai}/php/inc/Crumb.php | 2 +- src/{h5ai => _h5ai}/php/inc/Customize.php | 0 src/{h5ai => _h5ai}/php/inc/Extended.php | 102 +--- src/{h5ai => _h5ai}/php/inc/H5ai.php | 110 ++--- src/{h5ai => _h5ai}/php/inc/Image.php | 0 src/{h5ai => _h5ai}/php/inc/Thumbnail.php | 0 src/{h5ai => _h5ai}/php/inc/Tree.php | 0 src/{h5ai => _h5ai}/php/inc/ZipIt.php | 0 src/{h5ai => _h5ai}/php/main.php | 0 src/h5ai.htaccess | 26 + src/h5ai/css/inc/html5reset.less | 140 ------ src/h5ai/header.html | 42 -- src/h5ai/icons/16x16/folder-home.png | Bin 637 -> 0 bytes src/h5ai/icons/16x16/folder-open.png | Bin 441 -> 0 bytes src/h5ai/icons/16x16/folder-page.png | Bin 587 -> 0 bytes src/h5ai/icons/16x16/folder.png | Bin 409 -> 0 bytes src/h5ai/icons/48x48/folder-home.png | Bin 2033 -> 0 bytes src/h5ai/icons/48x48/folder-open.png | Bin 1551 -> 0 bytes src/h5ai/icons/48x48/folder-page.png | Bin 2186 -> 0 bytes src/h5ai/icons/48x48/folder.png | Bin 1550 -> 0 bytes src/h5ai/js/inc/Connector.js | 143 ------ src/h5ai/js/inc/Extended.js | 112 ----- src/h5ai/js/inc/H5ai.js | 461 ------------------ src/h5ai/js/inc/Html.js | 260 ---------- src/h5ai/js/inc/Path.js | 102 ---- src/h5ai/js/inc/PathCache.js | 56 --- src/h5ai/js/inc/lib/jquery.min.js | 18 - src/h5ai/js/inc/lib/jquery.mousewheel.min.js | 11 - src/h5ai/js/main-js.js | 37 -- src/h5ai/js/main-php.js | 28 -- src/h5ai/options.js | 333 ------------- src/h5ai/php/config.php | 15 - src/h5ai/types.txt | 63 --- src/js.htaccess | 114 ----- src/php.htaccess | 19 - 212 files changed, 2578 insertions(+), 2166 deletions(-) rename src/{h5ai => _h5ai}/.htaccess (100%) rename src/{h5ai => _h5ai}/cache/readme.md (100%) create mode 100644 src/_h5ai/config.js rename src/{h5ai => _h5ai}/css/inc/extended.less (92%) create mode 100644 src/_h5ai/css/inc/h5bp-norm.less rename src/{h5ai => _h5ai}/css/inc/main.less (84%) rename src/{h5ai => _h5ai}/css/inc/mixins.less (100%) create mode 100644 src/_h5ai/css/inc/responsive.less rename src/{h5ai => _h5ai}/css/inc/table.less (100%) rename src/{h5ai => _h5ai}/css/inc/tree.less (93%) rename src/{h5ai => _h5ai}/css/main-js.less (100%) rename src/{h5ai => _h5ai}/css/main-php.less (100%) rename src/{h5ai => _h5ai}/footer.html (74%) rename src/{h5ai => _h5ai}/footer.php (100%) create mode 100644 src/_h5ai/header.html rename src/{h5ai => _h5ai}/header.php (52%) rename src/{h5ai => _h5ai}/icons/16x16/archive.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/audio.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/authors.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/bin.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/blank.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/bmp.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/c.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/calc.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/cd.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/copying.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/cpp.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/css.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/deb.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/default.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/doc.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/draw.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/eps.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/exe.png (100%) create mode 100644 src/_h5ai/icons/16x16/folder-home.png create mode 100644 src/_h5ai/icons/16x16/folder-open.png create mode 100644 src/_h5ai/icons/16x16/folder-page.png rename src/{h5ai => _h5ai}/icons/16x16/folder-parent.png (100%) create mode 100644 src/_h5ai/icons/16x16/folder.png rename src/{h5ai => _h5ai}/icons/16x16/gif.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/gzip.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/h.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/hpp.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/html.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/ico.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/image.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/install.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/java.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/jpg.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/js.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/log.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/makefile.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/package.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/pdf.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/php.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/playlist.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/png.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/pres.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/psd.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/py.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/rar.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/rb.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/readme.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/rpm.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/rss.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/rtf.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/script.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/source.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/sql.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/tar.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/tex.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/text.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/tiff.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/unknown.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/vcal.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/video.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/xml.png (100%) rename src/{h5ai => _h5ai}/icons/16x16/zip.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/archive.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/audio.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/authors.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/bin.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/blank.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/bmp.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/c.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/calc.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/cd.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/copying.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/cpp.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/css.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/deb.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/default.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/doc.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/draw.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/eps.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/exe.png (100%) create mode 100644 src/_h5ai/icons/48x48/folder-home.png create mode 100644 src/_h5ai/icons/48x48/folder-open.png create mode 100644 src/_h5ai/icons/48x48/folder-page.png rename src/{h5ai => _h5ai}/icons/48x48/folder-parent.png (100%) create mode 100644 src/_h5ai/icons/48x48/folder.png rename src/{h5ai => _h5ai}/icons/48x48/gif.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/gzip.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/h.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/hpp.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/html.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/ico.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/image.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/install.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/java.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/jpg.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/js.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/log.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/makefile.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/package.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/pdf.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/php.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/playlist.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/png.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/pres.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/psd.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/py.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/rar.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/rb.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/readme.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/rpm.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/rss.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/rtf.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/script.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/source.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/sql.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/tar.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/tex.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/text.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/tiff.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/unknown.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/vcal.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/video.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/xml.png (100%) rename src/{h5ai => _h5ai}/icons/48x48/zip.png (100%) rename src/{h5ai => _h5ai}/images/ascending.png (100%) rename src/{h5ai => _h5ai}/images/blank.png (100%) rename src/{h5ai => _h5ai}/images/crumb.png (100%) rename src/{h5ai => _h5ai}/images/descending.png (100%) rename src/{h5ai => _h5ai}/images/download.png (100%) rename src/{h5ai => _h5ai}/images/h5ai-16x16.png (100%) rename src/{h5ai => _h5ai}/images/h5ai-48x48.png (100%) rename src/{h5ai => _h5ai}/images/home.png (100%) rename src/{h5ai => _h5ai}/images/loading.png (100%) rename src/{h5ai => _h5ai}/images/page.png (100%) rename src/{h5ai => _h5ai}/images/tree.png (100%) rename src/{h5ai => _h5ai}/images/view-details.png (100%) rename src/{h5ai => _h5ai}/images/view-icons.png (100%) create mode 100644 src/_h5ai/js/inc/Connector.js create mode 100644 src/_h5ai/js/inc/Core.js create mode 100644 src/_h5ai/js/inc/Extended.js create mode 100644 src/_h5ai/js/inc/Html.js create mode 100644 src/_h5ai/js/inc/Path.js create mode 100644 src/_h5ai/js/inc/Sort.js create mode 100644 src/_h5ai/js/inc/Util.js create mode 100644 src/_h5ai/js/inc/ZippedDownload.js rename src/{h5ai => _h5ai}/js/inc/lib/amplify.min.js (100%) rename src/{h5ai => _h5ai}/js/inc/lib/date.js (100%) rename src/{h5ai => _h5ai}/js/inc/lib/jquery.fracs-core.min.js (100%) create mode 100644 src/_h5ai/js/inc/lib/jquery.min.js create mode 100644 src/_h5ai/js/inc/lib/jquery.mousewheel.js rename src/{h5ai => _h5ai}/js/inc/lib/jquery.scrollpanel.js (92%) rename src/{h5ai => _h5ai}/js/libs.js (80%) create mode 100644 src/_h5ai/js/main-js.js create mode 100644 src/_h5ai/js/main-php.js rename src/{h5ai => _h5ai}/js/modernizr.min.js (100%) rename src/{h5ai => _h5ai}/php/api.php (100%) create mode 100644 src/_h5ai/php/config.php rename src/{h5ai => _h5ai}/php/inc/Cache.php (100%) rename src/{h5ai => _h5ai}/php/inc/Crumb.php (93%) rename src/{h5ai => _h5ai}/php/inc/Customize.php (100%) rename src/{h5ai => _h5ai}/php/inc/Extended.php (58%) rename src/{h5ai => _h5ai}/php/inc/H5ai.php (69%) rename src/{h5ai => _h5ai}/php/inc/Image.php (100%) rename src/{h5ai => _h5ai}/php/inc/Thumbnail.php (100%) rename src/{h5ai => _h5ai}/php/inc/Tree.php (100%) rename src/{h5ai => _h5ai}/php/inc/ZipIt.php (100%) rename src/{h5ai => _h5ai}/php/main.php (100%) create mode 100644 src/h5ai.htaccess delete mode 100644 src/h5ai/css/inc/html5reset.less delete mode 100644 src/h5ai/header.html delete mode 100644 src/h5ai/icons/16x16/folder-home.png delete mode 100644 src/h5ai/icons/16x16/folder-open.png delete mode 100644 src/h5ai/icons/16x16/folder-page.png delete mode 100644 src/h5ai/icons/16x16/folder.png delete mode 100644 src/h5ai/icons/48x48/folder-home.png delete mode 100644 src/h5ai/icons/48x48/folder-open.png delete mode 100644 src/h5ai/icons/48x48/folder-page.png delete mode 100644 src/h5ai/icons/48x48/folder.png delete mode 100644 src/h5ai/js/inc/Connector.js delete mode 100644 src/h5ai/js/inc/Extended.js delete mode 100644 src/h5ai/js/inc/H5ai.js delete mode 100644 src/h5ai/js/inc/Html.js delete mode 100644 src/h5ai/js/inc/Path.js delete mode 100644 src/h5ai/js/inc/PathCache.js delete mode 100644 src/h5ai/js/inc/lib/jquery.min.js delete mode 100644 src/h5ai/js/inc/lib/jquery.mousewheel.min.js delete mode 100644 src/h5ai/js/main-js.js delete mode 100644 src/h5ai/js/main-php.js delete mode 100644 src/h5ai/options.js delete mode 100644 src/h5ai/php/config.php delete mode 100644 src/h5ai/types.txt delete mode 100644 src/js.htaccess delete mode 100644 src/php.htaccess diff --git a/README.md b/README.md index caac9efd..5a5e2d69 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,17 @@ # h5ai +Don't use files from this repository (`src` folder) for installation. +They need to be preprocessed/compiled to work correctly. You'll find a +precompiled package on the [project page](http://larsjung.de/h5ai). + +Please create [a new issue](http://github.com/lrsjng/h5ai/issues/new) +to report a bug or make a feature request. + * 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). +h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h5ai/blob/master/LICENSE.txt). ## h5ai profits from these great projects @@ -20,6 +27,22 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h ## Changelog +### v0.17 · *2011-11-??* + +* h5ai is now located in `_h5ai` to reduce collisions +* switches from HTML5 Boilerplate reset to normalization +* adds some style changes for small devices +* configuration (options, types, translations) now via `config.js` +* icons for JS version are now configured via `config.js` +* sort order configuration changed +* sorting is now done without page reload +* adds `customHeader` and `customFooter` to `config.js` +* supports restricted folders to some extent +* some style changes on tree and language menu +* fixes total file/folder count in status bar +* adds support for use with userdir (requires some manual changes) + + ### v0.16 · *2011-11-02* * sorts translations in `options.js` @@ -153,7 +176,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h * removed slashes from folder labels * optionally rename parent folder entries to real folder names, see `options.js` -* long breadcrumbs (multiple rows) no longer hide content +* long breadcrumbs (multiple rows) no longer hide content * error folder icons are opaque now * refactored js a lot (again...) diff --git a/build.properties b/build.properties index 061dc895..93189df2 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ custom = true # project project.name = h5ai -project.version = 0.16 +project.version = 0.17 # src @@ -17,4 +17,7 @@ release.dir = release # tools tool.wepp = tools/wepp +tool.jslint = jslint +tool.jshint = jshint +tool.jsxint.file = ${build.dir}/_h5ai/js/main-js.js diff --git a/build.xml b/build.xml index ef91dcc0..864063e9 100644 --- a/build.xml +++ b/build.xml @@ -37,13 +37,13 @@ - - + + - - + + @@ -54,4 +54,25 @@ + + + + + + JSLint "${tool.jsxint.file}" + + + + + + + JSHint "${tool.jsxint.file}" + + + + + + + + diff --git a/src/h5ai/.htaccess b/src/_h5ai/.htaccess similarity index 100% rename from src/h5ai/.htaccess rename to src/_h5ai/.htaccess diff --git a/src/h5ai/cache/readme.md b/src/_h5ai/cache/readme.md similarity index 100% rename from src/h5ai/cache/readme.md rename to src/_h5ai/cache/readme.md diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js new file mode 100644 index 00000000..595b0c5a --- /dev/null +++ b/src/_h5ai/config.js @@ -0,0 +1,411 @@ +/* + * h5ai %BUILD_VERSION% + * + * Configuration + * options, types and localization + */ + +H5AI_CONFIG = { + + "options": { + + /* + * The absolute links to webroot and h5ai. + * Do not change this unless you know what you are doing. + */ + "rootAbsHref": "/", + "h5aiAbsHref": "/_h5ai/", + + /* + * Filenames of customized header and footer files to look for + * in each folder. + */ + "customHeader": "_h5ai.header.html", + "customFooter": "_h5ai.footer.html", + + /* + * An array of view modes the user may choose from. Currently there + * are two possible values: "details" and "icons". The first value + * indicates the default view mode. If only one value is given the + * view mode is fixed and the selector buttons are hidden. + * The user selected view mode is also stored local in modern browsers + * so that it will be persistent. + */ + "viewmodes": ["details", "icons"], + + /* + * Default sort order is a two letter code. The first letter specifies + * the column: "n" for "Name", "d" for "Date" or "s" for "Size". The + * second letter specifies the sort order: "a" for "ascending" or "d" + * for "descending". + */ + "sortorder": "na", + + /* + * Show a folder tree, boolean. + * Note that this tree might have side effects as it sends HEAD requests + * to the folders, and therefore will invoke index.php scripts. Use + * folderStatus below to avoid such requests. + * It might also affect performance significantly. + */ + "showTree": true, + + /* + * Slide tree bar into viewport if there is enough space, boolean. + */ + "slideTree": true, + + /* + * Associative array of folders and their HTTP status codes to + * 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": {}, + + /* + * Localization, for example "en", "de" etc. - see h5aiLangs below for + * possible values. Adjust it to your needs. If lang is not found in + * h5aiLangs it defaults to "en". + */ + "lang": "en", + + /* + * Try to use browser language, falls back to previous specified lang. + */ + "useBrowserLang": true, + + /* + * Set parent folder labels to real folder names. + */ + "setParentFolderLabels": true, + + /* + * Link the hover effects between crumb, extended view and tree. + */ + "linkHoverStates": true, + + /* + * Date format in detailed view, for example: "yyyy-MM-dd HH:mm:ss" + * Syntax as specified by date.js + * http://code.google.com/p/datejs/wiki/FormatSpecifiers + */ + "dateFormat": "yyyy-MM-dd HH:mm", + + /* + * Requires PHP on the server. + * Show thumbnails for image files. + */ + "showThumbs": true, + + /* + * Requires PHP on the server. + * Enable zipped download of selected entries. + */ + "zippedDownload": true + }, + + + /* + * File types mapped to file extensions. + */ + "types": { + "archive": [".tar.bz2", ".tar.gz", ".tgz"], + "audio": [".aif", ".m4a", ".mid", ".mp3", ".mpa", ".ra", ".ogg", ".wav", ".wma"], + "authors": ["authors"], + "bin": [".class", ".o", ".so"], + "blank": [], + "bmp": [".bmp"], + "c": [".c"], + "calc": [".ods", ".ots", ".xlr", ".xls", ".xlsx"], + "cd": [".cue", ".iso"], + "copying": ["copying", "license"], + "cpp": [".cpp"], + "css": [".css", ".less"], + "deb": [".deb"], + "default": [], + "doc": [".doc", ".docx", ".odm", ".odt", ".ott"], + "draw": [".drw"], + "eps": [".eps"], + "exe": [".exe"], + "folder": [], + "folder-home": [], + "folder-open": [], + "folder-page": [], + "folder-parent": [], + "gif": [".gif"], + "gzip": [".gz"], + "h": [".h"], + "hpp": [".hpp"], + "html": [".htm", ".html", ".shtml"], + "ico": [".ico"], + "image": [".xpm"], + "install": ["install"], + "java": [".java"], + "jpg": [".jpg", ".jpeg"], + "js": [".js", ".json"], + "log": [".log", "changelog"], + "makefile": [".pom", "build.xml", "pom.xml"], + "package": [], + "pdf": [".pdf"], + "php": [".php"], + "playlist": [".m3u"], + "png": [".png"], + "pres": [".odp", ".otp", ".pps", ".ppt", ".pptx"], + "psd": [".psd"], + "py": [".py"], + "rar": [".rar"], + "rb": [".rb"], + "readme": ["readme"], + "rpm": [".rpm"], + "rss": [".rss"], + "rtf": [".rtf"], + "script": [".conf", ".csh", ".ini", ".ksh", ".sh", ".shar", ".tcl"], + "source": [], + "sql": [], + "tar": [".tar"], + "tex": [".tex"], + "text": [".markdown", ".md", ".text", ".txt"], + "tiff": [".tiff"], + "unknown": [], + "vcal": [".vcal"], + "video": [".avi", ".flv", ".mov", ".mp4", ".mpg", ".rm", ".swf", ".vob", ".wmv"], + "xml": [".xml"], + "zip": [".bz2", ".jar", ".war", ".z", ".Z", ".zip"] + }, + + + /* + * Available translations. + */ + "langs": { + + "en": { + "lang": "english", + "details": "details", + "icons": "icons", + "name": "Name", + "lastModified": "Last modified", + "size": "Size", + "parentDirectory": "Parent Directory", + "empty": "empty", + "folders": "folders", + "files": "files", + "download": "download" + }, + + "bg": { + "lang": "български", + "details": "детайли", + "icons": "икони", + "name": "Име", + "lastModified": "Последна промяна", + "size": "Размер", + "parentDirectory": "Предходна директория", + "empty": "празно", + "folders": "папки", + "files": "файлове", + "download": "download" + }, + + "cs": { + "lang": "čeština", + "details": "podrobnosti", + "icons": "ikony", + "name": "Název", + "lastModified": "Upraveno", + "size": "Velikost", + "parentDirectory": "Nadřazený adresář", + "empty": "prázdný", + "folders": "složek", + "files": "souborů", + "download": "download" + }, + + "de": { + "lang": "deutsch", + "details": "Details", + "icons": "Icons", + "name": "Name", + "lastModified": "Geändert", + "size": "Größe", + "parentDirectory": "Übergeordnetes Verzeichnis", + "empty": "leer", + "folders": "Ordner", + "files": "Dateien", + "download": "Download" + }, + + "es": { + "lang": "español", + "details": "Detalles", + "icons": "Íconos", + "name": "Nombre", + "lastModified": "Última modificación", + "size": "Tamaño", + "parentDirectory": "Directorio superior", + "empty": "vacío", + "folders": "folders", + "files": "files", + "download": "download" + }, + + "fr": { + "lang": "français", + "details": "détails", + "icons": "icônes", + "name": "Nom", + "lastModified": "Dernière modification", + "size": "Taille", + "parentDirectory": "Dossier parent", + "empty": "vide", + "folders": "Répertoires", + "files": "Fichiers", + "download": "télécharger" + }, + + "it": { + "lang": "italiano", + "details": "dettagli", + "icons": "icone", + "name": "Nome", + "lastModified": "Ultima modifica", + "size": "Dimensione", + "parentDirectory": "Cartella Superiore", + "empty": "vuota", + "folders": "cartelle", + "files": "file", + "download": "download" + }, + + "lv": { + "lang": "latviešu", + "details": "detaļas", + "icons": "ikonas", + "name": "Nosaukums", + "lastModified": "Pēdējoreiz modificēts", + "size": "Izmērs", + "parentDirectory": "Vecākdirektorijs", + "empty": "tukšs", + "folders": "mapes", + "files": "faili", + "download": "lejupielādēt" + }, + + "nl": { + "lang": "nederlands", + "details": "details", + "icons": "iconen", + "name": "Naam", + "lastModified": "Laatste wijziging", + "size": "Grootte", + "parentDirectory": "Bovenliggende map", + "empty": "lege", + "folders": "folders", + "files": "files", + "download": "download" + }, + + "pl": { + "lang": "polski", + "details": "szczegóły", + "icons": "ikony", + "name": "Nazwa", + "lastModified": "Ostatnia modyfikacja", + "size": "Rozmiar", + "parentDirectory": "Katalog nadrzędny", + "empty": "pusty", + "folders": "foldery", + "files": "pliki", + "download": "download" + }, + + "pt": { + "lang": "português", + "details": "detalhes", + "icons": "ícones", + "name": "Nome", + "lastModified": "Última modificação", + "size": "Tamanho", + "parentDirectory": "Diretório superior", + "empty": "vazio", + "folders": "pastas", + "files": "arquivos", + "download": "download" + }, + + "ru": { + "lang": "русский", + "details": "детали", + "icons": "иконки", + "name": "Имя", + "lastModified": "Последние изменения", + "size": "Размер", + "parentDirectory": "Главная директория", + "empty": "пусто", + "folders": "папки", + "files": "файлы", + "download": "download" + }, + + "sk": { + "lang": "slovenčina", + "details": "podrobnosti", + "icons": "ikony", + "name": "Názov", + "lastModified": "Upravené", + "size": "Velkosť", + "parentDirectory": "Nadriadený priečinok", + "empty": "prázdny", + "folders": "priečinkov", + "files": "súborov", + "download": "download" + }, + + "sv": { + "lang": "svenska", + "details": "detaljerad", + "icons": "ikoner", + "name": "Filnamn", + "lastModified": "Senast ändrad", + "size": "Filstorlek", + "parentDirectory": "Till överordnad mapp", + "empty": "tom", + "folders": "folders", + "files": "files", + "download": "download" + }, + + "tr": { + "lang": "türkçe", + "details": "detaylar", + "icons": "ikonlar", + "name": "İsim", + "lastModified": "Son Düzenleme", + "size": "Boyut", + "parentDirectory": "Üst Dizin", + "empty": "boş", + "folders": "klasörler", + "files": "dosyalar", + "download": "indir" + }, + + "zh-cn": { + "lang": "简体中文", + "details": "详情", + "icons": "图标", + "name": "文件名", + "lastModified": "上次修改", + "size": "大小", + "parentDirectory": "上层文件夹", + "empty": "空文件夹", + "folders": "文件夹", + "files": "文件", + "download": "download" + } + } +}; diff --git a/src/h5ai/css/inc/extended.less b/src/_h5ai/css/inc/extended.less similarity index 92% rename from src/h5ai/css/inc/extended.less rename to src/_h5ai/css/inc/extended.less index a89a2c1b..7eaa140d 100644 --- a/src/h5ai/css/inc/extended.less +++ b/src/_h5ai/css/inc/extended.less @@ -21,14 +21,23 @@ cursor: pointer; .transition(all 0.2s ease-in-out); + img.ascending, img.descending { + position: relative; + top: -2px; + display: none; + width: 12px; + height: 12px; + padding: 0 8px; + } &:hover { color: #555; opacity: 0.9; } - img { - width: 12px; - height: 12px; - padding: 0 8px; + &.ascending img.ascending { + display: inline; + } + &.descending img.descending { + display: inline; } } } @@ -86,12 +95,15 @@ display: inline-block; position: absolute; left: 0; - top: 2px; + top: -2px; width: 16px; img { width: 16px; height: 16px; + &.thumb { + border: 1px solid #eee; + } } } .icon.big { @@ -204,6 +216,9 @@ min-width: 48px; min-height: 48px; margin-bottom: 8px; + &.thumb { + border: 1px solid #eee; + } } } .icon.small { diff --git a/src/_h5ai/css/inc/h5bp-norm.less b/src/_h5ai/css/inc/h5bp-norm.less new file mode 100644 index 00000000..5f8ff766 --- /dev/null +++ b/src/_h5ai/css/inc/h5bp-norm.less @@ -0,0 +1,295 @@ +/* + * HTML5 ✰ Boilerplate + * + * What follows is the result of much research on cross-browser styling. + * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, + * Kroc Camen, and the H5BP dev community and team. + * + * Detailed information about this CSS: h5bp.com/css + * + * ==|== normalize ========================================================== + */ + + +/* ============================================================================= + HTML5 display definitions + ========================================================================== */ + +article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } +audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } +audio:not([controls]) { display: none; } +[hidden] { display: none; } + + +/* ============================================================================= + Base + ========================================================================== */ + +/* + * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units + * 2. Force vertical scrollbar in non-IE + * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g + */ + +//html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } +html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } + +body { margin: 0; font-size: 13px; line-height: 1.231; } + +body, button, input, select, textarea { font-family: sans-serif; color: #222; } + +/* + * Remove text-shadow in selection highlight: h5bp.com/i + * These selection declarations have to be separate + * Also: hot pink! (or customize the background color to match your design) + */ + +::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; } +::selection { background: #fe57a1; color: #fff; text-shadow: none; } + + +/* ============================================================================= + Links + ========================================================================== */ + +a { color: #00e; } +a:visited { color: #551a8b; } +a:hover { color: #06e; } +a:focus { outline: thin dotted; } + +/* Improve readability when focused and hovered in all browsers: h5bp.com/h */ +a:hover, a:active { outline: 0; } + + +/* ============================================================================= + Typography + ========================================================================== */ + +abbr[title] { border-bottom: 1px dotted; } + +b, strong { font-weight: bold; } + +blockquote { margin: 1em 40px; } + +dfn { font-style: italic; } + +hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } + +ins { background: #ff9; color: #000; text-decoration: none; } + +mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } + +/* Redeclare monospace font family: h5bp.com/j */ +pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; } + +/* Improve readability of pre-formatted text in all browsers */ +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } + +q { quotes: none; } +q:before, q:after { content: ""; content: none; } + +small { font-size: 85%; } + +/* Position subscript and superscript content without affecting line-height: h5bp.com/k */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } +sup { top: -0.5em; } +sub { bottom: -0.25em; } + + +/* ============================================================================= + Lists + ========================================================================== */ + +ul, ol { margin: 1em 0; padding: 0 0 0 40px; } +dd { margin: 0 0 0 40px; } +nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } + + +/* ============================================================================= + Embedded content + ========================================================================== */ + +/* + * 1. Improve image quality when scaled in IE7: h5bp.com/d + * 2. Remove the gap between images and borders on image containers: h5bp.com/e + */ + +img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } + +/* + * Correct overflow not hidden in IE9 + */ + +svg:not(:root) { overflow: hidden; } + + +/* ============================================================================= + Figures + ========================================================================== */ + +figure { margin: 0; } + + +/* ============================================================================= + Forms + ========================================================================== */ + +form { margin: 0; } +fieldset { border: 0; margin: 0; padding: 0; } + +/* Indicate that 'label' will shift focus to the associated form element */ +label { cursor: pointer; } + +/* + * 1. Correct color not inheriting in IE6/7/8/9 + * 2. Correct alignment displayed oddly in IE6/7 + */ + +legend { border: 0; *margin-left: -7px; padding: 0; } + +/* + * 1. Correct font-size not inheriting in all browsers + * 2. Remove margins in FF3/4 S5 Chrome + * 3. Define consistent vertical alignment display in all browsers + */ + +button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } + +/* + * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet) + * 2. Correct inner spacing displayed oddly in IE6/7 + */ + +button, input { line-height: normal; *overflow: visible; } + +/* + * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7 + */ + +table button, table input { *overflow: auto; } + +/* + * 1. Display hand cursor for clickable form elements + * 2. Allow styling of clickable form elements in iOS + */ + +button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } + +/* + * Consistent box sizing and appearance + */ + +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; } +input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } +input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/* + * Remove inner padding and border in FF3/4: h5bp.com/l + */ + +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/* + * 1. Remove default vertical scrollbar in IE6/7/8/9 + * 2. Allow only vertical resizing + */ + +textarea { overflow: auto; vertical-align: top; resize: vertical; } + +/* Colors for form validity */ +input:valid, textarea:valid { } +input:invalid, textarea:invalid { background-color: #f0dddd; } + + +/* ============================================================================= + Tables + ========================================================================== */ + +table { border-collapse: collapse; border-spacing: 0; } +td { vertical-align: top; } + + +/* ==|== primary styles ===================================================== + Author: + ========================================================================== */ + + + + + + + + + + + + + + + + +/* ==|== non-semantic helper classes ======================================== + Please define your styles before this section. + ========================================================================== */ + +/* For image replacement */ +.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } +.ir br { display: none; } + +/* Hide from both screenreaders and browsers: h5bp.com/u */ +.hidden { display: none !important; visibility: hidden; } + +/* Hide only visually, but have it available for screenreaders: h5bp.com/v */ +.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } + +/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */ +.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } + +/* Hide visually and from screenreaders, but maintain layout */ +.invisible { visibility: hidden; } + +/* Contain floats: h5bp.com/q */ +.clearfix:before, .clearfix:after { content: ""; display: table; } +.clearfix:after { clear: both; } +.clearfix { zoom: 1; } + + + +/* ==|== media queries ====================================================== + PLACEHOLDER Media Queries for Responsive Design. + These override the primary ('mobile first') styles + Modify as content requires. + ========================================================================== */ + +@media only screen and (min-width: 480px) { + /* Style adjustments for viewports 480px and over go here */ + +} + +@media only screen and (min-width: 768px) { + /* Style adjustments for viewports 768px and over go here */ + +} + + + +/* ==|== print styles ======================================================= + Print styles. + Inlined to avoid required HTTP connection: h5bp.com/r + ========================================================================== */ + +@media print { + * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */ + a, a:visited { text-decoration: underline; } + a[href]:after { content: " (" attr(href) ")"; } + abbr[title]:after { content: " (" attr(title) ")"; } + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */ + pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } + thead { display: table-header-group; } /* h5bp.com/t */ + tr, img { page-break-inside: avoid; } + img { max-width: 100% !important; } + @page { margin: 0.5cm; } + p, h2, h3 { orphans: 3; widows: 3; } + h2, h3 { page-break-after: avoid; } +} + diff --git a/src/h5ai/css/inc/main.less b/src/_h5ai/css/inc/main.less similarity index 84% rename from src/h5ai/css/inc/main.less rename to src/_h5ai/css/inc/main.less index add0d0f3..d1228985 100644 --- a/src/h5ai/css/inc/main.less +++ b/src/_h5ai/css/inc/main.less @@ -1,5 +1,5 @@ -@import "html5reset"; +@import "h5bp-norm"; @import "mixins"; @@ -19,10 +19,12 @@ body { font-family: Ubuntu, sans-serif; font-size: 16px; color: #555; + background-color: #fff; margin: 80px 30px; } + body > nav { position: fixed; z-index: 1; @@ -63,10 +65,13 @@ body > nav { opacity: 1.0; } img { + position: relative; + top: -2px; width: 16px; height: 16px; - vertical-align: bottom; - padding: 0 6px 6px 0; + } + img + span { + margin-left: 6px; } .crumb { float: left; @@ -79,8 +84,6 @@ body > nav { img.hint { width: 10px; height: 10px; - vertical-align: baseline; - padding: 0px; } } .view { @@ -151,13 +154,17 @@ body > footer { } .center { display: block; - margin: 0 300px; + margin: 0 100px; } .right { display: block; padding: 0 8px; float: right } + .noJsMsg { + color: #c33; + margin-left: 16px; + } .status { .sep { display: inline-block; @@ -176,12 +183,27 @@ body > footer { .langOptions { position: absolute; z-index: 2; + overflow: auto; display: none; right: 0; top: 0; + max-height: 200px; background-color: rgb(241,241,241); border: 1px solid rgb(210,210,210); + > .scrollbar { + margin: 0; + width: 6px; + background-color: rgb(210,210,210); + + .drag { + background-color: rgb(180,180,180); + } + &.dragOn .drag { + background-color: rgb(150,150,150); + } + } + ul { margin: 0; padding: 0; @@ -203,8 +225,13 @@ body > footer { background-color: rgba(255,255,255,0.8); } } + li:nth-child(3n+1) { + + } } } } } +@import "responsive"; + diff --git a/src/h5ai/css/inc/mixins.less b/src/_h5ai/css/inc/mixins.less similarity index 100% rename from src/h5ai/css/inc/mixins.less rename to src/_h5ai/css/inc/mixins.less diff --git a/src/_h5ai/css/inc/responsive.less b/src/_h5ai/css/inc/responsive.less new file mode 100644 index 00000000..7b38e320 --- /dev/null +++ b/src/_h5ai/css/inc/responsive.less @@ -0,0 +1,36 @@ +@media only screen and (max-width: 500px) { +body > nav { + .view span { + display: none; + } +} +#extended.icons-view { + padding: 0; + border: none; + margin: 0 -14px; +} +} + +@media only screen and (max-width: 350px) { +body > nav { + .crumb { + display: none; + } + .current { + display: block; + } +} +#extended.details-view { + .header .label, .entry .label { + margin-right: 110px; + } + .header .date, .entry .date { + display: none; + } +} +body > footer { + .center { + display: none; + } +} +} diff --git a/src/h5ai/css/inc/table.less b/src/_h5ai/css/inc/table.less similarity index 100% rename from src/h5ai/css/inc/table.less rename to src/_h5ai/css/inc/table.less diff --git a/src/h5ai/css/inc/tree.less b/src/_h5ai/css/inc/tree.less similarity index 93% rename from src/h5ai/css/inc/tree.less rename to src/_h5ai/css/inc/tree.less index a9a22215..b35b488f 100644 --- a/src/h5ai/css/inc/tree.less +++ b/src/_h5ai/css/inc/tree.less @@ -7,14 +7,14 @@ z-index: 1; overflow: auto; font-size: 0.85em; - padding: 16px 16px 16px 16px; + padding: 8px; background-color: rgb(241,241,241); - border: 2px solid rgb(210,210,210); + border: 1px solid rgb(210,210,210); border-left: none; - .border-radius (0 15px 15px 0); + .border-radius(0 10px 10px 0); > .scrollbar { - margin: 12px 12px 12px 0; + margin: 8px 8px 8px 0; width: 6px; background-color: rgb(210,210,210); .border-radius(3px); @@ -121,9 +121,10 @@ color: #c55; } } - .content { + .content, ul.content { list-style: none; - margin-left: 20px; + margin: 0; + padding: 0 0 0 24px; } } } diff --git a/src/h5ai/css/main-js.less b/src/_h5ai/css/main-js.less similarity index 100% rename from src/h5ai/css/main-js.less rename to src/_h5ai/css/main-js.less diff --git a/src/h5ai/css/main-php.less b/src/_h5ai/css/main-php.less similarity index 100% rename from src/h5ai/css/main-php.less rename to src/_h5ai/css/main-php.less diff --git a/src/h5ai/footer.html b/src/_h5ai/footer.html similarity index 74% rename from src/h5ai/footer.html rename to src/_h5ai/footer.html index 07167e41..2a2a0e40 100644 --- a/src/h5ai/footer.html +++ b/src/_h5ai/footer.html @@ -7,9 +7,9 @@
h5ai %BUILD_VERSION% (js) + ⚡ JavaScript is disabled! ⚡ - JavaScript is disabled! en - english @@ -18,17 +18,17 @@ - folders + folders · - files + files
- - - + + + \ No newline at end of file diff --git a/src/h5ai/footer.php b/src/_h5ai/footer.php similarity index 100% rename from src/h5ai/footer.php rename to src/_h5ai/footer.php diff --git a/src/_h5ai/header.html b/src/_h5ai/header.html new file mode 100644 index 00000000..70aa9621 --- /dev/null +++ b/src/_h5ai/header.html @@ -0,0 +1,31 @@ + + + + + + + + + Directory index · styled with h5ai + + + + + + + + + + +
+ +
+
+
+ diff --git a/src/h5ai/header.php b/src/_h5ai/header.php similarity index 52% rename from src/h5ai/header.php rename to src/_h5ai/header.php index 6e645106..75d1e7b5 100644 --- a/src/h5ai/header.php +++ b/src/_h5ai/header.php @@ -11,26 +11,17 @@ - - + + - - + +
toHtml(); ?> @@ -38,30 +29,35 @@ getHeader(); ?> toHtml(); ?> getFooter(); ?> + getDocRoot() . "
"; ?> + getH5aiRoot() . "
"; ?> + getHrefRoot() . "
"; ?>
h5ai %BUILD_VERSION% (php) + ⚡ JavaScript is disabled! ⚡ - JavaScript is disabled! en - english - - getFolderCount(); ?> folders - · - getFileCount(); ?> files - - + + + folders + · + files + + +
- - - + + +
- + diff --git a/src/h5ai/icons/16x16/archive.png b/src/_h5ai/icons/16x16/archive.png similarity index 100% rename from src/h5ai/icons/16x16/archive.png rename to src/_h5ai/icons/16x16/archive.png diff --git a/src/h5ai/icons/16x16/audio.png b/src/_h5ai/icons/16x16/audio.png similarity index 100% rename from src/h5ai/icons/16x16/audio.png rename to src/_h5ai/icons/16x16/audio.png diff --git a/src/h5ai/icons/16x16/authors.png b/src/_h5ai/icons/16x16/authors.png similarity index 100% rename from src/h5ai/icons/16x16/authors.png rename to src/_h5ai/icons/16x16/authors.png diff --git a/src/h5ai/icons/16x16/bin.png b/src/_h5ai/icons/16x16/bin.png similarity index 100% rename from src/h5ai/icons/16x16/bin.png rename to src/_h5ai/icons/16x16/bin.png diff --git a/src/h5ai/icons/16x16/blank.png b/src/_h5ai/icons/16x16/blank.png similarity index 100% rename from src/h5ai/icons/16x16/blank.png rename to src/_h5ai/icons/16x16/blank.png diff --git a/src/h5ai/icons/16x16/bmp.png b/src/_h5ai/icons/16x16/bmp.png similarity index 100% rename from src/h5ai/icons/16x16/bmp.png rename to src/_h5ai/icons/16x16/bmp.png diff --git a/src/h5ai/icons/16x16/c.png b/src/_h5ai/icons/16x16/c.png similarity index 100% rename from src/h5ai/icons/16x16/c.png rename to src/_h5ai/icons/16x16/c.png diff --git a/src/h5ai/icons/16x16/calc.png b/src/_h5ai/icons/16x16/calc.png similarity index 100% rename from src/h5ai/icons/16x16/calc.png rename to src/_h5ai/icons/16x16/calc.png diff --git a/src/h5ai/icons/16x16/cd.png b/src/_h5ai/icons/16x16/cd.png similarity index 100% rename from src/h5ai/icons/16x16/cd.png rename to src/_h5ai/icons/16x16/cd.png diff --git a/src/h5ai/icons/16x16/copying.png b/src/_h5ai/icons/16x16/copying.png similarity index 100% rename from src/h5ai/icons/16x16/copying.png rename to src/_h5ai/icons/16x16/copying.png diff --git a/src/h5ai/icons/16x16/cpp.png b/src/_h5ai/icons/16x16/cpp.png similarity index 100% rename from src/h5ai/icons/16x16/cpp.png rename to src/_h5ai/icons/16x16/cpp.png diff --git a/src/h5ai/icons/16x16/css.png b/src/_h5ai/icons/16x16/css.png similarity index 100% rename from src/h5ai/icons/16x16/css.png rename to src/_h5ai/icons/16x16/css.png diff --git a/src/h5ai/icons/16x16/deb.png b/src/_h5ai/icons/16x16/deb.png similarity index 100% rename from src/h5ai/icons/16x16/deb.png rename to src/_h5ai/icons/16x16/deb.png diff --git a/src/h5ai/icons/16x16/default.png b/src/_h5ai/icons/16x16/default.png similarity index 100% rename from src/h5ai/icons/16x16/default.png rename to src/_h5ai/icons/16x16/default.png diff --git a/src/h5ai/icons/16x16/doc.png b/src/_h5ai/icons/16x16/doc.png similarity index 100% rename from src/h5ai/icons/16x16/doc.png rename to src/_h5ai/icons/16x16/doc.png diff --git a/src/h5ai/icons/16x16/draw.png b/src/_h5ai/icons/16x16/draw.png similarity index 100% rename from src/h5ai/icons/16x16/draw.png rename to src/_h5ai/icons/16x16/draw.png diff --git a/src/h5ai/icons/16x16/eps.png b/src/_h5ai/icons/16x16/eps.png similarity index 100% rename from src/h5ai/icons/16x16/eps.png rename to src/_h5ai/icons/16x16/eps.png diff --git a/src/h5ai/icons/16x16/exe.png b/src/_h5ai/icons/16x16/exe.png similarity index 100% rename from src/h5ai/icons/16x16/exe.png rename to src/_h5ai/icons/16x16/exe.png diff --git a/src/_h5ai/icons/16x16/folder-home.png b/src/_h5ai/icons/16x16/folder-home.png new file mode 100644 index 0000000000000000000000000000000000000000..14fe20abbcf176ea4dbfa6c442c3cbca0dde9fdb GIT binary patch literal 618 zcmV-w0+s!VP)A~#9OXm&B>E!E2PTwCqRod9KFbqk49_R6VH6*fJM=EQ(i3wU&LZ1!%7DD^y7r1{cRfcGDTIOs0uXd zWsdf@>BkA+kNqMe0;93c(N9wLc3RBO1r$|bj9OF$=H~+Tc3Sk46zd$u{3g(1u%fY| zsg^4=S5}D=lUr(>7@8}qRLhmIUyDJBSd3^uBiVq!=v;WDBL0{_D`XaPJ2C!*tXKvZM=Q=;jx3o|7qYs8{gmf1y~<6PL~&qDgXcg07*qoM6N<$ Eg4@LtNB{r; literal 0 HcmV?d00001 diff --git a/src/_h5ai/icons/16x16/folder-open.png b/src/_h5ai/icons/16x16/folder-open.png new file mode 100644 index 0000000000000000000000000000000000000000..2aa5cc7571c872c8f10bbafae65a5ad501bcf519 GIT binary patch literal 431 zcmV;g0Z{&lP)#5i+25Ey z1eW>A(TJZct!&j|`k;COJ3TXtQVsytTJGvML{YngLVrtHtim3w?VOd|_q)l$Cb{vs zkD7(<;r;Y#yI$jXZ+#Ugxz$QB571FQokpWyx1TtpC>W?#ig|UqyIA$73V}a1@wae~ zR`Z(Hy!+)+K6#tHp#5t@~g&mrE6HM-f^~=t^SC=NDJo7J@Va1tE@8 ZegpsFp=+X_I-URk002ovPDHLkV1gz9zD@(I$z)gyHJ~3%GZry#Ku@3_8309WQ*vyGj1VIRZ_nxiI@3dN}18k%S ze7PKLEZlo@J$Uu#>Vxs)m+wp-J+|LPBdGuUM)T9g!^o*E#&Jx0d+Wap;yC8F+G6BH z6W3|w2L}$05k}>L*qb2P4tSq)Dj7~Ri9`((H!vv0JY9X9@53-)=46H0^Ych2EtrTJ zkrPFS4MdopO1OCKHUMv5uCiVG%DdOb>9ZG*b~D#HQ9=>JBpVFvnsw3|owSA%W8zSW zUz=aR`+`=apFjr*`Ua*B)r@nO79a>{zj)H)Tp>Z^L<>DIm3+=xb+T5Sa(pD`hP6(V zNW=;~(4K*+VTrN>Fvh1Ztx_ zkoFFh`72Zy#ct!rXb)7Z+Gy10#*?HgYS!3o*7hhbqM4?sST%Cymp^>`eBZ;|KdXii dK$S3D{sRQuK3buqDUtvH002ovPDHLkV1kf>1jYaW literal 0 HcmV?d00001 diff --git a/src/h5ai/icons/16x16/folder-parent.png b/src/_h5ai/icons/16x16/folder-parent.png similarity index 100% rename from src/h5ai/icons/16x16/folder-parent.png rename to src/_h5ai/icons/16x16/folder-parent.png diff --git a/src/_h5ai/icons/16x16/folder.png b/src/_h5ai/icons/16x16/folder.png new file mode 100644 index 0000000000000000000000000000000000000000..7c613e054b15f36f1c63d3a9e68c29f95ccafbf2 GIT binary patch literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4fxrAZ4@_Z>LpB(P=EDgGHs@(H<#3lpZ>Z`kgozhr}u z%ND^SH)bT1ai5(%GhLBQWyc2T{QCEEs*fL)cv-qlud%l7b=JzvYWCyXgSnn09r_m{_v@Z)oh|J@z%eLp$7{O>Z)>R#@Zg7k^n-7ned&cS|Mbz}!LJ8_>1;L0`g;1w^qs{EFTMQ6kE1C1 zD30Tm2Zp#Nbqx#xhrjlv)35L2-t$ZMX16=ffun=%bAS2mt53Z8##`TuqUi1}VpJdj zmVhLVV=Z5-6X*cPjvwUN<%Rn@UTL2Vzw(FIzJ2Y}B5e{;R`1+jfBUb0zxwOnoxeN= zd{Vw%ClCM!?$6G)Ru(?qO&tA52V=f5^31V)z;~l4T8-m)HM^J-h@z-<_UzO9fBwq3 zbI*M7DIVEByeDWklBM~3&;9xI$WLDT&7Xc1MNv17;{?FOaZD6N0dVyE?|F*^ZlZ^!gt7^#vj|mpt|H({oC*N|#NV0kfiZYK zUaLD~kdv=l@}>`wYr$`}sy883hp{AO0u~WR)hHlt0%P4rlg+qI62_vcSX?Agm2DF6 zo2QsR z0-F!nbO5L*-N}Cvw%dg5Hr>fFL;+(kLCX!>LTQ?B>-E{d2TTs4vgzJz)NE-z##mI8 z>FZ;J1A|TzK+x&Xop_g%Pd~@)Yon+U+5U6NiZY$ELDr>9Dtgo$L4b^9~dXfXr{UEKNC`TcKzu65b z;%@#~+-DINrxk9EUm*-z7`13B+Zu>sjb&zHlr%|w+VOK|>-4N$!d22h`K^O5CA=T_ zqo|;gQV*42>5h*QgrU#a>5c~05VktZOpcLwN3MiZNeiDWA8U!M^4dg15D`?=jnvtk zJNFMOU;=K9Um*xWtO<(ycR0Whh6Bt@j*_On<`J(c@oT5W{TaTpRDB>#97qFdd?8n= zMlIHXzjlQ%2;9!g<_^217$vYRx)Y;(_VdpYPhwvhXoMtKAp=G+ATl;Bf|wVgBw6hmW5^))pzkXw4@#NMtUI<~HtYarG^o zk3h-lBEye8;fie&Fm?59f-vZdfFudS#~%lE%~Z0wQ1Y`M@$ z$z*BX-P|5>aa?v@?3G1TNRxGBeYpT#x$ZUK>n7Qt8g<2T=IOp4bG5kd%xWoEHOZqx zzXU{*-g&ZWv_}j1eZ37$Q43K3Hkvze{oW#)^g}?4{Lp)~>IY>0SxCi+CC|h;`VFg4 zl_W2R`z1h@8yfIuJ&F2rsb%7d6N{uS`x$RKSr?|2XFLJLWZAPHDaHB*^zKZ{rc~f9 z69AuyJypnFYviv~>I;ag_q0zFLct1}G@Fp-TA(N|HfSkL5pT)gh-pI+=cX*xEqyW2 z=3r1O>WYoE6*RSeAO-aiD0@Lv>QSrfx{xO8ef}Vm*FKwUgl46DZ;xIpC4Bc^shOe4 zizP`pJ@Ue*L|v7Y`8yjB&_iI%Lu6pdle zo4HayK;8>y7xzMX-Yozn4K#IRrMO;l-u~iDpHg?`O`O;?CZ>iQ@bIKz>rAr`C?K~! zoS%E_$l$?kO|(bypAYBf$lo;<31JnOyZFw{achGjjQ$S|gTdN>i|^bV2j)EHTmy^1 z)LR!nxRi(tee0{IPn|k(Xut74^BDZm|J+nLV#x2SU(bti_3^%Z%*<75-bpkh5){;waUU>iRn-|{y9ME7&dn$9lP2ehU15dzY|5k~j z$O6N_2^{#=UZC7W)^Q|m1NY)McCA_c?>12sg*eUh*DLP6q`1EtB;_yv3!?Gf$RAtL Q!Tw0A+ia2(Zm>x zk#O)pJb3T}6R!pjuBOw`81dl23o6kAiJBO>7(xsXJ$O*U#ULaSKQ^ld1hNauATv8N zUC%>Rbyqht%OXqboW&M|MlMgy;swtqA243Y(c*P+^UuH2f{E^z%pPdP+H_T z8kh%KQ53arAG{k|hJXb>Jo)ld_doH-mdWbKz@w#-8o1FQtyX;H@7czoCtrB$)i4Za zq9|(g3~|o#9vA>dC+^$u&T>8T@U=^_*l~teEnWJ|p%3xVD*|InW$f#yXiYsg7UTxCwKnxUy*h)EzDoI-2CpVZ%*#rfAEJBVHnn; zDAMkHoEKV3NE5P;UvJ?t5+5 z-hBsuwW+iLprR;p6?n~;AHDJR*3IM3wd%9Pt$CDE9{4^mup~r;(vks|R911~^!g>7~8aQY)5_WEC5Oc2r4CkCDCgh$;>NIf>6{`#)W=C?zEXIlh;s}(0K(t20%tA^cg)BV<@66pbm2k2b5Us&>43H8q9+DUl z4Pxe95WB}4s)strWgf%`*zH9$B1wVG5C8~7n~Tu`N+1x@Y=G~I9-4PQJUotw7Vz4M zOd&HNq*J68f09Q1cdWHjJ`8 zS}ufQ!!U4gh4f9qh0GQJH}lxp7ac=~5K@3L7utBU@gr!Hja^0QH4#Z&ETplI=Lv_` zCjg*C$0m%lpaL@lq7dcE3)?S@V0EbO<4*0UQa1i0ez-=ZXOi*o^4nU*|Odqyz%22eiZ}2}~HN zAnhyq&`z7eEVd5VgtDLqbZj-C5dsuC5piE)$P;lwVgV5=ooK)U7As=$X1}mXY~Li+ z*bvbRWg)aSo5`Vw(l-A4qF{r;uS=qBXOLRQEaYb&5#_BY3lwqE)7dQK_FX)n0Hw9d zxAur#92hYb?TNGwn4R&0*4-;{V5+b-pk4YDZ)sC(7ES)iq*D{!-P>urcG{32d0)H~ z+@jvA%Bcjd^8i{j%8AB`R|*fEyyZfPg+v_3o`5O7h3;kvcz<$<2J> z8t@N^g`l9zqFy1f4Ih6Qto%_5x6GF;f@yKOw$n-1=RznqK))=Lm9kHUvl<}j_Ph`F zTL<|t?yLa-{m1#*+`4LIWWfRYY=54w&0+feJ8rJ7`lVf}q5) z>5;@Hnefj@vNK7nh%RHNDc_Q2s&7Y`ghH4cpSHW+T& zE@2+A{sc^8pHwRMYn3nz17IcQQRXm)T)!3UTN{`IW`J4uuv_JSZWD%KnH2n;L_p~9 bW0HRXaU+8uqEuZd00000NkvXXu0mjf4bsiP literal 0 HcmV?d00001 diff --git a/src/_h5ai/icons/48x48/folder-page.png b/src/_h5ai/icons/48x48/folder-page.png new file mode 100644 index 0000000000000000000000000000000000000000..cd2175a9ed958bce9c8850e259dcd6585aec0839 GIT binary patch literal 2161 zcmV-%2#)uOP)O>BMi$(WevLlgVJizY@)vBCIIYsFAgqFA5>OKmCb48t&U zZhL>94{PnUZ)Z3ox6v=z+3TFW*V_O8cVGJ)6UQca6OUw`&nQ53xw z$8qnjA+AW(0+Yb{Ll5tIW}4Z9i?cJ!U1!b4$@bA-|KzC$pL+KBC!#2N{|;hQAORME zB#vV(UaS)60Gl7Uj|1Hs*Z%7#P21+jfBy92|F~78qePVc)oa5){^k#_{phF1UOEL_ zFJ7+_XaH-j&CIlVH$J$NIBrKe81tF^dpA!5Ux}iqAIEV&yBG*WQPkSEZ_n!QedFlS zy&wAst5&aD5wuIm;{5Cx1av;FMk+C(d9Uf695y(F;NsXfQ`p~_WfrL?%)07 zU~vXX?pYizOKfw3_Nw*#>GZi@eEDlX_%85X9LH&vCOg2E-8;8E)}6adnsnW_#`wdo z(BYpCq)C_V++}v}-1Zo-*<%ha)B!fEow6H-3kEPK?(C);@{_sCx>lEW@=qmMJ7qTj z8-Yu}Vn(0|Od@Gmzyz?SFuoUJ{G$|AgF*e+ogGFdJ?3BmuXaT}c*S`AXV#!>jk_l5 zwQk7tuYT+}XpXl+z^aI6YO*O9$HpymuZ&Q1A$1<1>c%PpuEi-406_emK?la*`FN`q z7#M?XcCevJ_QELp==@hb1#ZZh;yBRGkZ%Um-94OA=_dr;#+jzcsOnD{r20mT0w6O-JZR3j_o_HcucRDG?wQ5U+KU9T|m+B}B5E z3?f*X*k-#1K27@hz5ad!wA+)sd;T=rb|1hRYOawbP_%G}Lb@~oL3~7E?C-YOCLIdc29os46SF+(UC6mn zr~|b^24Gavk|`C%WEm@~0Vca9h-etA3d8<p&J=Nb`9> z4m`v`T0l{2C8Usn1h6g-o4l+SOpxVd5XClHocr@A7dlMRniM*x>URAv9LSG%8ufa${9t*ez{W-SkF_Mx#}nNIK}&=NByyjGfn{tOl5BA}Bsf z)5I-gK#gzYirr{v1l>b}21PKo#kp60S0hlBH5;~a|JI$g`8fftWTIjr6Esb75LE(s z40!*~v|);sAPcVCZ&ejZdhB`hOJfO0(qp)Itv0{zW?337_PYOj4a6s&Tao&|*anL`Mg)gdny#{_3ilxsYOzFvhkyf9i#? z_}8p|fc0B<)#j^Y&nQ>?VsBO`p0yx0xhBNt|7?@ycV?B%j25b*YKkU(_8k1eSOV#= z$8d4BK7T|%6guLP6~cY>4Ncw)kpngwf_TY$Q$bT&@Tp-HG`6KQw$3du1xs-xf zLM0C9sdl0H(t>zxD1vFWIDh*0V+l;J+syr2cGTwAEZ}hyHue6_n^j_w)MW@oOQ)cUwU!I7zPK#lH6pDJ zB7!nHh)aW@SX)9<*$+5S#a7&uuo@dExj8vSi8J86IDsmgo)|(q{IGAx1<^P ze4n06rIpAUxoY96M{&|yWYdTD(Ckdz68NxAe}Tcm?2;~2DnU86rP^sPMw;H~Tb9!fQs zZxX~t8POGvssZ;*MySq=jsXSaUsvYmKD1%-zGW@6Lh{y?`8mS7#=Ic(fw>beUp#AV zBTu9MLx;g&ZG#gpUpx!UdCb8A3&5r4PyGF4A~N;)M|W-CzGdxdO5Wu3GuNaJ{e}zVyzu`QtBLxOD8rvnO%C&MZ_3ywMvZC!afh=Kbf6 zpVG zJ!htL?yDbM&VBdZckcIle*e#VQWORMXUTdE;7+A4y^!a*0IS@wRDuf319L@D+`4=4 z7MB_U2Y&F)SD)K+;F-tXxo2?T=~hen7n@{$zP$10wW;9)uOEFY&-1HAQOqtI;zUvn z3;>&+dSvI3wT$hX9vfZiJnJ_PtUUPjCx;$5boBVkd7fXtix?GX1JgjeC<={lrUd$d zE%$EV(V3g$|M*R7v%beaKm5Wk{}yRCG0NPv@%it+`R?pTpPo4VBXA?WpAu*R>&Hh& zSIpl0>u%z>6X{3f*}c2BtOZ`m^L(x-iaCEX5Xkd<#hyJ6t$Xi{g9mp%{2;5>4fX`> z?PPj#?1`^-?tT04$6tP!=lP|gDB1v06a{&nw}8zjK70SjzP-C%xivkCX*cGFOOmW_ z6)RV7;)kDp{o=*fK6n?nS`0Ob=Qt<`)4LDQMPC7RS|b&Jv!X`fwDcr%)}*j z?bx;-*y1n;6Y2+sHm=Er=BES@6g%3l3)LXYyw+;tPW7oK8`oq*z-C|snDzwvfB{Sy zCXfJDqVpz1+^ZB-K~Q&YM~jgGhdF4#ExV!)ydrM>y*8+8W7$OAstbPo)ty@oTH#Fy zWNM6KD*h{oWn(95N(r$EskI1Id#=WSEpciD05I;!um&PHK2EDmFz`!nZ?IZ zXF}GDLLTTyWB{UC*1TL%#78Wj0~%9-TQCni_(54ik(3f9ia-X)Y#f#&CpN)}vkHGY>#~>Bbq&Y0nX2_sx;U{dmR%lD*N@p+ z+;wIR2cb~Rb!egVPjogkRV_pXSTs0s^OE>M$WN8joY;g+9MCsgg{BhPGS?5In1wR2 zF{SNz#F>uo!Ws#msYJn4V^gZ|LYGYJsDj_t2wN&mcV->~)w>sIDW!_HgwjEqD&kT} zin?lHvl^PDA1Fax1o9h1y(r>RQJ+FPTim3S@P%BOxOyFh{HK8JcIC9ocCL^U-%s{* z`J?JcgJpN!nX76c-^WKcdm$Zr3qYiSZXH>)?-Dt0PuD+n<^`Nsl+KN#-sFJV%j+WD zeLw;8`<2Ow`-TQKENP-1$sboHCkT6uRYI5pCQhEYcs|QoRT%vb9fFW$El!@fcpjK= zn1cqUfRW=Te?HYVX3g_Y?%ck8>&A8Be&!L}=zeahjR@hn^nNJDZGu#dM{lm0T#xQY z{qV@;@yX%Szm1&u_WUXAuQO9AfeW*@+NX{UpSyl+_}u+K7gOq~OaK>wv%m!$0rCG< z$@4q|27#?u@GE+OasipglDG_v6-8lNv-Iyad7k%SHPdPu;UZFE|7y^VFa8Z= 0 ? viewmode : settings.viewmodes[0]; + + $viewDetails.add($viewIcons).removeClass("current"); + if (viewmode === "details") { + $viewDetails.addClass("current"); + $extended.addClass("details-view").removeClass("icons-view").show(); + } else if (viewmode === "icons") { + $viewIcons.addClass("current"); + $extended.removeClass("details-view").addClass("icons-view").show(); + } else { + $extended.hide(); + } + }, + initTopSpace = function () { + + var $body = $("body"), + $tree = $("#tree"), + adjustTopSpace = function () { + + var winHeight = $window.height(), + navHeight = $("body > nav").outerHeight(), + footerHeight = $("body > footer").outerHeight(), + contentSpacing = 50, + treeSpacing = 30; + + $body.css({ + "margin-top": navHeight + contentSpacing, + "margin-bottom": footerHeight + contentSpacing + }); + + $tree.css({ + top: navHeight + treeSpacing, + height: winHeight - navHeight - footerHeight - 18 - 2 * treeSpacing + }); + + try { + $tree.get(0).updateScrollbar(); + } catch (err) {} + }; + + $window.resize(function () { + adjustTopSpace(); + }); + adjustTopSpace(); + }, + initViews = function () { + + var $navbar = $("#navbar"), + $extended = $("#extended"); + + $("#table").remove(); + + if (settings.viewmodes.length > 1) { + if ($.inArray("icons", settings.viewmodes) >= 0) { + $("
  • view-iconsicons
  • ") + .find("img").attr("src", image("view-icons")).end() + .click(function () { viewmode("icons"); }) + .appendTo($navbar); + } + if ($.inArray("details", settings.viewmodes) >= 0) { + $("
  • view-detailsdetails
  • ") + .find("img").attr("src", image("view-details")).end() + .click(function () { viewmode("details"); }) + .appendTo($navbar); + } + } + + // status update + $extended.find(".entry a").hover( + function () { + if ($extended.hasClass("icons-view")) { + var $this = $(this); + $(".status.default").hide(); + $(".status.dynamic") + .empty() + .append($this.find(".label").clone()) + .append($("·")) + .append($this.find(".date").clone()) + .show(); + + if (!$this.closest(".entry").hasClass("folder")) { + $(".status.dynamic") + .append($("·")) + .append($this.find(".size").clone()); + } + } + }, + function () { + $(".status.default").show(); + $(".status.dynamic").empty().hide(); + } + ); + }, + shiftTree = function (forceVisible, dontAnimate) { + + var $tree = $("#tree"), + $extended = $("#extended"); + + if ((settings.slideTree && $tree.outerWidth() < $extended.offset().left) || forceVisible) { + if (dontAnimate) { + $tree.stop().css({ left: 0 }); + } else { + $tree.stop().animate({ left: 0 }); + } + } else { + if (dontAnimate) { + $tree.stop().css({ left: 18 - $tree.outerWidth() }); + } else { + $tree.stop().animate({ left: 18 - $tree.outerWidth() }); + } + } + }, + initTree = function () { + + $("#tree").hover( + function () { shiftTree(true); }, + function () { shiftTree(); } + ); + $window.resize(function () { shiftTree(); }); + shiftTree(false, true); + }, + selectLinks = function (href) { + + var elements = []; + $("a[href^='/']").each(function () { + + if ($(this).attr("href") === href) { + elements.push(this); + } + }); + return $(elements); + }, + linkHoverStates = function () { + + if (settings.linkHoverStates) { + $("a[href^='/']:not(.linkedHoverStates)").each(function () { + + var $a = $(this).addClass("linkedHoverStates"), + href = $a.attr("href"); + + $a.hover( + function () { selectLinks(href).addClass("hover"); }, + function () { selectLinks(href).removeClass("hover"); } + ); + }); + } + }, + formatDates = function (dateFormat) { + + if (dateFormat) { + currentDateFormat = dateFormat; + } + + $("#extended .entry .date").each(function () { + + var $this = $(this), + time = $this.data("time"), + formattedDate = time ? new Date(time).toString(currentDateFormat) : ""; + + $this.text(formattedDate); + }); + }, + localize = function (langs, lang, useBrowserLang) { + + var storedLang = amplify.store(settings.store.lang), + browserLang, selected, key; + + if (langs[storedLang]) { + lang = storedLang; + } else if (useBrowserLang) { + browserLang = navigator.language; + if (langs[browserLang]) { + lang = browserLang; + } else if (browserLang.length > 2 && langs[browserLang.substr(0, 2)]) { + lang = browserLang.substr(0, 2); + } + } + + if (!langs[lang]) { + lang = "en"; + } + + selected = langs[lang]; + if (selected) { + $.each(selected, function (key, value) { + $(".l10n-" + key).text(value); + }); + $(".lang").text(lang); + $(".langOption").removeClass("current"); + $(".langOption." + lang).addClass("current"); + } + + formatDates(selected.dateFormat || settings.dateFormat); + }, + initLangSelector = function (langs) { + + var $langOptions = $("#langSelector .langOptions"), + sortedLangsKeys = [], + $ul; + + $.each(langs, function (lang) { + sortedLangsKeys.push(lang); + }); + sortedLangsKeys.sort(); + + $ul = $("
      "); + $.each(sortedLangsKeys, function (idx, lang) { + $("
    • ") + .addClass(lang) + .text(lang + " - " + langs[lang].lang) + .appendTo($ul) + .click(function () { + amplify.store(settings.store.lang, lang); + localize(langs, lang, false); + }); + }); + $langOptions + .append($ul) + .scrollpanel(); + + $("#langSelector").hover( + function () { + $langOptions + .css("top", "-" + $langOptions.outerHeight() + "px") + .stop(true, true) + .fadeIn(); + $langOptions.get(0).updateScrollbar(); + }, + function () { + $langOptions + .stop(true, true) + .fadeOut(); + } + ); + }, + onIndicatorClick = function (event) { + + var $indicator = $(this), + $entry = $indicator.closest(".entry"), + updateTreeScrollbar = $("#tree").get(0).updateScrollbar; + + if ($indicator.hasClass("unknown")) { + $.get(api(), { "action": "tree", "href": $entry.find("> a").attr("href") }, function (html) { + + var $content = $(html); + + $indicator.removeClass("unknown"); + if ($content.find("> li").size() === 0) { + $indicator.replaceWith($("")); + } else { + $indicator.addClass("open"); + $entry.find("> .content").replaceWith($content); + updateTreeScrollbar(); + $content.find(".indicator:not(.initiated)") + .click(onIndicatorClick) + .addClass("initiated"); + } + }); + } else if ($indicator.hasClass("open")) { + $indicator.removeClass("open"); + updateTreeScrollbar(true); + $entry.find("> .content").slideUp(function () { + updateTreeScrollbar(); + }); + } else { + $indicator.addClass("open"); + updateTreeScrollbar(true); + $entry.find("> .content").slideDown(function () { + updateTreeScrollbar(); + }); + } + }, + initIndicators = function () { + + $("#tree .entry.folder .indicator:not(.initiated)") + .click(onIndicatorClick) + .addClass("initiated"); + }, + getFileType = function (filename) { + + var dotidx = filename.lastIndexOf('.'), + ext = dotidx >= 0 ? filename.substr(dotidx) : filename; + + return extToFileType[ext.toLowerCase()] || "unknown"; + }, + formatSizes = function () { + + $("#extended .entry .size").each(function () { + + var $this = $(this), + bytes = $this.data("bytes"), + formattedSize = bytes >= 0 ? H5AI.util.formatSize(bytes) : ""; + + $this.text(formattedSize); + }); + }, + setTotals = function () { + + var $extended = $("#extended"); + + $(".folderTotal").text($extended.find(".entry.folder:not(.folder-parent)").length); + $(".fileTotal").text($extended.find(".entry.file").length); + }, + init = function () { + + initViews(); + viewmode(); + initTopSpace(); + initTree(); + linkHoverStates(); + initLangSelector(config.langs); + localize(config.langs, settings.lang, settings.useBrowserLang); + formatSizes(); + setTotals(); + initIndicators(); + }; + + return { + settings: settings, + api: api, + image: image, + icon: icon, + shiftTree: shiftTree, + linkHoverStates: linkHoverStates, + initIndicators: initIndicators, + formatDates: formatDates, + getFileType: getFileType, + init: init + }; + }()); + +}(window, jQuery, H5AI, H5AI_CONFIG)); diff --git a/src/_h5ai/js/inc/Extended.js b/src/_h5ai/js/inc/Extended.js new file mode 100644 index 00000000..647f80fc --- /dev/null +++ b/src/_h5ai/js/inc/Extended.js @@ -0,0 +1,127 @@ + +(function (document, $, H5AI) { + + H5AI.extended = (function () { + + var initBreadcrumb = function () { + + var $ul = $("body > nav ul"), + pathname = "/", + path = H5AI.connector.getPath(pathname), + pathnameParts = document.location.pathname.split("/"), + lastPart = "", + title = document.domain; + + $ul.append(H5AI.html.updateCrumbHtml(path)); + + $.each(pathnameParts, function (idx, part) { + if (part !== "") { + pathname += part + "/"; + $ul.append(H5AI.html.updateCrumbHtml(H5AI.connector.getPath(pathname))); + lastPart = part + " - "; + title += " > " + part; + } + }); + + document.title = H5AI.util.checkedDecodeUri(lastPart + title); + }, + initExtendedView = function () { + + var $ul, $li; + + $ul = $("
        "); + $li = $("
      • ") + .appendTo($ul) + .append($("")) + .append($("")) + .append($("")) + .append($("")); + + // entries + $("#table td").closest("tr").each(function () { + var path = H5AI.connector.getPath(document.location.pathname, this); + $ul.append(H5AI.html.updateExtendedHtml(path)); + }); + + $("#extended").append($ul); + + // empty + if ($ul.children(".entry:not(.folder-parent)").size() === 0) { + $("#extended").append($("
        empty
        ")); + } + }, + customize = function () { + + $.ajax({ + url: H5AI.core.settings.customHeader, + dataType: "html", + success: function (data) { + $("#content > header").append($(data)).show(); + } + }); + + $.ajax({ + url: H5AI.core.settings.customFooter, + dataType: "html", + success: function (data) { + $("#content > footer").prepend($(data)).show(); + } + }); + }, + fetchPath = function (pathname, callback) { + + H5AI.connector.fetchStatusAndContent(pathname, false, function (status, content) { + + var path = H5AI.connector.getPath(pathname); + + path.status = status; + path.content = content; + callback(path); + }); + }, + fetchTree = function (pathname, callback, childPath) { + + fetchPath(pathname, function (path) { + + var parent = H5AI.util.splitPath(pathname).parent; + + path.treeOpen = true; + if (childPath) { + path.content[childPath.absHref] = childPath; + } + if (parent === null) { + callback(path); + } else { + fetchTree(parent, callback, path); + } + }); + }, + populateTree = function () { + + fetchTree(document.location.pathname, function (path) { + $("#tree") + .append(H5AI.html.updateTreeHtml(path)) + .scrollpanel() + .show(); + H5AI.core.shiftTree(false, true); + H5AI.core.linkHoverStates(); + setTimeout(function () { $("#tree").get(0).updateScrollbar(); }, 1); + }); + }, + init = function () { + + initBreadcrumb(); + initExtendedView(); + customize(); + H5AI.connector.updatePaths(); + if (H5AI.core.settings.showTree) { + populateTree(); + } + }; + + return { + init: init + }; + }()); + +}(document, jQuery, H5AI)); diff --git a/src/_h5ai/js/inc/Html.js b/src/_h5ai/js/inc/Html.js new file mode 100644 index 00000000..d04b1f39 --- /dev/null +++ b/src/_h5ai/js/inc/Html.js @@ -0,0 +1,264 @@ + +(function ($, H5AI) { + + H5AI.html = (function () { + + var thumbTypes = ["bmp", "gif", "ico", "image", "jpg", "png", "tiff"], + onClick = function (path, context) { + + }, + updateCrumbHtml = function (path) { + + var $html, $a; + + if (path.html.$crumb && path.html.$crumb.data("status") === path.status) { + return path.html.$crumb; + } + + $html = $("
      • >
      • ") + .addClass(path.isFolder ? "folder" : "file"); + + if (path.status) { + $html.data("status", path.status); + } + + $a = $html.find("a") + .attr("href", path.absHref) + .click(function() { onClick(path, "crumb"); }) + .find("img").attr("src", H5AI.core.image("crumb")).end() + .find("span").text(path.label).end(); + + if (path.isDomain) { + $html.addClass("domain"); + $a.find("img").attr("src", H5AI.core.image("home")); + } + + if (path.isCurrentFolder) { + $html.addClass("current"); + } + + if (!isNaN(path.status)) { + if (path.status === 200) { + $a.append($("not listable")); + } else { + $a.append($("(" + path.status + ")")); + } + } + + if (path.html.$crumb) { + path.html.$crumb.replaceWith($html); + } + path.html.$crumb = $html; + + return $html; + }, + updateExtendedHtml = function (path) { + + var $html, $a, $label, + formattedDate = path.date ? path.date.toString(H5AI.core.settings.dateFormat) : "", + imgClass = "", + icon16 = H5AI.core.icon(path.type), + icon48 = H5AI.core.icon(path.type, true); + + if (path.html.$extended && path.html.$extended.data("status") === path.status) { + return path.html.$extended; + } + + $html = $("
      • ") + .data("path", path) + .addClass(path.isFolder ? "folder" : "file"); + + if (path.status) { + $html.data("status", path.status); + } + + if (H5AI.core.settings.showThumbs === true && $.inArray(path.type, thumbTypes) >= 0) { + imgClass = "class='thumb'"; + icon16 = H5AI.core.api() + "?action=thumb&href=" + path.absHref + "&width=16&height=16&mode=square"; + icon48 = H5AI.core.api() + "?action=thumb&href=" + path.absHref + "&width=96&height=46&mode=rational"; + } + + $label = $("" + path.label + ""); + $a = $("") + .attr("href", path.absHref) + .click(function() { onClick(path, "extended"); }) + .appendTo($html) + .append($("" + path.type + "")) + .append($("" + path.type + "")) + .append($label) + .append($("")) + .append($("")); + + $a.hover( + function () { + if ($("#extended").hasClass("icons-view")) { + var $this = $(this); + $(".status.default").hide(); + $(".status.dynamic") + .empty() + .append($this.find(".label").clone()) + .append($("·")) + .append($this.find(".date").clone()) + .show(); + + if (!$this.closest(".entry").hasClass("folder")) { + $(".status.dynamic") + .append($("·")) + .append($this.find(".size").clone()); + } + } + }, + function () { + $(".status.default").show(); + $(".status.dynamic").empty().hide(); + } + ); + + if (path.isParentFolder) { + if (!H5AI.core.settings.setParentFolderLabels) { + $label.addClass("l10n-parentDirectory"); + } + $html.addClass("folder-parent"); + } + + if (!isNaN(path.status)) { + if (path.status === 200) { + $html.addClass("page"); + $a.find(".icon.small img").attr("src", H5AI.core.icon("folder-page")); + $a.find(".icon.big img").attr("src", H5AI.core.icon("folder-page", true)); + } else { + $html.addClass("error"); + $label.append($(" " + path.status + " ")); + } + } + + if (path.html.$extended) { + path.html.$extended.replaceWith($html); + H5AI.core.formatDates(); + } + path.html.$extended = $html; + + return $html; + }, + updateTreeHtml = function (path) { + + var $html, $blank, $a, $indicator, $ul, idx; + + $html = $("
        ") + .data("path", path) + .addClass(path.isFolder ? "folder" : "file"); + + $blank = $("").appendTo($html); + + $a = $("") + .attr("href", path.absHref) + .click(function() { onClick(path, "tree"); }) + .appendTo($html) + .append($("")) + .append($("" + path.label + "")); + + if (path.isFolder) { + // indicator + if (path.status === undefined || !path.isEmpty()) { + $indicator = $("") + .click(function (event) { + + var $entry = $indicator.closest(".entry"); // $html + + if ($indicator.hasClass("unknown")) { + H5AI.connector.fetchStatusAndContent(path.absHref, false, function (status, content) { + + path.status = status; + path.content = content; + path.treeOpen = true; + $("#tree").get(0).updateScrollbar(true); + updateTreeHtml(path); + $("#tree").get(0).updateScrollbar(); + }); + } else if ($indicator.hasClass("open")) { + path.treeOpen = false; + $indicator.removeClass("open"); + $("#tree").get(0).updateScrollbar(true); + $entry.find("> ul.content").slideUp(function() { + + $("#tree").get(0).updateScrollbar(); + }); + } else { + path.treeOpen = true; + $indicator.addClass("open"); + $("#tree").get(0).updateScrollbar(true); + $entry.find("> ul.content").slideDown(function() { + + $("#tree").get(0).updateScrollbar(); + }); + } + + }); + + if (path.status === undefined) { + $indicator.addClass("unknown"); + } else if (path.treeOpen) { + $indicator.addClass("open"); + } + + $blank.replaceWith($indicator); + } + + // is path the domain? + if (path.isDomain) { + $html.addClass("domain"); + $a.find(".icon img").attr("src", H5AI.core.icon("folder-home")); + } + + // is path the current folder? + if (path.isCurrentFolder) { + $html.addClass("current"); + $a.find(".icon img").attr("src", H5AI.core.icon("folder-open")); + } + + // does it have subfolders? + if (!path.isEmpty()) { + $ul = $("
          ").appendTo($html); + $.each(path.content, function (idx, entry) { + $("
        • ").append(updateTreeHtml(entry)).appendTo($ul); + }); + if (path.status === undefined || !path.treeOpen) { + $ul.hide(); + } + } + + // reflect folder status + if (!isNaN(path.status)) { + if (path.status === 200) { + $a.find(".icon img").attr("src", H5AI.core.icon("folder-page")); + $a.append($("")); + } else { + $html.addClass("error"); + $a.append($("" + path.status + "")); + } + } + } + + if (path.html.$tree) { + path.html.$tree.replaceWith($html); + } + path.html.$tree = $html; + + return $html; + }, + updateHtml = function (path) { + + updateCrumbHtml(path); + updateExtendedHtml(path); + updateTreeHtml(path); + }; + + return { + updateCrumbHtml: updateCrumbHtml, + updateExtendedHtml: updateExtendedHtml, + updateTreeHtml: updateTreeHtml, + updateHtml: updateHtml + }; + }()); + +}(jQuery, H5AI)); diff --git a/src/_h5ai/js/inc/Path.js b/src/_h5ai/js/inc/Path.js new file mode 100644 index 00000000..9f99e8cf --- /dev/null +++ b/src/_h5ai/js/inc/Path.js @@ -0,0 +1,95 @@ + +(function (document, $, H5AI) { + + H5AI.Path = function (folder, tableRow) { + + var path = {}, + $tds, $a, date, size, splits; + + // path.parentFolder: undefined + // path.label: undefined + // path.type: undefined + // path.href: undefined + // path.time: undefined + // path.size: undefined + // path.absHref: undefined + // path.isFolder: undefined + // path.isParentFolder: undefined + // path.isCurrentFolder: undefined + // path.isDomain: undefined + + path.status = undefined; // undefined, "h5ai" or HTTP response code + path.content = undefined; // associative array path.absHref -> path + path.html = { + $crumb: undefined, + $extended: undefined, + $tree: undefined + }; + path.treeOpen = false; + + if (!H5AI.util.pathEndsWithSlash(folder)) { + folder += "/"; + } + + if (tableRow) { + $tds = $(tableRow).find("td"); + $a = $tds.eq(1).find("a"); + date = Date.parse($tds.eq(2).text()); + size = H5AI.util.parseSize($tds.eq(3).text()); + + path.parentFolder = folder; + path.label = $a.text(); + path.type = $tds.eq(0).find("img").attr("alt") === "[DIR]" ? "folder" : H5AI.core.getFileType(path.label); + path.href = $a.attr("href"); + path.time = date ? date.getTime() : 0; + path.size = size; + } else { + splits = H5AI.util.splitPath(folder); + + path.parentFolder = splits.parent || ""; + path.label = H5AI.util.checkedDecodeUri(splits.name); + if (path.label === "/") { + path.label = H5AI.util.checkedDecodeUri(document.domain); + } + path.type = "folder"; + path.href = splits.name; + path.time = 0; + path.size = -1; + } + + if (H5AI.util.pathEndsWithSlash(path.label)) { + path.label = path.label.slice(0, -1); + } + + path.isFolder = (path.type === "folder"); + path.isParentFolder = (path.label === "Parent Directory"); + if (path.isParentFolder) { + path.isFolder = true; + path.type = "folder-parent"; + } + path.absHref = path.isParentFolder ? path.href : path.parentFolder + path.href; + path.isCurrentFolder = (path.absHref === document.location.pathname); + path.isDomain = (path.absHref === "/"); + + if (path.isParentFolder && H5AI.core.settings.setParentFolderLabels) { + if (path.isDomain) { + path.label = H5AI.util.checkedDecodeUri(document.domain); + } else { + splits = H5AI.util.splitPath(path.parentFolder); + path.label = H5AI.util.checkedDecodeUri(splits.parentname); + } + } + + path.isEmpty = function () { + + return !path.content || $.isEmptyObject(path.content); + }; + path.onClick = function (context) { + + H5AI.core.triggerPathClick(path, context); + }; + + return path; + }; + +}(document, jQuery, H5AI)); diff --git a/src/_h5ai/js/inc/Sort.js b/src/_h5ai/js/inc/Sort.js new file mode 100644 index 00000000..5142e1b3 --- /dev/null +++ b/src/_h5ai/js/inc/Sort.js @@ -0,0 +1,157 @@ + +(function ($, H5AI) { + + H5AI.sort = (function () { + + var type = function (entry) { + + var $entry = $(entry); + + if ($entry.hasClass("folder-parent")) { + return 0; + } else if ($entry.hasClass("folder")) { + return 1; + } + return 2; + }, + cmp = function (entry1, entry2, rev, getVal) { + + var res, val1, val2; + + res = type(entry1) - type(entry2); + if (res !== 0) { + return res; + } + + val1 = getVal(entry1); + val2 = getVal(entry2); + if (val1 < val2) { + return rev ? 1 : -1; + } else if (val1 > val2) { + return rev ? -1 : 1; + } + return 0; + }, + cmpName = function (entry1, entry2) { + + return cmp(entry1, entry2, false, function (entry) { + return $(entry).find(".label").text().toLowerCase(); + }); + }, + cmpTime = function (entry1, entry2) { + + return cmp(entry1, entry2, false, function (entry) { + return $(entry).find(".date").data("time"); + }); + }, + cmpSize = function (entry1, entry2) { + + return cmp(entry1, entry2, false, function (entry) { + return $(entry).find(".size").data("bytes"); + }); + }, + cmpNameRev = function (entry1, entry2) { + + return cmp(entry1, entry2, true, function (entry) { + return $(entry).find(".label").text().toLowerCase(); + }); + }, + cmpTimeRev = function (entry1, entry2) { + + return cmp(entry1, entry2, true, function (entry) { + return $(entry).find(".date").data("time"); + }); + }, + cmpSizeRev = function (entry1, entry2) { + + return cmp(entry1, entry2, true, function (entry) { + return $(entry).find(".size").data("bytes"); + }); + }, + sort = function (fn) { + + $("#extended .entry").detach().sort(fn).appendTo($("#extended > ul")); + }, + $all, orders, + sortBy = function (id) { + + var order = orders[id]; + + $all.removeClass("ascending").removeClass("descending"); + order.head.addClass(order.clas).attr("href", "#!/sort=" + id); + sort(order.fn); + }, + init = function () { + + var $ascending = $("ascending"), + $descending = $("descending"), + initialOrder = /^.*#!.*\/sort=(.*?)(?:\/.*)?$/.exec(document.location), + $header = $("#extended li.header"), + $label = $header.find("a.label"), + $date = $header.find("a.date"), + $size = $header.find("a.size"); + + $all = $header.find("a.label,a.date,a.size"); + orders = { + na: { + head: $label, + clas: "ascending", + fn: cmpName + }, + nd: { + head: $label, + clas: "descending", + fn: cmpNameRev + }, + da: { + head: $date, + clas: "ascending", + fn: cmpTime + }, + dd: { + head: $date, + clas: "descending", + fn: cmpTimeRev + }, + sa: { + head: $size, + clas: "ascending", + fn: cmpSize + }, + sd: { + head: $size, + clas: "descending", + fn: cmpSizeRev + } + }; + + sortBy(initialOrder ? initialOrder[1] : H5AI.core.settings.sortorder); + + $label + .attr("href", "#!/sort=na") + .append($ascending.clone()).append($descending.clone()) + .click(function () { + sortBy("n" + ($label.hasClass("ascending") ? "d" : "a")); + }); + + $date + .attr("href", "#!/sort=da") + .prepend($ascending.clone()).prepend($descending.clone()) + .click(function () { + sortBy("d" + ($date.hasClass("ascending") ? "d" : "a")); + }); + + $size + .attr("href", "#!/sort=sa") + .prepend($ascending.clone()).prepend($descending.clone()) + .click(function () { + sortBy("s" + ($size.hasClass("ascending") ? "d" : "a")); + }); + }; + + return { + init: init + }; + }()); + +}(jQuery, H5AI)); diff --git a/src/_h5ai/js/inc/Util.js b/src/_h5ai/js/inc/Util.js new file mode 100644 index 00000000..cc8791a3 --- /dev/null +++ b/src/_h5ai/js/inc/Util.js @@ -0,0 +1,115 @@ + +(function ($, H5AI) { + + H5AI.util = (function () { + + var reSplitPath = /^\/([^\/]+\/?)$/, + reSplitPath2 = /^(\/(?:.*\/)*?([^\/]+)\/)([^\/]+\/?)$/, + splitPath = function (pathname) { + + var match; + + if (pathname === "/") { + return { + parent: null, + parentname: null, + name: "/" + }; + } + match = reSplitPath2.exec(pathname); + if (match) { + return { + parent: match[1], + parentname: match[2], + name: match[3] + }; + } + match = reSplitPath.exec(pathname); + if (match) { + return { + parent: "/", + parentname: "/", + name: match[1] + }; + } + }, + rePathEndsWithSlash = /\/$/, + pathEndsWithSlash = function (pathname) { + + return rePathEndsWithSlash.test(pathname); + }, + getAbsHref = function (folder, tableRow) { + + var $a, isParentFolder, href; + + if (!pathEndsWithSlash(folder)) { + folder += "/"; + } + if (!tableRow) { + return folder; + } + $a = $(tableRow).find("td").eq(1).find("a"); + isParentFolder = ($a.text() === "Parent Directory"); + href = $a.attr("href"); + return isParentFolder ? undefined : folder + href; + }, + kilo = 1000.0, + reParseSize = /^\s*([\.\d]+)\s*([kmg]?)b?\s*$/i, + parseSize = function (str) { + + var match = reParseSize.exec(str), + val, unit; + + if (!match) { + return -1; + } + + val = parseFloat(match[1]); + unit = match[2].toLowerCase(); + if (unit === "k") { + val *= kilo; + } else if (unit === "m") { + val *= kilo * kilo; + } else if (unit === "g") { + val *= kilo * kilo * kilo; + } else if (unit === "t") { + val *= kilo * kilo * kilo * kilo; + } + return val; + }, + sizeUnits = ["B", "KB", "MB", "GB", "TB"], + formatSize = function (size) { + + var th = 1000.0, + i = 0, + maxI = sizeUnits.length - 1; + + if (isNaN(size)) { + return size; + } + + while (size >= th && i < maxI) { + size /= kilo; + i += 1; + } + return (i <= 1 ? Math.round(size) : size.toFixed(1)).toString() + " " + sizeUnits[i]; + }, + checkedDecodeUri = function (uri) { + + try { + return decodeURI(uri); + } catch (err) {} + return uri; + }; + + return { + splitPath: splitPath, + pathEndsWithSlash: pathEndsWithSlash, + getAbsHref: getAbsHref, + parseSize: parseSize, + formatSize: formatSize, + checkedDecodeUri: checkedDecodeUri + }; + }()); + +}(jQuery, H5AI)); diff --git a/src/_h5ai/js/inc/ZippedDownload.js b/src/_h5ai/js/inc/ZippedDownload.js new file mode 100644 index 00000000..12f81cc0 --- /dev/null +++ b/src/_h5ai/js/inc/ZippedDownload.js @@ -0,0 +1,110 @@ + +(function ($, H5AI) { + + H5AI.zippedDownload = (function () { + + var x = 0, + y = 0, + $document = $(document), + $selectionRect = $("#selection-rect"), + updateDownloadBtn = function () { + + var $selected = $("#extended a.selected"), + $downloadBtn = $("#download"), + query, href; + + if ($selected.size() > 0) { + $selected.each(function () { + href = $(this).attr("href"); + query = query ? query + ":" + href : href; + }); + query = H5AI.core.api() + "?action=zip&hrefs=" + query; + $downloadBtn.show().find("a").attr("href", query); + } else { + $downloadBtn.hide().find("a").attr("href", "#"); + } + }, + selectionUpdate = function (event) { + + var l = Math.min(x, event.pageX), + t = Math.min(y, event.pageY), + w = Math.abs(x - event.pageX), + h = Math.abs(y - event.pageY), + selRect; + + event.preventDefault(); + $selectionRect.css({left: l, top: t, width: w, height: h}); + + selRect = $selectionRect.fracs("rect"); + $("#extended a").removeClass("selecting").each(function () { + + var $a = $(this), + rect = $a.fracs("rect"), + inter = selRect.intersection(rect); + if (inter && !$a.closest(".entry").hasClass("folder-parent")) { + $a.addClass("selecting"); + } + }); + }, + selectionEnd = function (event) { + + event.preventDefault(); + $document.off("mousemove", selectionUpdate); + $selectionRect.hide().css({left: 0, top: 0, width: 0, height: 0}); + $("#extended a.selecting.selected").removeClass("selecting").removeClass("selected"); + $("#extended a.selecting").removeClass("selecting").addClass("selected"); + updateDownloadBtn(); + }, + selectionStart = function (event) { + + var view = $.fracs.viewport(); + + x = event.pageX; + y = event.pageY; + // only on left button and don't block the scrollbars + if (event.button !== 0 || x >= view.right || y >= view.bottom) { + return; + } + + event.preventDefault(); + if (!event.ctrlKey) { + $("#extended a").removeClass("selected"); + updateDownloadBtn(); + } + $selectionRect.show().css({left: x, top: y, width: 0, height: 0}); + selectionUpdate(event); + + $document + .on("mousemove", selectionUpdate) + .one("mouseup", selectionEnd); + }, + noSelection = function (event) { + + event.stopPropagation(); + return false; + }, + noSelectionUnlessCtrl = function (event) { + + if (!event.ctrlKey) { + noSelection(event); + } + }, + init = function () { + + if (H5AI.core.settings.zippedDownload) { + $("
        • downloaddownload
        • ") + .find("img").attr("src", H5AI.core.image("download")).end() + .appendTo($("#navbar")); + + $("body>nav,body>footer,#tree").on("mousedown", noSelection); + $("#extended").on("mousedown", "a", noSelectionUnlessCtrl); + $document.on("mousedown", selectionStart); + } + }; + + return { + init: init + }; + }()); + +}(jQuery, H5AI)); diff --git a/src/h5ai/js/inc/lib/amplify.min.js b/src/_h5ai/js/inc/lib/amplify.min.js similarity index 100% rename from src/h5ai/js/inc/lib/amplify.min.js rename to src/_h5ai/js/inc/lib/amplify.min.js diff --git a/src/h5ai/js/inc/lib/date.js b/src/_h5ai/js/inc/lib/date.js similarity index 100% rename from src/h5ai/js/inc/lib/date.js rename to src/_h5ai/js/inc/lib/date.js diff --git a/src/h5ai/js/inc/lib/jquery.fracs-core.min.js b/src/_h5ai/js/inc/lib/jquery.fracs-core.min.js similarity index 100% rename from src/h5ai/js/inc/lib/jquery.fracs-core.min.js rename to src/_h5ai/js/inc/lib/jquery.fracs-core.min.js diff --git a/src/_h5ai/js/inc/lib/jquery.min.js b/src/_h5ai/js/inc/lib/jquery.min.js new file mode 100644 index 00000000..3ca5e0f5 --- /dev/null +++ b/src/_h5ai/js/inc/lib/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7 jquery.com | jquery.org/license */ +(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"":"")+""),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
          a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
          ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
          t
          ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="
          "+""+"
          ";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&& +(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

          ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
          ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/",""],legend:[1,"
          ","
          "],thead:[1,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],col:[2,"","
          "],area:[1,"",""],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div
          ","
          "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after" +,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
          ").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/src/_h5ai/js/inc/lib/jquery.mousewheel.js b/src/_h5ai/js/inc/lib/jquery.mousewheel.js new file mode 100644 index 00000000..6e5732ab --- /dev/null +++ b/src/_h5ai/js/inc/lib/jquery.mousewheel.js @@ -0,0 +1,87 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.5 + * + * Requires: 1.2.2+ + */ + +(function($) { + +var types = ['DOMMouseScroll', 'mousewheel']; + +if ($.event.fixHooks) { + for ( var i=types.length; i; ) { + $.event.fixHooks[ types[--i] ] = $.event.mouseHooks; + } +} + +$.event.special.mousewheel = { + setup: function() { + if ( this.addEventListener ) { + for ( var i=types.length; i; ) { + this.addEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i=types.length; i; ) { + this.removeEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + } +}; + +$.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + }, + + unmousewheel: function(fn) { + return this.unbind("mousewheel", fn); + } +}); + + +function handler(event) { + var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; + event = $.event.fix(orgEvent); + event.type = "mousewheel"; + + // Old school scrollwheel delta + if ( event.wheelDelta ) { delta = event.wheelDelta/120; } + if ( event.detail ) { delta = -event.detail/3; } + + // New school multidimensional scroll (touchpads) deltas + deltaY = delta; + + // Gecko + if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaY = 0; + deltaX = -1*delta; + } + + // Webkit + if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } + if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + return ($.event.dispatch || $.event.handle).apply(this, args); +} + +})(jQuery); + + + diff --git a/src/h5ai/js/inc/lib/jquery.scrollpanel.js b/src/_h5ai/js/inc/lib/jquery.scrollpanel.js similarity index 92% rename from src/h5ai/js/inc/lib/jquery.scrollpanel.js rename to src/_h5ai/js/inc/lib/jquery.scrollpanel.js index a28ca98b..1e137f80 100644 --- a/src/h5ai/js/inc/lib/jquery.scrollpanel.js +++ b/src/_h5ai/js/inc/lib/jquery.scrollpanel.js @@ -1,9 +1,16 @@ +/*! + * jQuery.scrollpanel + * author: Lars Jung + * license: MIT + * + * bad and ugly coded! + */ -(function ($) { +(function (window, $) { "use strict"; - /*global window, jQuery */ - var init = function (htmlElement) { + var $window = $(window), + init = function (htmlElement) { var $element = $(htmlElement), $scrollbar, $drag, $wrapper, $content, mouseOffsetY, updateId, @@ -67,7 +74,7 @@ $element .mousewheel(function (event, delta) { - + $wrapper.scrollTop($wrapper.scrollTop() - 50 * delta); update(); event.stopPropagation(); @@ -94,12 +101,12 @@ mouseOffsetY = $drag.outerHeight() / 2; scroll(event); $scrollbar.addClass("dragOn"); - $(window) + $window .bind("mousemove", scroll) .one("mouseup", function (event) { $scrollbar.removeClass("dragOn"); - $(window).unbind("mousemove", scroll); + $window.unbind("mousemove", scroll); scroll(event); event.stopPropagation(); }); @@ -123,12 +130,12 @@ mouseOffsetY = event.pageY - $drag.offset().top; scroll(event); $scrollbar.addClass("dragOn"); - $(window) + $window .bind("mousemove", scroll) .one("mouseup", function (event) { $scrollbar.removeClass("dragOn"); - $(window).unbind("mousemove", scroll); + $window.unbind("mousemove", scroll); scroll(event); event.stopPropagation(); }); @@ -147,4 +154,4 @@ }); }; -}(jQuery)); +}(window, jQuery)); diff --git a/src/h5ai/js/libs.js b/src/_h5ai/js/libs.js similarity index 80% rename from src/h5ai/js/libs.js rename to src/_h5ai/js/libs.js index a0772a76..715bc562 100644 --- a/src/h5ai/js/libs.js +++ b/src/_h5ai/js/libs.js @@ -1,6 +1,6 @@ // @include "inc/lib/jquery.min.js" -// @include "inc/lib/jquery.mousewheel.min.js" +// @include "inc/lib/jquery.mousewheel.js" // @include "inc/lib/jquery.fracs-core.min.js" // @include "inc/lib/jquery.scrollpanel.js" diff --git a/src/_h5ai/js/main-js.js b/src/_h5ai/js/main-js.js new file mode 100644 index 00000000..2f6441bf --- /dev/null +++ b/src/_h5ai/js/main-js.js @@ -0,0 +1,29 @@ +/*jslint browser: true, confusion: true, regexp: true, white: true */ +/*jshint browser: true, confusion: true, regexp: false, white: false */ +/*global jQuery, amplify, H5AI_CONFIG */ + +(function ($) { + "use strict"; + + var H5AI = {}; + + // @include "inc/Util.js" + // @include "inc/Core.js" + // @include "inc/Sort.js" + // @include "inc/ZippedDownload.js" + + // @include "inc/Path.js" + // @include "inc/Connector.js" + // @include "inc/Html.js" + // @include "inc/Extended.js" + + $(function () { + + H5AI.extended.init(); + + H5AI.core.init(); + H5AI.sort.init(); + H5AI.zippedDownload.init(); + }); + +}(jQuery)); diff --git a/src/_h5ai/js/main-php.js b/src/_h5ai/js/main-php.js new file mode 100644 index 00000000..168ad520 --- /dev/null +++ b/src/_h5ai/js/main-php.js @@ -0,0 +1,25 @@ +/*jslint browser: true, confusion: true, regexp: true, white: true */ +/*jshint browser: true, confusion: true, regexp: false, white: false */ +/*global jQuery, amplify, H5AI_CONFIG */ + +(function ($) { + "use strict"; + + var H5AI = {}; + + // @include "inc/Util.js" + // @include "inc/Core.js" + // @include "inc/Sort.js" + // @include "inc/ZippedDownload.js" + + $(function () { + + H5AI.core.init(); + H5AI.sort.init(); + H5AI.zippedDownload.init(); + + $("#tree").scrollpanel(); + H5AI.core.shiftTree(false, true); + }); + +}(jQuery)); diff --git a/src/h5ai/js/modernizr.min.js b/src/_h5ai/js/modernizr.min.js similarity index 100% rename from src/h5ai/js/modernizr.min.js rename to src/_h5ai/js/modernizr.min.js diff --git a/src/h5ai/php/api.php b/src/_h5ai/php/api.php similarity index 100% rename from src/h5ai/php/api.php rename to src/_h5ai/php/api.php diff --git a/src/_h5ai/php/config.php b/src/_h5ai/php/config.php new file mode 100644 index 00000000..8602b824 --- /dev/null +++ b/src/_h5ai/php/config.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/src/h5ai/php/inc/Cache.php b/src/_h5ai/php/inc/Cache.php similarity index 100% rename from src/h5ai/php/inc/Cache.php rename to src/_h5ai/php/inc/Cache.php diff --git a/src/h5ai/php/inc/Crumb.php b/src/_h5ai/php/inc/Crumb.php similarity index 93% rename from src/h5ai/php/inc/Crumb.php rename to src/_h5ai/php/inc/Crumb.php index fd1fd78c..cb86ae6c 100644 --- a/src/h5ai/php/inc/Crumb.php +++ b/src/_h5ai/php/inc/Crumb.php @@ -41,7 +41,7 @@ class Crumb { $html .= "
        • \n"; $html .= "\t\n"; - $html .= "\t\t>" . $label . $hint . "\n"; + $html .= "\t\t>" . $label . "" . $hint . "\n"; $html .= "\t\n"; $html .= "
        • \n"; } diff --git a/src/h5ai/php/inc/Customize.php b/src/_h5ai/php/inc/Customize.php similarity index 100% rename from src/h5ai/php/inc/Customize.php rename to src/_h5ai/php/inc/Customize.php diff --git a/src/h5ai/php/inc/Extended.php b/src/_h5ai/php/inc/Extended.php similarity index 58% rename from src/h5ai/php/inc/Extended.php rename to src/_h5ai/php/inc/Extended.php index 67b00b8d..2b046ea2 100644 --- a/src/h5ai/php/inc/Extended.php +++ b/src/_h5ai/php/inc/Extended.php @@ -32,32 +32,10 @@ class Entry { return $this->isFolder; } - function compare($that, $sortOrder) { + public function toHtml() { - if ($this->isFolder && !$that->isFolder) { - return -1; - } - if (!$this->isFolder && $that->isFolder) { - return 1; - } - - $res = 0; - if ($sortOrder[ "column" ] === "name") { - $res = strcasecmp($this->absPath, $that->absPath); - } else if ($sortOrder[ "column" ] === "date") { - $res = $this->date - $that->date; - } else if ($sortOrder[ "column" ] === "size") { - $res = $this->size - $that->size; - } - if (! $sortOrder[ "ascending" ]) { - $res = -$res; - } - return $res; - } - - public function toHtml($dateFormat) { - - $classes = "entry " . $this->type; + $classes = "entry " . ($this->isFolder ? "folder " : "file ") . $this->type; + $imgClass = ""; $img = $this->type; $smallImg = $this->h5ai->icon($this->type); $bigImg = $this->h5ai->icon($this->type, true); @@ -78,7 +56,7 @@ class Entry { } } if ($this->h5ai->showThumbs() && in_array($this->type, $this->thumbTypes)) { - $classes .= " thumb"; + $imgClass = " class='thumb' "; $thumbnail = new Thumbnail($this->h5ai, $this->absHref, "square", 16, 16); $thumbnail->create(); $smallImg = file_exists($thumbnail->getPath()) ? $thumbnail->getHref() : $thumbnail->getLiveHref(); @@ -89,25 +67,15 @@ class Entry { $html = "\t
        • \n"; $html .= "\t\t\n"; - $html .= "\t\t\t" . $img . "\n"; - $html .= "\t\t\t" . $img . "\n"; + $html .= "\t\t\t" . $img . "\n"; + $html .= "\t\t\t" . $img . "\n"; $html .= "\t\t\t" . $this->label . $hint . "\n"; $html .= "\t\t\t\n"; - $html .= "\t\t\t" . $this->formatSize($this->size) . "\n"; + $html .= "\t\t\t" . $this->size . "\n"; $html .= "\t\t\n"; $html .= "\t
        • \n"; return $html; } - - - private function formatSize($size) { - - $units = array('B', 'KB', 'MB', 'GB', 'TB'); - for ($i = 0; $size >= 1024 && $i < 4; $i++) { - $size /= 1024; - } - return round($size, 0) . " " . $units[$i]; - } } @@ -140,40 +108,6 @@ class Extended { $absHref = $this->h5ai->getAbsHref() . rawurlencode($file); $this->content[$absPath] = new Entry($this->h5ai, $absPath, $absHref); } - - $this->sort(); - } - - public function cmpEntries($p1, $p2) { - - return $p1->compare($p2, $this->h5ai->getSortOrder()); - } - - public function sort() { - - uasort($this->content, array($this, "cmpEntries")); - } - - public function getFolderCount() { - - $count = 0; - foreach($this->content as $entry) { - if ($entry->isFolder()) { - $count++; - } - } - return $count; - } - - public function getFileCount() { - - $count = 0; - foreach($this->content as $entry) { - if (!$entry->isFolder()) { - $count++; - } - } - return $count; } public function toHtml() { @@ -182,10 +116,10 @@ class Extended { $html .= "
            \n"; $html .= $this->generateHeaders(); if ($this->parent !== null) { - $html .= $this->parent->toHtml($this->h5ai->getDateFormat()); + $html .= $this->parent->toHtml(); } foreach($this->content as $entry) { - $html .= $entry->toHtml($this->h5ai->getDateFormat()); + $html .= $entry->toHtml(); } $html .= "
          \n"; if (count($this->content) === 0) { @@ -197,23 +131,11 @@ class Extended { public function generateHeaders() { - $asc = "ascending"; - $desc = "descending"; - - $so = $this->h5ai->getSortOrder(); - $order = $so["ascending"] ? $asc : $desc; - $nameHref = "?col=name" . ($so["column"] === "name" && $so["ascending"] ? "&asc=false" : "&asc=true"); - $dateHref = "?col=date" . ($so["column"] === "date" && $so["ascending"] ? "&asc=false" : "&asc=true"); - $sizeHref = "?col=size" . ($so["column"] === "size" && $so["ascending"] ? "&asc=false" : "&asc=true"); - $nameSort = $so["column"] === "name" ? $order : ""; - $dateSort = $so["column"] === "date" ? $order : ""; - $sizeSort = $so["column"] === "size" ? $order : ""; - $html = "\t
        • \n"; $html .= "\t\t\n"; - $html .= "\t\tName$nameSort\n"; - $html .= "\t\t$dateSortLast modified\n"; - $html .= "\t\t$sizeSortSize\n"; + $html .= "\t\tName\n"; + $html .= "\t\tLast modified\n"; + $html .= "\t\tSize\n"; $html .= "\t
        • \n"; return $html; } diff --git a/src/h5ai/php/inc/H5ai.php b/src/_h5ai/php/inc/H5ai.php similarity index 69% rename from src/h5ai/php/inc/H5ai.php rename to src/_h5ai/php/inc/H5ai.php index 4e332956..f7abd0f9 100644 --- a/src/h5ai/php/inc/H5ai.php +++ b/src/_h5ai/php/inc/H5ai.php @@ -3,10 +3,14 @@ require_once "Cache.php"; class H5ai { - private static $SORT_ORDER = array("column" => "name", "ascending" => true); private static $VIEWMODES = array("details", "icons"); - private $docRoot, $h5aiRoot, $h5aiAbsHref, $domain, $options, $types, $cache, $absHref, $absPath, $ignore, $ignoreRE, $sortOrder, $dateFormat, $view; + private $docRoot, $h5aiRoot, $h5aiAbsHref, $domain, + $config, $options, $types, $langs, + $cache, + $absHref, $absPath, + $ignore, $ignoreRE, + $view; public function __construct() { @@ -17,58 +21,41 @@ class H5ai { $this->ignore = $H5AI_CONFIG["IGNORE"]; $this->ignoreRE = $H5AI_CONFIG["IGNORE_PATTERNS"]; - $this->options = $this->loadOptions($this->h5aiRoot . "/options.js"); - $this->types = $this->loadTypes($this->h5aiRoot . "/types.txt"); + $this->config = $this->loadConfig($this->h5aiRoot . "/config.js"); + $this->options = $this->config["options"]; + $this->types = $this->config["types"]; + $this->langs = $this->config["langs"]; + $this->cache = new Cache($this->h5aiRoot . "/cache"); - $this->h5aiAbsHref = $this->options["options"]["h5aiAbsHref"]; + $this->hrefRoot = $this->options["rootAbsHref"]; + $this->h5aiAbsHref = $this->options["h5aiAbsHref"]; $this->domain = getenv("HTTP_HOST"); $this->absHref = $this->normalizePath(preg_replace('/\\?.*/', '', getenv("REQUEST_URI")), true); - $this->absPath = $this->normalizePath($this->docRoot . rawurldecode($this->absHref), false); + $this->absPath = $this->getAbsPath($this->absHref); - $defaultSortOrder = $this->options["options"]["sortorder"]; - $this->sortOrder = array( - "column" => array_key_exists("col", $_REQUEST) ? $_REQUEST["col"] : $defaultSortOrder["column"], - "ascending" => array_key_exists("asc", $_REQUEST) ? $_REQUEST["asc"] !== "false" : $defaultSortOrder["ascending"] - ); - $this->view = array_key_exists("view", $_REQUEST) ? $_REQUEST["view"] : $this->options["options"]["viewmodes"][0]; + $this->view = $this->options["viewmodes"][0]; if (!in_array($this->view, H5ai::$VIEWMODES)) { $this->view = H5ai::$VIEWMODES[0]; } } - private function loadOptions($file) { + private function loadConfig($file) { $str = file_exists($file) ? file_get_contents($file) : ""; + + // remove comments and change expression to pure json $str = preg_replace("/\/\*.*?\*\//s", "", $str); + $str = preg_replace("/^.*H5AI_CONFIG\s*=\s*/s", "", $str); + $str = preg_replace("/;.*/s", "", $str); + $config = json_decode($str, true); - $optstr = preg_replace("/^.*h5aiOptions\s*=\s*/s", "", $str); - $optstr = preg_replace("/;.*/s", "", $optstr); - $options = json_decode($optstr, true); - - $langstr = preg_replace("/^.*h5aiLangs\s*=\s*/s", "", $str); - $langstr = preg_replace("/;.*/s", "", $langstr); - $langs = json_decode($langstr, true); - - return array("options" => $options, "langs" => $langs); + return $config; } - private function loadTypes($file) { - - $lines = file($file); - $types = array(); - foreach($lines as $line) { - if (substr($line, 0, 1) === '#') { - continue; - } - $types[] = preg_split("/\s+/", $line); - } - return $types; - } - public function getDocRoot() { return $this->docRoot; @@ -79,6 +66,11 @@ class H5ai { return $this->h5aiRoot; } + public function getHrefRoot() { + + return $this->hrefRoot; + } + public function getH5aiAbsHref() { return $this->h5aiAbsHref; @@ -96,27 +88,27 @@ class H5ai { public function api() { - return $this->h5aiAbsHref . "/php/api.php"; + return $this->h5aiAbsHref . "php/api.php"; } public function image($id) { - return $this->h5aiAbsHref . "/images/" . $id . ".png"; + return $this->h5aiAbsHref . "images/" . $id . ".png"; } public function icon($id, $big = false) { - return $this->h5aiAbsHref . "/icons/" . ($big ? "48x48" : "16x16") . "/" . $id . ".png"; + return $this->h5aiAbsHref . "icons/" . ($big ? "48x48" : "16x16") . "/" . $id . ".png"; } public function getOptions() { - return $this->options["options"]; + return $this->options; } public function getLangs() { - return $this->options["langs"]; + return $this->langs; } public function getAbsHref($absPath = null, $endWithSlash = true) { @@ -124,6 +116,10 @@ class H5ai { if ($absPath === null) { return $this->absHref; } + + // + $absPath=substr($absPath, strlen($this->docRoot)); + $absHref = preg_replace("!^" . $this->docRoot . "!", "", $absPath); $parts = explode("/", $absHref); $encodedParts = array(); @@ -131,6 +127,10 @@ class H5ai { $encodedParts[] = rawurlencode($part); } $endodedAbsHref = implode("/", $encodedParts); + + // + $endodedAbsHref = $this->hrefRoot . $endodedAbsHref; + return $this->normalizePath($endodedAbsHref, $endWithSlash); } @@ -139,22 +139,16 @@ class H5ai { if ($absHref === null) { return $this->absPath; } - return $this->normalizePath($this->docRoot . rawurldecode($absHref), false); - } - public function getSortOrder() { + // + $absHref=substr($absHref, strlen($this->hrefRoot)); - return $this->sortOrder; - } - - public function getDateFormat() { - - return $this->dateFormat; + return $this->normalizePath($this->docRoot . "/" . rawurldecode($absHref), false); } public function showThumbs() { - return $this->options["options"]["showThumbs"] === true; + return $this->options["showThumbs"] === true; } public function getTitle() { @@ -170,10 +164,10 @@ class H5ai { public function getType($absPath) { - foreach($this->types as $type) { - foreach(array_slice($type, 1) as $pattern) { - if ($this->endsWith($absPath, $pattern)) { - return $type[0]; + foreach($this->types as $type => $exts) { + foreach($exts as $ext) { + if ($this->endsWith($absPath, $ext)) { + return $type; } } } @@ -246,7 +240,7 @@ class H5ai { $cached = $this->cache->get($absHref); if ($cached === false) { - $folderStatus = $this->options["options"]["folderStatus"]; + $folderStatus = $this->options["folderStatus"]; if (array_key_exists($absHref, $folderStatus)) { $code = $folderStatus[$absHref]; } else { @@ -264,7 +258,11 @@ class H5ai { $h5aiContentType = "Content-Type: text/html;h5ai="; $host = getenv("HTTP_HOST"); $port = getenv("SERVER_PORT"); - $msg = "HEAD $absHref HTTP/1.1\r\nHost: $host\r\nConnection: Close\r\n\r\n"; + $msg = "HEAD $absHref HTTP/1.1\r\nHost: $host\r\nConnection: Close\r\n"; + if (isset($_SERVER['PHP_AUTH_USER'])) { + $msg .= "Authorization: Basic " . base64_encode($_SERVER['PHP_AUTH_USER'] . ":" . $_SERVER['PHP_AUTH_PW']) . "\r\n"; + } + $msg .= "\r\n"; $errno = ""; $errstr = ""; diff --git a/src/h5ai/php/inc/Image.php b/src/_h5ai/php/inc/Image.php similarity index 100% rename from src/h5ai/php/inc/Image.php rename to src/_h5ai/php/inc/Image.php diff --git a/src/h5ai/php/inc/Thumbnail.php b/src/_h5ai/php/inc/Thumbnail.php similarity index 100% rename from src/h5ai/php/inc/Thumbnail.php rename to src/_h5ai/php/inc/Thumbnail.php diff --git a/src/h5ai/php/inc/Tree.php b/src/_h5ai/php/inc/Tree.php similarity index 100% rename from src/h5ai/php/inc/Tree.php rename to src/_h5ai/php/inc/Tree.php diff --git a/src/h5ai/php/inc/ZipIt.php b/src/_h5ai/php/inc/ZipIt.php similarity index 100% rename from src/h5ai/php/inc/ZipIt.php rename to src/_h5ai/php/inc/ZipIt.php diff --git a/src/h5ai/php/main.php b/src/_h5ai/php/main.php similarity index 100% rename from src/h5ai/php/main.php rename to src/_h5ai/php/main.php diff --git a/src/h5ai.htaccess b/src/h5ai.htaccess new file mode 100644 index 00000000..10a0ea89 --- /dev/null +++ b/src/h5ai.htaccess @@ -0,0 +1,26 @@ +################################ +# h5ai %BUILD_VERSION% +# customized .htaccess +################################ + +# Options +Indexes +# Options +FollowSymLinks + +# pure JavaScript version +HeaderName /_h5ai/header.html +ReadmeName /_h5ai/footer.html + +# PHP version +# HeaderName /_h5ai/header.php +# ReadmeName /_h5ai/footer.php + +IndexIgnore _h5ai* + +IndexOptions Type=text/html;h5ai=%BUILD_VERSION% +IndexOptions Charset=UTF-8 +IndexOptions SuppressHTMLPreamble +IndexOptions SuppressRules +IndexOptions SuppressDescription +IndexOptions NameWidth=* +IndexOptions HTMLTable +IndexOptions XHTML diff --git a/src/h5ai/css/inc/html5reset.less b/src/h5ai/css/inc/html5reset.less deleted file mode 100644 index f2be7b27..00000000 --- a/src/h5ai/css/inc/html5reset.less +++ /dev/null @@ -1,140 +0,0 @@ - -/* HTML5 ✰ Boilerplate reset */ - -html, body, div, span, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, -small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, figcaption, figure, -footer, header, hgroup, menu, nav, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} - -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} - -blockquote, q { quotes: none; } -blockquote:before, blockquote:after, -q:before, q:after { content: ""; content: none; } -ins { background-color: #ff9; color: #000; text-decoration: none; } -mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } -del { text-decoration: line-through; } -abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } -table { border-collapse: collapse; border-spacing: 0; } -hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } -input, select { vertical-align: middle; } - -body { font:13px/1.231 sans-serif; *font-size:small; } -select, input, textarea, button { font:99% sans-serif; } -pre, code, kbd, samp { font-family: monospace, sans-serif; } - -/* -html { overflow-y: scroll; } -*/ -a:hover, a:active { outline: none; } -ul, ol { margin-left: 2em; } -ol { list-style-type: decimal; } -nav ul, nav li { margin: 0; list-style:none; list-style-image: none; } -small { font-size: 85%; } -strong, th { font-weight: bold; } -td { vertical-align: top; } -sub, sup { font-size: 75%; line-height: 0; position: relative; } -sup { top: -0.5em; } -sub { bottom: -0.25em; } - -pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; } -textarea { overflow: auto; } -.ie6 legend, .ie7 legend { margin-left: -7px; } -input[type="radio"] { vertical-align: text-bottom; } -input[type="checkbox"] { vertical-align: bottom; } -.ie7 input[type="checkbox"] { vertical-align: baseline; } -.ie6 input { vertical-align: text-bottom; } -label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; } -button, input, select, textarea { margin: 0; } -input:valid, textarea:valid { } -input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; } -.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; } - - -::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; } -::selection { background:#FF5E99; color:#fff; text-shadow: none; } -a:link { -webkit-tap-highlight-color: #FF5E99; } -button { width: auto; overflow: visible; } -.ie7 img { -ms-interpolation-mode: bicubic; } - -body, select, input, textarea { color: #444; } -h1, h2, h3, h4, h5, h6 { font-weight: bold; } -a, a:active, a:visited { color: #607890; } -a:hover { color: #036; } - - -/** - * Primary styles - * - * Author: - */ - - - - - - - - - - - - - - -.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } -.hidden { display: none; visibility: hidden; } -.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } -.visuallyhidden.focusable:active, -.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } -.invisible { visibility: hidden; } -.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } -.clearfix:after { clear: both; } -.clearfix { zoom: 1; } - - -@media all and (orientation:portrait) { - -} - -@media all and (orientation:landscape) { - -} - -@media screen and (max-device-width: 480px) { - - /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */ -} - - -@media print { - * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; - -ms-filter: none !important; } - a, a:visited { color: #444 !important; text-decoration: underline; } - a[href]:after { content: " (" attr(href) ")"; } - abbr[title]:after { content: " (" attr(title) ")"; } - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } - pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } - thead { display: table-header-group; } - tr, img { page-break-inside: avoid; } - @page { margin: 0.5cm; } - p, h2, h3 { orphans: 3; widows: 3; } - h2, h3{ page-break-after: avoid; } -} - -/* END - HTML5 ✰ Boilerplate */ diff --git a/src/h5ai/header.html b/src/h5ai/header.html deleted file mode 100644 index 11cd52a7..00000000 --- a/src/h5ai/header.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - Directory index · styled with h5ai - - - - - - - - - - -
          - -
          -
          -
          - diff --git a/src/h5ai/icons/16x16/folder-home.png b/src/h5ai/icons/16x16/folder-home.png deleted file mode 100644 index c1b53c4db279bc05b9ad6f617402cc21dd820929..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 637 zcmV-@0)qXCP)b`M zQwjk~3yYK%{sk#41uF|1i(F-qm@0&eX`>(#(SS%q$>lD)o4tK+b}V9!Y&Hack7?d~ zGxOuU@l=&pPj9{j9+KC)OOx5`{PT|~7s&h9KyO^Vj4>Vns<8XxH~m2z;o%BZihAgq z$1k>@c$+UD+}{55eLZN@i=67YQ&p8XinHt2uH5mhm8JWSo>8q&UgWf(B-}TjV*th{gD0L`MmmYaLq62`av!;u~7c2{zX{L`Mn69~<%3jT~4!^@x*{jg=0~ zsVbF{IbH}=DkVd6s>;Snhd4>`)FX5DlmmC%F$fyW%q@@%1wC_;p)fPIKoB&J9k`r> z6q|(f_jXVbKu6O@fubVx_ja&JIC_J^FK8wtL&u+k{I?~kpjn=^BKXz`*{RE6d_eo| zd|@w6a;I7A1mB5l^?Lj5Mi2nd|Ml(M;2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4$ra&lc|N{Ksr%WpUtL{DXu$9fc)@<)($! zVexFS3RVdn9WoL*>%-YAJ1+|8efROb{QPpf_L{A8Wbw?)YPQ(#=J;c;+bw#d`|sr2%$7G^*J}1~wxt_=-n?YeW#j+%v{X{nC{j^itfjx5u1dyz=^M=c#6nj@?h4 z{O-)j+d1>`@e$RM*;@k~V*D0vDO_@m?e1r%sfm0}3E<*t>h#PE!rV-cg^`~}KB7yi2hXYMth>!KvM>P@Ab*X*u0nZbMND{R~z hv`VauT}s6 diff --git a/src/h5ai/icons/16x16/folder-page.png b/src/h5ai/icons/16x16/folder-page.png deleted file mode 100644 index 3f7143a35f3ac49e5bd0db15199f1faa2aea04ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)6Ti2bnf`l=O6F=$=W#2xx%i_Iig-<4;`F2;b|?+GuLlZtxav`bPWB!?b7nc zr%g|cG^`E@f2{&guI$9~cI7)-LlTFB**4+rs3Argo;E_#3(|*5bq@;<@22;13HDC! z=h&%B#2Y~>l9&K(1W$_~MyCbVTI&7;r?1Wdu=x5u{q8Cs-oE7M$@BDk?UbuU@Qkro zv-MNXN-oBUrCKTRXKe*kImb1|;%Os@=t2RbH<-O}6BN9A@c?J@Ty0VZSpl2IsPhv5 zzdn=ZvfM2PxgAIvhxwx1h=YP1IKi*)OV7i%@g0o(!cgGV!eg?i`xAp5WF3eMM##<; zM;&I*UZV(c)X8xNBZ#zupxv1CeE_<@zZVvdB3xg`h_t*!yZJ9)zco=b{;P5bN6RTS Z{}1nEHZkNl`kDX$002ovPDHLkV1k_T1PcHF diff --git a/src/h5ai/icons/16x16/folder.png b/src/h5ai/icons/16x16/folder.png deleted file mode 100644 index 4a3815c050ac4bed616e9b21e678b43e8bd3b299..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4l|4#D{SLoCwCj2w)rhD_j;N@}sEC-%hx#6gnlY(~$?xSiT->r; zq3Jez4V~ipQcV0= zn9f9%)zQ^6_;&kxW>?ipvM=sle1yyUjfVTb9}ieJ1S__vZadPn>cpNi3;~5~NsX$4 z9Fxr%7(7^}-8@+MczK=Z=4Mr~jx9b1=5yX++$Xf5Gw9gM(G}ABazEpnbL)>QZki_y3`Pb|S3j3^P6 z$|8aV3j`8k%L0iFi$YZip-O;MRcaT&h6Pd)AP|C81qDG>5K$K`nFO0hh$qle#c|@a zevj>$dp;KDoco$P_BfLv<&%!@o%=ZF|3BaJoNG~4{-4F%YXGB4RCZBBB484z4$;Rx z&{5Ui-2^tQ^bzpj=U@Kiv(G+!`qZb5F{LDfZ0~g5_`&lpd{RXIuB!3akPZ+j`hbW` z0cWrN@q2&hZQqPI#7ClIO_txbzxnuQp7<=VIS!C|fTNbpZWWmBZoL)lZLc5R`}PLM zr{DY7_rLkYPjotaD|ZgFU-m8WQ{VYvTSRt&?J^CQXQDn!CMKDj znFqNWu=BFJueV=aSo+qNzW)4=f!jqAWf~B`bhg&n-CP@Tm^C)vS{@Z^shG;d?1OW& zj|0C0c7Uzy{Tu-iF*pLUdh2a=)^Cpm)KR7JZkY#80@p=kM^$aOmza=t1)U7M8RmvTs>&X#)UD8W+IRWt=64e z7krW`It&l4AAg!7W8lg z#6(+T1Yiu!bviwTF+7yRhvJz+3N>4#IUs3qS>6F*_@!g z*h0k&^=>eizVWlBl$pgm0gW>+r7znoi9;GxSo%wgsrrPUIi*>z(q3pGQJpuJmUwgN zpWM2B12E0|VI zG1gifp7Q4s3P}vL_!q!EKPU=04FF)n6008(dH73dgKNiIHP&#?(Tsa`t|}ef1*ALg(Pd; z1c$OervXvhOEnPCs^)zli_b({TWHa!S18*2VKP~dxVrEv4?XfIs@?L3R5Q6CXrKoJ zqL8<USjar4PmoI`w>G(D?eg>DuHfKUvCocGaFMc$HQK(GR zxOshVw%F#1b+LvCYRvTvbaj^9Ex}1Lhhp@d}Ka@>?r}a?khrXCQEDz*oKZMZU?q;IA zs5axCAG$~@7u6Ws>(JZtyCsD+aXu31z&rpTHX&e=z9c!r{mR5?RmG0DJ#SU9F@^k* zS=wY)G@6zY<+YH82!tZR_ElUqE=p2*A0haciCUEMjGP0XkQkhaE5u2ykzG@V&5c|V z)?OM(M#FC*_AOk?Kau8!q&lENi4$XUKH$wInSIH1Y?JbObOJ8E7yAhdn^00X0tZ#2 z;^MMRs!z$45`}s3rlySM1Id0vnJFe)JQ*!WD3S971R&NJ2~Mf_MZ6>(^$`eF;wS`E z4>3i*GvP^C5)JehbIvi7d#Ep?OLs@Zj0{;?QGmR>N1c6Z>PQ>k}q8f zPMmJxL=7L?+;B^>p!-B!YV?i3uyANa!P=fPG_SbN$ru$(gVQ zF53Qh_C))obiTYZ|7T@;9hc2=tNUGGp4|E?(!gZoP3k77WKtBt~M!garc5$=cUgd~;S zVNf5|!}a{~HTg}rZh3uqZS&U`mR|q)@Bi@47_UKHj|hKlhyf`FQV%s`7u9C~E-sEBQ`eibx(91`0i#V*{wEYGW&b z^(t)&IPkl^JALB4{f|EUViZLkmGrW9w|4d8PtQCrB9~Rw^bKhjkyZ|f$OFK^-@g6e z`$qLvo=rHCA1ZNkg|D7D`sT~3y4pvq9i@{34*^eJI&=KoM)h`2Cn=8YZv61mm6z(e zabqjNRjWqdJ$dT)N`-Y`O;zL8W4bBu)cG%teZ9WA(9=S>!Z5>QyFj)Ac3Rf!x={Z4 z%JJ9VKJ^)}(5gfy{}w=M)e5!Ml^&N_VRdQ#ezA6xC|8)=JN4i(UFMd|1He#- zIpKf{pSx#gXWu_`=+Fy|MgwC89u+%E6h-9oc`jVI@a5sdhu;AH_IW2%padLPTwMI7 zP$-l##M@Qs_4?|>#KaNcS0A!N4h#bm#+Xv2Qpp71W>PE`OTYvcYnuW&pg2E2PrY8x z0N&vSSgb%x6dE5NE#&IA7%$c-=3IX0Lu~(7qM#Jc7*$%fO272Zn&jv29GK8WcraPNaZ} z9rS7V^ZWJE>no~;v2C&)m~@yE4iteR#zR-cy(YUa;R*X?jevJ54mKV>pqP5CiI+5q zBQ-H<6cI&5?2I5NX%`wm8>*VPkgA^*jbjKp$$a`hCa{1y*j9X(G)`&gd4PEK4pJ;&3*J~vd9A+6mT3!0HrK|#t>M*a=`6=CV9-ejtNG03!uihzQ7NICA?(*^K-72=D?Ze!iVHx4w}ARODB*yjT@*-2 zY)p(uK*1TS>3fHjpZrEM)LsWN>K)u^_8p@}8Bg;9HG z9HTf6c-IMBXs|Z$J#mXGwMd%8z7`U3jf~&@j7c08c9K@2Ef1tBhvY++Hv+?qtf+L) z#JOhCgtdYTpUur5Tp~+e1MmTcoPU$%fU)UXLJrW+CVn#sEU&hu^woivb_G0%6NNLr zG#A`K()JM5Qp{;=V{PI#lCAqEqD^S0wbhse2O^xC{o^7~ahMYeRDo-soV_^H zh#7hA>3#e6OpT4&zCf_oeqCK8QOhg{{y5ryCtZx$8Ar;nT{P(#MKw;^$gA^9D`$V4 zoBMp`ml@!i!)))+h+SzXa1eL`*avLiVxPEQSpw#OOTcB|hN^0Kiz&k1{g?tq>Fqg* zK}sF#I`hDyf2^U?jqW_wweI~P)Fzf;}i?wNRIoEiKW#}2VQY)~A=L5hfy z$gnWNQWh+bvVb*0tdT(?JCX$mSOE)IAjC@u!6E`DGO`^|Lb6Cayc8LE9NAG4Pn>aV z_w;MJy6$07_g39{^i1dBu{m;2S9jmXe_sDNx5}cb{69-@y8(PysaJg|B6VN_*fz!* z1E8m>!;cc!xKdKUf}el>k3aa~Cl2oaVjw}Kl1@6^-Wxyr`7@7;$ZM(^-!h~lM2a~e zB2&QO3xE6ZUx%HmbvDV7dSg2)*UfW}ed$|I0Bg4bq;8O?Ro2}GOh@ha>g%1Go3Gw! zF*m*U*iWDS>alLO_s$20S(fz}^PM04a#=+BK&Q&XRUViF9$NatiIeN?)v-3Jg%eE7 z%!7Osu=CO%=(Sh=v;5T8p8UmcfNMo1syrY-&}-kMzjkBHZEmpk-jxrFwNipwICo&z z+zH?`&;{E5?>PlTBp^{hR^Po&_vW=*0_y$BU3beoum^ZsM7pYK+;3?JiAe3yM<3kv z{U^Wv?LG5*pO~JW{+JzdD zpm78+L%{=fnwK^<4n@3>ybYpBETtHQBfa!_v&)W+%e zK+O;{T*qU;4F-EaRZ%slNjzXo3|<$V_kb~|f=Ci?St01!1+TXn$QSOpb}-R6lJKh!2o6_Xg)wf#jF8WswTSnIoToGGEkAWi{e2x<+M&iKo{0i_{KV+4NH|$28Rb2lQWJgIQ$D~P%Ytri=Y;f-Ev(z^U zp?elS$<*{@X@2f@k9Q_c{&^nQpc308_9lvBBxfm)MqO;$>v+&*v7(Tb#2BJ}t2Ey> zX+;gZ<}zugy(BIvfZDiJ6+{FGZ1hwdC2ixEUB@uSz1`H>Rr5<@)5gm?6Xc%=_(@zN zw!MZkx+FPJJjNw^dLa-SYPBZk&OWzk2<<(1KT}hU()=O|c{}B5fo=0^R3vfIjhYz5 z)c|brmObE6nr#<4EIzh53#rCLy;f;{^-(iRZr2l;0+wG@~I0A7}6F)W=MMV*3`KlVQm6A(j+|9M>yApVPxwE$D?NuOGgHl>A zE1-b6ywYmz-#Iy*p)V|OyTpU=#!9P2!oRuGeIIC@dimmc3A_V~xkFwyDkKn2y?pUJ z(6X3Q4|IXoe|ze+GsDlSnF8QCu2Ft7;RM{*DTPLi9zCEy>xzg6`r z_h0NF(gMax^W%>V!Z M07*qoM6N<$g1G7iwg3PC diff --git a/src/h5ai/icons/48x48/folder.png b/src/h5ai/icons/48x48/folder.png deleted file mode 100644 index c4cc0c8425879102892a8852926c6ce6183097b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1550 zcmV+p2J!icP)Fj z-<#J)+c#4W+`PP*$;|(M@A;pPI}ugo|7=;^0It>g$_|Q1A20|Etm7Ulz@n7ajxVdjV3fAk?zi9RP+`n-}|*TeDZcduxs@!?!)~?ki6{ zxVX4H{oi4B+KM6H|JM7HBC-Uu%2v2+1xA7Uj(_&t7t76=bv>xjKgi(7ILP&Yo!Zih zUik6EsaKzV>EMUJg?18UDbD8;zQ`d^M)UrnZ=pAFD`+#qN1)v$9 zPY8%eh9w{~e_vu@_CilU{ad^FRv8Dj0e^|ef~p#SF1V10H1_PdXY9?FpLucH*!bf^ z!^2zLCB5*Bb(uy#n{#tB=ccDVd3OKXuN^&leA>H`s461T0LBh|^v3J=?!NQM<+*9{ z)ddg_KBCZTHky7>096|O8`&^C#!n|EKX~|wea{2uRMq%Q+z)J?*tLCcYi5$Ql_mv$ zK?M-8gB}m}92NU)Ph@SSNo!`3iCx?G0-JG3))Tl1*g7;xSjsja9<{;t$U_|rPF!O?j8@Cj9Px&p>v zqmpN8hkzBbLS08yhs z2NryWUjw4zR;5Jtfm(x~Y&W91c5fXt{#!e=66@Bft*b4~@3fNdTyI8YK301!26M5VU9Mm5zymD@<_ z6RAcku;zeSOFJ@Sq7Vv@xumYt;X|6_0*9?jA`?K2<`~TpuMt1{HEBR2A*<7YDZ*%p z3*`pQZ7rl?5Xr0;xlB+kexH%s5?O9M0b&9|hX!2nqdtt*U{MX^i9{OcSbLN)*mN<@rFG~nDN%zo98s0gF> z!xFesH7d5HG@<&Gq?D*3kcKUuXcfel$kt*PBG(-8UBBX*cnLSE$KsMgF@zQ9%*3`Q z4(Cu;Le#Z8>UTui-H9$MkXe$Nx{XSa)@!kL@B&@RX}ku)jMo%CJ1o+INcv*6b5|lX zGm-DtMI_N)u}eX>T?w$gXVH9xL{O_0l_|bR=pdkgIXgW+yJO4Xh_CJG%=W-)Off<;QO)qri!p#AS;paGlP7^WhdHdk0&x1{uYWm` z=Vs&HJrg^3j^DD$HZ)>8G!fU}WVSZ)-;vPx*yHZJKaOk6lN|~70g5>vpee^XiZqPu~8XLh6gCyN1A+h2751HM=MNo|poF8}}l07*qoM6N<$f+^X~ Am;e9( diff --git a/src/h5ai/js/inc/Connector.js b/src/h5ai/js/inc/Connector.js deleted file mode 100644 index ab644855..00000000 --- a/src/h5ai/js/inc/Connector.js +++ /dev/null @@ -1,143 +0,0 @@ -/*global $, H5aiJs */ - -H5aiJs.factory.Connector = function () { - - var contentTypeRegEx = /^text\/html;h5ai=/, - pathnameStatusCache = {}, - fetchStatus = function (pathname, callback) { - - if (H5aiJs.h5ai.settings.folderStatus[pathname]) { - callback(H5aiJs.h5ai.settings.folderStatus[pathname]); - return; - } else if (pathnameStatusCache[pathname]) { - callback(pathnameStatusCache[pathname]); - return; - } - - $.ajax({ - url: pathname, - type: "HEAD", - complete: function (xhr) { - - var status = xhr.status; - - if (status === 200 && contentTypeRegEx.test(xhr.getResponseHeader("Content-Type"))) { - status = "h5ai"; - } - pathnameStatusCache[pathname] = status; - callback(status); - } - }); - }, - updatePath = function (path) { - - if (path.isFolder && !path.isParentFolder && path.status === undefined) { - fetchStatus(path.absHref, function (status) { - - if (status !== "h5ai") { - path.status = status; - } - H5aiJs.html.updateHtml(path); - H5aiJs.h5ai.linkHoverStates(); - }); - } - }, - updatePaths = function () { - - $.each(H5aiJs.pathCache.cache, function (ref, cached) { - updatePath(cached); - }); - }, - fetchStatusAndContent = function (pathname, includeParent, callback) { - - fetchStatus(pathname, function (status) { - - if (status !== "h5ai") { - callback(status, {}); - return; - } - - $.ajax({ - url: pathname, - type: "GET", - dataType: "html", - error: function (xhr) { - - callback(xhr.status, {}); // since it was checked before this should never happen - }, - success: function (html, status, xhr) { - - var content = {}; - - if (!contentTypeRegEx.test(xhr.getResponseHeader("Content-Type"))) { - callback(xhr.status, {}); // since it was checked before this should never happen - return; - } - - $(html).find("#table td").closest("tr").each(function () { - - var path = H5aiJs.pathCache.getPath(pathname, this); - - if (path.isFolder && (!path.isParentFolder || includeParent)) { - content[path.absHref] = path; - updatePath(path); - } - }); - callback("h5ai", content); - } - }); - }); - }, - fetchPath = function (pathname, callback) { - - fetchStatusAndContent(pathname, false, function (status, content) { - - var path = H5aiJs.pathCache.getPath(pathname); - - path.status = status; - path.content = content; - callback(path); - }); - }, - fetchTree = function (pathname, callback, childPath) { - - fetchPath(pathname, function (path) { - - var parent = H5aiJs.pathCache.splitPathname(pathname)[0]; - - path.treeOpen = true; - if (childPath) { - path.content[childPath.absHref] = childPath; - } - if (parent === "") { - callback(path); - } else { - fetchTree(parent, callback, path); - } - }); - }, - populateTree = function () { - - fetchTree(document.location.pathname, function (path) { - $("#tree") - .append(H5aiJs.html.updateTreeHtml(path)) - .scrollpanel() - .show(); - H5aiJs.h5ai.shiftTree(false, true); - H5aiJs.h5ai.linkHoverStates(); - setTimeout(function () { $("#tree").get(0).updateScrollbar(); }, 1); - }); - }, - init = function () { - - if (H5aiJs.h5ai.settings.showTree) { - updatePaths(); - populateTree(); - } - }; - - return { - fetchStatusAndContent: fetchStatusAndContent, - init: init - }; -}; diff --git a/src/h5ai/js/inc/Extended.js b/src/h5ai/js/inc/Extended.js deleted file mode 100644 index 03d46a4e..00000000 --- a/src/h5ai/js/inc/Extended.js +++ /dev/null @@ -1,112 +0,0 @@ -/*global $, H5aiJs */ - -H5aiJs.factory.Extended = function () { - - var settings = { - customHeader: "h5ai.header.html", - customFooter: "h5ai.footer.html" - }, - initTitle = function () { - - document.title = document.domain + document.location.pathname; - try { - document.title = decodeURI(document.title); - } catch (err) {} - }, - initBreadcrumb = function () { - - var $ul = $("body > nav ul"), - pathname = "/", - path = H5aiJs.pathCache.getPath(pathname), - pathnameParts = document.location.pathname.split("/"); - - $ul.append(H5aiJs.html.updateCrumbHtml(path)); - - $.each(pathnameParts, function (idx, part) { - if (part !== "") { - pathname += part + "/"; - $ul.append(H5aiJs.html.updateCrumbHtml(H5aiJs.pathCache.getPath(pathname))); - } - }); - }, - initExtendedView = function () { - - var $ths = $("#table th"), - $label = $ths.eq(1).find("a"), - $date = $ths.eq(2).find("a"), - $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" : 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 = $("
          a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
          ",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
          t
          ",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem -)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

          ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
          ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(W(c[0])||W(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/",""],legend:[1,"
          ","
          "],thead:[1,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],col:[2,"","
          "],area:[1,"",""],_default:[0,"",""]};bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
          ","
          "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument|| -b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/)<[^<]*)*<\/script>/gi,bP=/^(?:select|textarea)/i,bQ=/\s+/,bR=/([?&])_=[^&]*/,bS=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bT=f.fn.load,bU={},bV={},bW,bX;try{bW=e.href}catch(bY){bW=c.createElement("a"),bW.href="",bW=bW.href}bX=bS.exec(bW.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bT)return bT.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
          ").append(c.replace(bO,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bP.test(this.nodeName)||bJ.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bG,"\r\n")}}):{name:b.name,value:c.replace(bG,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bW,isLocal:bK.test(bX[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bZ(bU),ajaxTransport:bZ(bV),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?ca(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=cb(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bI.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bH,"").replace(bM,bX[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bQ),d.crossDomain==null&&(r=bS.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bX[1]&&r[2]==bX[2]&&(r[3]||(r[1]==="http:"?80:443))==(bX[3]||(bX[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bU,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bL.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bN.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bR,"$1_="+x);d.url=y+(y===d.url?(bN.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bV,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bE,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq,cr=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
          ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/src/h5ai/js/inc/lib/jquery.mousewheel.min.js b/src/h5ai/js/inc/lib/jquery.mousewheel.min.js deleted file mode 100644 index 05ebb0a9..00000000 --- a/src/h5ai/js/inc/lib/jquery.mousewheel.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. - * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. - * - * Version: 3.0.2 - * - * Requires: 1.2.2+ - */ -(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery); \ No newline at end of file diff --git a/src/h5ai/js/main-js.js b/src/h5ai/js/main-js.js deleted file mode 100644 index d0cd2b38..00000000 --- a/src/h5ai/js/main-js.js +++ /dev/null @@ -1,37 +0,0 @@ - -(function($) { - "use strict"; - - var H5aiJs = { - factory: {}, - init: function () { - - this.h5ai = new this.factory.H5ai(h5aiOptions, h5aiLangs); - this.pathCache = new this.factory.PathCache(); - this.connector = new this.factory.Connector(); - this.html = new this.factory.Html(); - this.extended = new this.factory.Extended(); - - this.extended.init(); - this.connector.init(); - this.h5ai.init(); - - $.h5ai = { - click: $.proxy(this.h5ai.pathClick, this.h5ai) - }; - } - }; - - // @include "inc/H5ai.js" - // @include "inc/Path.js" - // @include "inc/PathCache.js" - // @include "inc/Connector.js" - // @include "inc/Html.js" - // @include "inc/Extended.js" - - $(function () { - - H5aiJs.init(); - }); - -}(jQuery)); diff --git a/src/h5ai/js/main-php.js b/src/h5ai/js/main-php.js deleted file mode 100644 index 59974fc0..00000000 --- a/src/h5ai/js/main-php.js +++ /dev/null @@ -1,28 +0,0 @@ - -(function($) { - "use strict"; - - var H5aiJs = { - factory: {}, - init: function () { - - this.h5ai = new this.factory.H5ai(h5aiOptions, h5aiLangs); - - this.h5ai.init(); - $("#tree").scrollpanel(); - this.h5ai.shiftTree(false, true); - - $.h5ai = { - click: $.proxy(this.h5ai.pathClick, this.h5ai) - }; - } - }; - - // @include "inc/H5ai.js" - - $(function () { - - H5aiJs.init(); - }); - -}(jQuery)); diff --git a/src/h5ai/options.js b/src/h5ai/options.js deleted file mode 100644 index a787a4fa..00000000 --- a/src/h5ai/options.js +++ /dev/null @@ -1,333 +0,0 @@ -/* - * h5ai %BUILD_VERSION% - * Options and localization - */ - -h5aiOptions = { - - /* - * The absolute link to h5ai. - * Don't change this unless you know what you are doing. - */ - "h5aiAbsHref": "/h5ai", - - /* - * An array of view modes the user may choose from. Currently there - * are two possible values: "details" and "icons". The first value - * indicates the default view mode. If only one value is given the - * view mode is fixed and the selector buttons are hidden. - * The user selected view mode is also stored local in modern browsers - * so that it will be persistent. - */ - "viewmodes": ["details", "icons"], - - /* - * Default sort order. Valid values for column are "name", "date" and - * "size". - * If you are using the JavaScript version please make sure to change - * IndexOrderDefault in js.htaccess as well. - */ - "sortorder": { - "column": "name", - "ascending": true - }, - - /* - * Show a folder tree, boolean. - * Note that this tree might have side effects as it sends HEAD requests - * to the folders, and therefore will invoke index.php scripts. Use - * folderStatus below to avoid such requests. - * It might also affect performance significantly. - */ - "showTree": true, - - /* - * Slide tree bar into viewport if there is enough space, boolean. - */ - "slideTree": true, - - /* - * Associative array of folders and their HTTP status codes to - * 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": {}, - - /* - * Localization, for example "en", "de" etc. - see h5aiLangs below for - * possible values. Adjust it to your needs. If lang is not found in - * h5aiLangs it defaults to "en". - */ - "lang": "en", - - /* - * Try to use browser language, falls back to previous specified lang. - */ - "useBrowserLang": true, - - /* - * Set parent folder labels to real folder names. - */ - "setParentFolderLabels": true, - - /* - * Link the hover effects between crumb, extended view and tree. - */ - "linkHoverStates": true, - - /* - * Date format in detailed view, for example: "yyyy-MM-dd HH:mm:ss" - * Syntax as specified by date.js - * http://code.google.com/p/datejs/wiki/FormatSpecifiers - */ - "dateFormat": "yyyy-MM-dd HH:mm", - - /* - * Requieres PHP on the server. - * Show thumbnails in icons view. - */ - "showThumbs": false, - - /* - * Requieres PHP on the server. - * Enable zipped download of selected entries. - */ - "zippedDownload": false -}; - - - -/* - * Available translations. -*/ -h5aiLangs = { - - "en": { - "lang": "english", - "details": "details", - "icons": "icons", - "name": "Name", - "lastModified": "Last modified", - "size": "Size", - "parentDirectory": "Parent Directory", - "empty": "empty", - "folders": "folders", - "files": "files", - "download": "download" - }, - - "bg": { - "lang": "български", - "details": "детайли", - "icons": "икони", - "name": "Име", - "lastModified": "Последна промяна", - "size": "Размер", - "parentDirectory": "Предходна директория", - "empty": "празно", - "folders": "папки", - "files": "файлове", - "download": "download" - }, - - "cs": { - "lang": "čeština", - "details": "podrobnosti", - "icons": "ikony", - "name": "Název", - "lastModified": "Upraveno", - "size": "Velikost", - "parentDirectory": "Nadřazený adresář", - "empty": "prázdný", - "folders": "složek", - "files": "souborů", - "download": "download" - }, - - "de": { - "lang": "deutsch", - "details": "Details", - "icons": "Icons", - "name": "Name", - "lastModified": "Geändert", - "size": "Größe", - "parentDirectory": "Übergeordnetes Verzeichnis", - "empty": "leer", - "folders": "Ordner", - "files": "Dateien", - "download": "Download" - }, - - "es": { - "lang": "español", - "details": "Detalles", - "icons": "Íconos", - "name": "Nombre", - "lastModified": "Última modificación", - "size": "Tamaño", - "parentDirectory": "Directorio superior", - "empty": "vacío", - "folders": "folders", - "files": "files", - "download": "download" - }, - - "fr": { - "lang": "français", - "details": "détails", - "icons": "icônes", - "name": "Nom", - "lastModified": "Dernière modification", - "size": "Taille", - "parentDirectory": "Dossier parent", - "empty": "vide", - "folders": "Répertoires", - "files": "Fichiers", - "download": "télécharger" - }, - - "it": { - "lang": "italiano", - "details": "dettagli", - "icons": "icone", - "name": "Nome", - "lastModified": "Ultima modifica", - "size": "Dimensione", - "parentDirectory": "Cartella Superiore", - "empty": "vuota", - "folders": "cartelle", - "files": "file", - "download": "download" - }, - - "lv": { - "lang": "latviešu", - "details": "detaļas", - "icons": "ikonas", - "name": "Nosaukums", - "lastModified": "Pēdējoreiz modificēts", - "size": "Izmērs", - "parentDirectory": "Vecākdirektorijs", - "empty": "tukšs", - "folders": "mapes", - "files": "faili", - "download": "lejupielādēt" - }, - - "nl": { - "lang": "nederlands", - "details": "details", - "icons": "iconen", - "name": "Naam", - "lastModified": "Laatste wijziging", - "size": "Grootte", - "parentDirectory": "Bovenliggende map", - "empty": "lege", - "folders": "folders", - "files": "files", - "download": "download" - }, - - "pl": { - "lang": "polski", - "details": "szczegóły", - "icons": "ikony", - "name": "Nazwa", - "lastModified": "Ostatnia modyfikacja", - "size": "Rozmiar", - "parentDirectory": "Katalog nadrzędny", - "empty": "pusty", - "folders": "foldery", - "files": "pliki", - "download": "download" - }, - - "pt": { - "lang": "português", - "details": "detalhes", - "icons": "ícones", - "name": "Nome", - "lastModified": "Última modificação", - "size": "Tamanho", - "parentDirectory": "Diretório superior", - "empty": "vazio", - "folders": "pastas", - "files": "arquivos", - "download": "download" - }, - - "ru": { - "lang": "русский", - "details": "детали", - "icons": "иконки", - "name": "Имя", - "lastModified": "Последние изменения", - "size": "Размер", - "parentDirectory": "Главная директория", - "empty": "пусто", - "folders": "папки", - "files": "файлы", - "download": "download" - }, - - "sk": { - "lang": "slovenčina", - "details": "podrobnosti", - "icons": "ikony", - "name": "Názov", - "lastModified": "Upravené", - "size": "Velkosť", - "parentDirectory": "Nadriadený priečinok", - "empty": "prázdny", - "folders": "priečinkov", - "files": "súborov", - "download": "download" - }, - - "sv": { - "lang": "svenska", - "details": "detaljerad", - "icons": "ikoner", - "name": "Filnamn", - "lastModified": "Senast ändrad", - "size": "Filstorlek", - "parentDirectory": "Till överordnad mapp", - "empty": "tom", - "folders": "folders", - "files": "files", - "download": "download" - }, - - "tr": { - "lang": "türkçe", - "details": "detaylar", - "icons": "ikonlar", - "name": "İsim", - "lastModified": "Son Düzenleme", - "size": "Boyut", - "parentDirectory": "Üst Dizin", - "empty": "boş", - "folders": "klasörler", - "files": "dosyalar", - "download": "indir" - }, - - "zh-cn": { - "lang": "简体中文", - "details": "详情", - "icons": "图标", - "name": "文件名", - "lastModified": "上次修改", - "size": "大小", - "parentDirectory": "上层文件夹", - "empty": "空文件夹", - "folders": "文件夹", - "files": "文件", - "download": "download" - } -}; diff --git a/src/h5ai/php/config.php b/src/h5ai/php/config.php deleted file mode 100644 index dba64056..00000000 --- a/src/h5ai/php/config.php +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git a/src/h5ai/types.txt b/src/h5ai/types.txt deleted file mode 100644 index 91158c01..00000000 --- a/src/h5ai/types.txt +++ /dev/null @@ -1,63 +0,0 @@ -archive .tar.gz .tgz .tar.bz2 -audio .mp3 .wav .ogg -authors AUTHORS authors -bin .so .o .class -blank -bmp .bmp -c .c -calc -cd .iso .cue -copying COPYING copying LICENSE license -cpp .cpp -css .css .less -deb .deb -default -doc .doc -draw -eps -exe .exe -folder -folder-home -folder-open -folder-page -folder-parent -gif .gif -gzip .gz -h .h -hpp .hpp -html .html .htm .shtml -ico .ico -image .xpm -install INSTALL install -java .java -jpg .jpg .jpeg -js .js .json -log .log CHANGELOG changelog LOG log -makefile .pom pom.xml build.xml -package -pdf .pdf -php .php -playlist .m3u -png .png -pres -psd -py .py -rar .rar -rb .rb -readme README readme -rpm .rpm -rss .rss -rtf .rtf -script .conf .ini .sh .shar .csh .ksh .tcl -source -sql -tar .tar -tex .tex -text .txt .text .md .markdown -tiff .tiff -unknown -vcal .vcal -video -xml .xml -zip .zip .Z .z .jar .war .bz2 - diff --git a/src/js.htaccess b/src/js.htaccess deleted file mode 100644 index d18f8cff..00000000 --- a/src/js.htaccess +++ /dev/null @@ -1,114 +0,0 @@ -################################ -# h5ai %BUILD_VERSION% (js) -# customized .htaccess -################################ - - -# Options +Indexes -# Options +FollowSymLinks - - -################################ -# h5ai header and footer -################################ - -HeaderName /h5ai/header.html -ReadmeName /h5ai/footer.html - - -################################ -# hide h5ai folder and config files from index -################################ - -IndexIgnore h5ai h5ai.header.html h5ai.footer.html - - -################################ -# table options -################################ - -# syntax for default sort order is: -# IndexOrderDefault Ascending|Descending Name|Date|Size -IndexOrderDefault Ascending Name - -IndexOptions Type=text/html;h5ai=%BUILD_VERSION% -IndexOptions Charset=UTF-8 -IndexOptions FancyIndexing -IndexOptions HTMLTable -IndexOptions XHTML -IndexOptions SuppressHTMLPreamble -IndexOptions SuppressRules -IndexOptions SuppressDescription -IndexOptions FoldersFirst -IndexOptions IgnoreCase -IndexOptions IconsAreLinks -IndexOptions VersionSort -IndexOptions NameWidth=* - - -################################ -# icon mapping -################################ - -AddIcon /h5ai/icons/16x16/folder-parent.png .. -AddIcon /h5ai/icons/16x16/folder.png ^^DIRECTORY^^ -AddIcon /h5ai/icons/16x16/blank.png ^^BLANKICON^^ - -AddIcon /h5ai/icons/16x16/readme.png README -AddIcon /h5ai/icons/16x16/copying.png COPYING LICENSE -AddIcon /h5ai/icons/16x16/install.png INSTALL -AddIcon /h5ai/icons/16x16/authors.png AUTHORS -AddIcon /h5ai/icons/16x16/log.png LOG Log log - -AddIcon /h5ai/icons/16x16/css.png .less -AddIcon /h5ai/icons/16x16/script.png .conf .ini .sh .shar .csh .ksh .tcl -AddIcon /h5ai/icons/16x16/makefile.png .pom pom.xml build.xml -AddIcon /h5ai/icons/16x16/bin.png .so .o - -AddIcon /h5ai/icons/16x16/archive.png .tar.gz .tgz .tar.bz2 -AddIcon /h5ai/icons/16x16/zip.png .zip .Z .z .jar .war .gz .bz2 -AddIcon /h5ai/icons/16x16/tar.png .tar -AddIcon /h5ai/icons/16x16/pdf.png .pdf -AddIcon /h5ai/icons/16x16/deb.png .deb -AddIcon /h5ai/icons/16x16/rpm.png .rpm -AddIcon /h5ai/icons/16x16/cd.png .iso .cue - -AddIconByType /h5ai/icons/16x16/png.png image/png -AddIconByType /h5ai/icons/16x16/jpg.png image/jpeg -AddIconByType /h5ai/icons/16x16/gif.png image/gif -AddIconByType /h5ai/icons/16x16/ico.png image/x-icon -AddIconByType /h5ai/icons/16x16/bmp.png image/x-ms-bmp - -AddIconByType /h5ai/icons/16x16/html.png text/html -AddIconByType /h5ai/icons/16x16/css.png text/css -AddIconByType /h5ai/icons/16x16/xml.png application/xml -AddIconByType /h5ai/icons/16x16/js.png application/javascript application/json -AddIconByType /h5ai/icons/16x16/php.png application/x-httpd-php - -AddIconByType /h5ai/icons/16x16/py.png text/x-python -AddIconByType /h5ai/icons/16x16/rb.png application/x-ruby -AddIconByType /h5ai/icons/16x16/java.png text/x-java -AddIconByType /h5ai/icons/16x16/cpp.png text/x-c++src -AddIconByType /h5ai/icons/16x16/hpp.png text/x-c++hdr -AddIconByType /h5ai/icons/16x16/c.png text/x-csrc -AddIconByType /h5ai/icons/16x16/h.png text/x-chdr - -AddIconByType /h5ai/icons/16x16/pdf.png application/pdf - -AddIconByType /h5ai/icons/16x16/rtf.png text/rtf application/rtf -AddIconByType /h5ai/icons/16x16/tex.png text/x-tex -AddIconByType /h5ai/icons/16x16/makefile.png text/x-makefile - -AddIconByType /h5ai/icons/16x16/bin.png application/java-vm -AddIconByType /h5ai/icons/16x16/exe.png application/x-executable application/x-msdos-program - -AddIconByType /h5ai/icons/16x16/text.png text/* -AddIconByType /h5ai/icons/16x16/image.png image/* -AddIconByType /h5ai/icons/16x16/audio.png audio/* -AddIconByType /h5ai/icons/16x16/video.png video/* - -AddIconByEncoding /h5ai/icons/16x16/zip.png x-compress x-gzip x-bzip2 - -DefaultIcon /h5ai/icons/16x16/unknown.png - - diff --git a/src/php.htaccess b/src/php.htaccess deleted file mode 100644 index 24cd5943..00000000 --- a/src/php.htaccess +++ /dev/null @@ -1,19 +0,0 @@ -################################ -# h5ai %BUILD_VERSION% (php) -# customized .htaccess -################################ - - -# Options +Indexes -# Options +FollowSymLinks - - -HeaderName /h5ai/header.php -ReadmeName /h5ai/footer.php - -IndexIgnore * - -IndexOptions Type=text/html;h5ai=%BUILD_VERSION% -IndexOptions Charset=UTF-8 -IndexOptions SuppressHTMLPreamble - From 4e4e654467de10fb904cab6a7e6b2008a2b17c09 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Sat, 26 Nov 2011 20:56:07 +0100 Subject: [PATCH 2/3] Fixes config. --- src/_h5ai/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js index 595b0c5a..54f02963 100644 --- a/src/_h5ai/config.js +++ b/src/_h5ai/config.js @@ -100,13 +100,13 @@ H5AI_CONFIG = { * Requires PHP on the server. * Show thumbnails for image files. */ - "showThumbs": true, + "showThumbs": false, /* * Requires PHP on the server. * Enable zipped download of selected entries. */ - "zippedDownload": true + "zippedDownload": false }, From 3baab509535f86834b559464c5d4c1263a03fb66 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Mon, 28 Nov 2011 00:49:22 +0100 Subject: [PATCH 3/3] Last changes before release. --- README.md | 6 +++--- src/_h5ai/config.js | 2 +- src/_h5ai/header.php | 3 --- src/_h5ai/php/inc/Customize.php | 11 +++++++---- src/_h5ai/php/inc/Tree.php | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5a5e2d69..644e8af5 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Don't use files from this repository (`src` folder) for installation. They need to be preprocessed/compiled to work correctly. You'll find a precompiled package on the [project page](http://larsjung.de/h5ai). -Please create [a new issue](http://github.com/lrsjng/h5ai/issues/new) -to report a bug or make a feature request. +To report a bug or make a feature request +please create [a new issue](http://github.com/lrsjng/h5ai/issues/new). * Website with download, docs and demo: * Sources: @@ -27,7 +27,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h ## Changelog -### v0.17 · *2011-11-??* +### v0.17 · *2011-11-28* * h5ai is now located in `_h5ai` to reduce collisions * switches from HTML5 Boilerplate reset to normalization diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js index 54f02963..0a004027 100644 --- a/src/_h5ai/config.js +++ b/src/_h5ai/config.js @@ -5,7 +5,7 @@ * options, types and localization */ -H5AI_CONFIG = { +var H5AI_CONFIG = { "options": { diff --git a/src/_h5ai/header.php b/src/_h5ai/header.php index 75d1e7b5..03ad2cc7 100644 --- a/src/_h5ai/header.php +++ b/src/_h5ai/header.php @@ -29,9 +29,6 @@ getHeader(); ?> toHtml(); ?> getFooter(); ?> - getDocRoot() . "
          "; ?> - getH5aiRoot() . "
          "; ?> - getHrefRoot() . "
          "; ?>