diff --git a/README.md b/README.md index 2faf2a74..99aa3ffc 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,26 @@ # h5ai -**a modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee** - +**h5ai** is a modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee. The preferred way to report a bug or make a feature request is to -create [a new issue](http://github.com/lrsjng/h5ai/issues/new) on GitHub! +create [a new issue](https://github.com/lrsjng/h5ai/issues/new) on GitHub! ## Install -( **note:** please don't use files from the `src` folder for installation, -they need to be preprocessed to work correctly ) - +**Note:** please don't use files from the `src` folder for installation, +they need to be preprocessed to work correctly! You'll find a preprocessed package, as well as detailed installation instructions on the [project page](http://larsjung.de/h5ai/). ## Build -( there are repositories for the latest [releases](http://release.larsjung.de/h5ai/) and [dev builds](http://release.larsjung.de/h5ai/dev/) ) - -If you want to build **h5ai** yourself you need to install the build tool [fQuery](http://larsjung.de/fquery/) first: +There are repositories for the latest [releases](http://release.larsjung.de/h5ai/) and [dev builds](http://release.larsjung.de/h5ai/dev/). +But if you want to build **h5ai** yourself you need to install the build tool [fQuery](http://larsjung.de/fquery/) first: > npm install -g fquery This will install fQuery and its command line tool `makejs`. Run `makejs --help` to see if everything -worked fine. - -To clone and build the project run the following commands. +worked fine. To clone and build the project run the following commands. You'll find a new directory `build` including a fresh zipball. > git clone git://github.com/lrsjng/h5ai.git @@ -35,7 +30,7 @@ You'll find a new directory `build` including a fresh zipball. ## License -**h5ai** is provided under the terms of the [MIT License](http://github.com/lrsjng/h5ai/blob/develop/LICENSE.md). +**h5ai** is provided under the terms of the [MIT License](https://github.com/lrsjng/h5ai/blob/develop/LICENSE.md). It profits from these great projects: [Faenza icon set](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) (GPL), @@ -44,10 +39,10 @@ It profits from these great projects: [jQuery](http://jquery.com) (MIT), [jQuery.filedrop](http://www.github.com/weixiyen/jquery-filedrop) (MIT), [jQuery.fracs](http://larsjung.de/fracs/) (MIT), -[jQuery.mousewheel](http://github.com/brandonaaron/jquery-mousewheel) (MIT), +[jQuery.mousewheel](https://github.com/brandonaaron/jquery-mousewheel) (MIT), [jQuery.qrcode](http://larsjung.de/qrcode/) (MIT), [jQuery.scrollpanel](http://larsjung.de/scrollpanel/) (MIT), -[markdown-js](http://github.com/evilstreak/markdown-js) (MIT), +[markdown-js](https://github.com/evilstreak/markdown-js) (MIT), [Modernizr](http://www.modernizr.com) (MIT/BSD), [modulejs](http://larsjung.de/modulejs/) (MIT), [Moment.js](http://momentjs.com) (MIT), @@ -56,7 +51,26 @@ It profits from these great projects: ## Changelog -( **h5ai** uses [semantic versioning](http://semver.org/) ) +**h5ai** uses [semantic versioning](http://semver.org/). + + +### v0.24.0 - *2013-09-04* + +* updates image and text preview +* adds variable icon sizes +* adds optional natural sort of items +* adds optional checkboxes to select items +* adds text preview modes: none, fixed, markdown +* optionally hide folders in main view +* makes use of EXIF thumbnails optional +* fixes file deletion of multiple files +* fixes `setParentFolderLabels = false` +* fixes shell-arg and RegExp escape issues +* cleans code +* updates info page `/_h5ai` +* adds `aiff` to `audio` types +* adds `da` translation by Ronnie Milbo +* updates to `pl` translation by Mark ### v0.23.0 - *2013-07-21* @@ -127,11 +141,11 @@ It profits from these great projects: * improves filter (now ignorecase, now only checks if chars in right order) * adds keyboard support to image preview (space, enter, backspace, left, right, up, down, f, esc) * adds text file preview and highlighting with [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) (same keys as img preview) -* adds Markdown preview with [markdown-js](http://github.com/evilstreak/markdown-js) +* adds Markdown preview with [markdown-js](https://github.com/evilstreak/markdown-js) * adds new type `markdown` * changes language code `gr` to `el` * adds localization for filter placeholder -* adds `hu` translation by [Rodolffo](http://github.com/Rodolffo) +* adds `hu` translation by [Rodolffo](https://github.com/Rodolffo) * updates to [jQuery.qrcode](http://larsjung.de/qrcode/) 0.2 * updates to [jQuery.scrollpanel](http://larsjung.de/scrollpanel/) 0.1 * updates to [modulejs](http://larsjung.de/modulejs/) 0.2 @@ -168,13 +182,13 @@ It profits from these great projects: * adds `index.php` to use h5ai in non-Apache environments * switches from [Datejs](http://www.datejs.com) to [Moment.js](http://momentjs.com) * adds [underscore.js](http://underscorejs.org) -* fixes mousewheel problems, updates [jQuery.mousewheel](http://github.com/brandonaaron/jquery-mousewheel) to 3.0.6 +* fixes mousewheel problems, updates [jQuery.mousewheel](https://github.com/brandonaaron/jquery-mousewheel) to 3.0.6 * updates `lv` translation -* adds `ro` translation by [Jakob Cosoroabă](http://github.com/midday) -* adds `ja` translation by [metasta](http://github.com/metasta) -* adds `nb` translation by [Sindre Sorhus](http://github.com/sindresorhus) -* adds `sr` translation by [vBm](http://github.com/vBm) -* adds `gr` translation by [xhmikosr](http://github.com/xhmikosr) +* adds `ro` translation by [Jakob Cosoroabă](https://github.com/midday) +* adds `ja` translation by [metasta](https://github.com/metasta) +* adds `nb` translation by [Sindre Sorhus](https://github.com/sindresorhus) +* adds `sr` translation by [vBm](https://github.com/vBm) +* adds `gr` translation by [xhmikosr](https://github.com/xhmikosr) ### v0.18 - *2012-02-24* @@ -194,7 +208,7 @@ It profits from these great projects: * improves url hashes * updates year in `LICENSE.TXT` * updates es translation -* adds `zh-tw` translation by [Yao Wei](http://github.com/medicalwei) +* adds `zh-tw` translation by [Yao Wei](https://github.com/medicalwei) * updates `zh-cn` translation @@ -230,7 +244,7 @@ It profits from these great projects: ### v0.15.2 - *2011-09-18* -* adds `it` translation by [Salvo Gentile](http://github.com/SalvoGentile) and [Marco Patriarca](http://github.com/Fexys) +* adds `it` translation by [Salvo Gentile](https://github.com/SalvoGentile) and [Marco Patriarca](https://github.com/Fexys) * switches build process from scripp to wepp @@ -249,7 +263,7 @@ It profits from these great projects: ### v0.14.1 - *2011-09-01* * display meta information in bottom bar (icon view) -* adds `zh-cn` translation by [Dongsheng Cai](http://github.com/dongsheng) +* adds `zh-cn` translation by [Dongsheng Cai](https://github.com/dongsheng) * adds `pl` translation by Radosław Zając * adds `ru` translation by Богдан Илюхин @@ -283,13 +297,13 @@ It profits from these great projects: * changes value of option `lang` from `undefined` to `null` * adds some new keys to `h5aiLangs` * adds browser caching rules for css and js -* adds `pt` translation by [Jonnathan](http://github.com/jonnsl) +* adds `pt` translation by [Jonnathan](https://github.com/jonnsl) * adds `bg` translation by George Andonov ### v0.12.3 - *2011-07-30* -* adds `tr` translation by [Batuhan Icoz](http://github.com/batuhanicoz) +* adds `tr` translation by [Batuhan Icoz](https://github.com/batuhanicoz) ### v0.12.2 - *2011-07-30* @@ -325,9 +339,9 @@ It profits from these great projects: ### v0.10 - *2011-07-24* * fixes problems with XAMPP on Windows (see `dot.htaccess` comments for instructions) -* fixes tree fade-in-fade-out effect for small displays ([issue #6](http://github.com/lrsjng/h5ai/issues/6)) -* adds custom scrollbar to tree ([issue #6](http://github.com/lrsjng/h5ai/issues/6)) -* fixes broken links caused by URI encoding/decoding ([issue #9](http://github.com/lrsjng/h5ai/issues/9)) +* fixes tree fade-in-fade-out effect for small displays ([issue #6](https://github.com/lrsjng/h5ai/issues/6)) +* adds custom scrollbar to tree ([issue #6](https://github.com/lrsjng/h5ai/issues/6)) +* fixes broken links caused by URI encoding/decoding ([issue #9](https://github.com/lrsjng/h5ai/issues/9)) * adds "empty" to localization (hope Google Translate did a good job here) @@ -337,8 +351,8 @@ It profits from these great projects: * fixes size of tree view (now there's a ugly scrollbar, hopefully will be fixed) * refactores js to improve performance and cleaned code * adds caching for folder status codes and content -* adds `fr` translation by [Nicolas](http://github.com/Nicosmos) -* adds `nl` translation by [Stefan de Konink](http://github.com/skinkie) +* adds `fr` translation by [Nicolas](https://github.com/Nicosmos) +* adds `nl` translation by [Stefan de Konink](https://github.com/skinkie) * adds `sv` translation by Oscar Carlsson @@ -426,7 +440,7 @@ It profits from these great projects: ### v0.2.2 - *2011-06-16* * refactores a lot, adds some comments -* includes fixes from [NumEricR](http://github.com/NumEricR) +* includes fixes from [NumEricR](https://github.com/NumEricR) * adds top/bottom message support, only basicly styled diff --git a/makefile.js b/makefile.js index cc43d53d..bf3e5c25 100644 --- a/makefile.js +++ b/makefile.js @@ -2,82 +2,49 @@ 'use strict'; -var path = require('path'), - - pkg = require('./package.json'), - - root = path.resolve(__dirname), - src = path.join(root, 'src'), - build = path.join(root, 'build'), - - jshint = { - // Enforcing Options - bitwise: true, - curly: true, - eqeqeq: true, - forin: true, - latedef: true, - newcap: true, - noempty: true, - plusplus: true, - trailing: true, - undef: true, - - // Environments - browser: true, - - // Globals - predef: [ - 'modulejs' - ] - }, - - handlebarsEnv = { - pkg: pkg - }, - - mapSrc = function (blob) { - - return blob.source.replace(src, build).replace(/\.less$/, '.css').replace(/\.jade$/, ''); - }, - - mapRoot = function (blob) { - - return blob.source.replace(root, path.join(build, '_h5ai')); - }; - - module.exports = function (make) { - var Event = make.Event, + var path = require('path'), + + pkg = require('./package.json'), + + root = path.resolve(__dirname), + src = path.join(root, 'src'), + build = path.join(root, 'build'), + $ = make.fQuery, - moment = make.moment; + mapSrc = $.map.p(src, build).s('.less', '.css').s('.jade', ''), + mapRoot = $.map.p(root, build); - make.version('>=0.8.1'); + make.version('>=0.10.0'); make.defaults('build'); make.before(function () { - handlebarsEnv.stamp = moment().format('YYYY-MM-DD HH:mm:ss'); + var moment = make.moment(); + + make.env = { + pkg: pkg, + stamp: moment.format('YYYY-MM-DD HH:mm:ss') + }; + + $.info({ method: 'before', message: pkg.version + ' ' + make.env.stamp }); }); make.target('check-version', [], 'add git info to dev builds').async(function (done, fail) { - if (!/-dev$/.test(pkg.version)) { + if (!/\+$/.test(pkg.version)) { done(); return; } $.git(root, function (err, result) { - pkg.version += '-' + result.revListOriginMasterHead.length + '-' + result.revParseHead.slice(0, 7); - Event.info({ - method: 'check-version', - message: 'version set to ' + pkg.version - }); + pkg.version += result.buildSuffix; + $.info({ method: 'check-version', message: 'version set to ' + pkg.version }); done(); }); }); @@ -85,45 +52,67 @@ module.exports = function (make) { make.target('clean', [], 'delete build folder').sync(function () { - $.rmfr($.I_AM_SURE, build); + $.DELETE(build); }); make.target('lint', [], 'lint all JavaScript files with JSHint').sync(function () { + var jshint = { + // Enforcing Options + bitwise: true, + curly: true, + eqeqeq: true, + forin: true, + latedef: true, + newcap: true, + noempty: true, + plusplus: true, + trailing: true, + undef: true, + + // Environments + browser: true + }, + globals = { + 'modulejs': true + }; + $(src + '/_h5ai/client/js: **/*.js, ! lib/**') - .jshint(jshint); + .jshint(jshint, globals); }); make.target('build', ['check-version'], 'build all updated files').sync(function () { + var header = '/* ' + pkg.name + ' ' + pkg.version + ' - ' + pkg.url + ' */'; + $(src + ': _h5ai/client/js/*.js') .modified(mapSrc, $(src + ': _h5ai/client/js/**')) .includify() - .uglifyjs() - .write($.OVERWRITE, mapSrc); + .uglifyjs({header: header}) + .WRITE(mapSrc); $(src + ': _h5ai/client/css/*.less') .modified(mapSrc, $(src + ': _h5ai/client/css/**')) .less() - .cssmin() - .write($.OVERWRITE, mapSrc); + .cssmin({header: header}) + .WRITE(mapSrc); $(src + ': **/*.jade') .modified(mapSrc) - .handlebars(handlebarsEnv) + .handlebars(make.env) .jade() - .write($.OVERWRITE, mapSrc); + .WRITE(mapSrc); $(src + ': **, ! _h5ai/client/js/**, ! _h5ai/client/css/**, ! **/*.jade') .modified(mapSrc) - .handlebars(handlebarsEnv) - .write($.OVERWRITE, mapSrc); + .handlebars(make.env) + .WRITE(mapSrc); $(root + ': README*, LICENSE*') .modified(mapRoot) - .write($.OVERWRITE, mapRoot); + .WRITE(mapRoot); }); @@ -133,28 +122,28 @@ module.exports = function (make) { .modified(mapSrc, $(src + ': _h5ai/client/js/**')) .includify() // .uglifyjs() - .write($.OVERWRITE, mapSrc); + .WRITE(mapSrc); $(src + ': _h5ai/client/css/*.less') .modified(mapSrc, $(src + ': _h5ai/client/css/**')) .less() // .cssmin() - .write($.OVERWRITE, mapSrc); + .WRITE(mapSrc); $(src + ': **/*.jade') .modified(mapSrc) - .handlebars(handlebarsEnv) + .handlebars(make.env) .jade() - .write($.OVERWRITE, mapSrc); + .WRITE(mapSrc); $(src + ': **, ! _h5ai/client/js/**, ! _h5ai/client/css/**, ! **/*.jade') .modified(mapSrc) - .handlebars(handlebarsEnv) - .write($.OVERWRITE, mapSrc); + .handlebars(make.env) + .WRITE(mapSrc); $(root + ': README*, LICENSE*') .modified(mapRoot) - .write($.OVERWRITE, mapRoot); + .WRITE(mapRoot); }); diff --git a/package.json b/package.json index 5bdc18ae..b2c56528 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "h5ai", - "version": "0.23.0", + "version": "0.24.0", "description": "a modern HTTP web server index", "url": "http://larsjung.de/h5ai/", "author": "Lars Jung", diff --git a/src/_h5ai/client/css/inc/bottombar.less b/src/_h5ai/client/css/inc/bottombar.less index 646a5e33..53ca8340 100644 --- a/src/_h5ai/client/css/inc/bottombar.less +++ b/src/_h5ai/client/css/inc/bottombar.less @@ -7,10 +7,8 @@ left: 0; bottom: 0; padding: 6px 0 8px 0; - // .vert-gradient(rgb(241,241,241), rgb(228,228,228)); background-color: @col-widget-back; border-top: @border-widget; - // .box-shadow(0 -2px 4px 0 rgba(0, 0, 0, 0.15); color: #999; text-align: center; @@ -46,7 +44,6 @@ margin-left: 16px; } .noBrowserMsg { - display: none; color: @col-error; margin-left: 16px; a, a:active, a:visited { diff --git a/src/_h5ai/client/css/inc/content.less b/src/_h5ai/client/css/inc/content.less index 1059d0f0..ddda9b97 100644 --- a/src/_h5ai/client/css/inc/content.less +++ b/src/_h5ai/client/css/inc/content.less @@ -2,7 +2,7 @@ #content { max-width: 960px; margin: 50px auto; - font-size: 16px; + font-size: 15px; } #content-header, #content-footer { diff --git a/src/_h5ai/client/css/inc/dropbox.less b/src/_h5ai/client/css/inc/dropbox.less index 785dc2b6..ed8dfefa 100644 --- a/src/_h5ai/client/css/inc/dropbox.less +++ b/src/_h5ai/client/css/inc/dropbox.less @@ -1,7 +1,7 @@ #content { border: 1px dashed #fff; - .border-radius(8px); + border-radius: 8px; .transition(border-color 0.2s ease-in-out); &.hint { diff --git a/src/_h5ai/client/css/inc/fallback.less b/src/_h5ai/client/css/inc/fallback.less index 9c0c50e0..f73ef3eb 100644 --- a/src/_h5ai/client/css/inc/fallback.less +++ b/src/_h5ai/client/css/inc/fallback.less @@ -54,14 +54,11 @@ } } td:nth-child(1), th:nth-child(1) { - text-align: center; - width: 16px; - color: #ccc; - font-size: 0.9em; + width: 24px; img { - width: 16px; - height: 16px; + width: 24px; + height: 24px; } } td:nth-child(2), th:nth-child(2) { diff --git a/src/_h5ai/client/css/inc/general.less b/src/_h5ai/client/css/inc/general.less index 47307d19..5b34da55 100644 --- a/src/_h5ai/client/css/inc/general.less +++ b/src/_h5ai/client/css/inc/general.less @@ -4,6 +4,7 @@ @col-hover: rgb(29,119,194); @col-border: rgba(0,0,0,0.05); @col-border-strong: rgba(0,0,0,0.15); +@col-border-stronger: rgba(0,0,0,0.3); @col-error: rgb(204,51,51); @@ -16,41 +17,50 @@ @col-widget-back-sel: rgba(255,255,255,0.8); @col-widget-sep: @col-border; -// @col-sb-back: rgb(210,210,210); -// @col-sb-thumb: rgb(180,180,180); -// @col-sb-thumb-active: rgb(150,150,150); @col-sb-back: rgba(0,0,0,0.08); @col-sb-thumb: rgba(0,0,0,0.15); @col-sb-thumb-active: rgba(0,0,0,0.25); - @border-widget: 1px solid @col-border; @border-widget-sep: 1px solid @col-widget-sep; - - - - @font-family: Ubuntu, sans-serif; +@font-weight: 300; @font-family-mono: "Ubuntu Mono", monospace; -html { overflow-y: auto; } ::-moz-selection { background: #68A9FF; color: #fff; text-shadow: none; } ::selection { background: #68A9FF; color: #fff; text-shadow: none; } +.transition (@transition) { + -webkit-transition: @transition; + transition: @transition; +} + +.transform (@transform) { + -webkit-transform: @transform; + -ms-transform: @transform; + transform: @transform; + zoom: 1; +} + +html { + min-height: 100%; + overflow: auto; + + &.js .noJsMsg { + display: none; + } + &.browser .noBrowserMsg { + display: none; + } +} + body { font-family: @font-family; - // font-weight: 400; font-size: 13px; + font-weight: @font-weight; color: @col; background-color: @col-back; margin: 30px; } - -html.js .hideOnJs, html.no-js .hideOnNoJs { - display: none; -} -html.no-browser .noBrowserMsg { - display: inline !important; -} diff --git a/src/_h5ai/client/css/inc/h5ai-info.less b/src/_h5ai/client/css/inc/h5ai-info.less index c77f1d9b..d231be17 100644 --- a/src/_h5ai/client/css/inc/h5ai-info.less +++ b/src/_h5ai/client/css/inc/h5ai-info.less @@ -32,15 +32,15 @@ body#h5ai-info { display: block; color: #aaa; - .value { - margin-left: 0.5em; - padding: 2px 4px; - .border-radius(4px); - font-family: @font-family-mono; - letter-spacing: 0.1em; - background-color: @col-widget-back; - border: @border-widget; - } + } + code { + margin: 0 0.2em; + padding: 2px 4px; + border-radius: 4px; + font-family: @font-family-mono; + letter-spacing: 0.1em; + background-color: @col-widget-back; + border: @border-widget; } h1 { font-size: 3.6em; @@ -70,7 +70,7 @@ body#h5ai-info { .test-label { display: inline-block; - width: 300px; + width: 350px; } .test-result { display: inline-block; @@ -90,7 +90,7 @@ body#h5ai-info { margin: 4px 0 12px 12px; font-size: 0.7em; color: #aaa; - width: 310px; + width: 350px; line-height: 1.2em; } } diff --git a/src/_h5ai/client/css/inc/notify.less b/src/_h5ai/client/css/inc/notify.less index 4ac6545e..8c1b7867 100644 --- a/src/_h5ai/client/css/inc/notify.less +++ b/src/_h5ai/client/css/inc/notify.less @@ -9,6 +9,6 @@ padding: 2px 6px 2px 6px; color: #fff; background-color: rgba(0, 0, 0, 0.2); - .border-radius(4px); + border-radius: 4px; text-align: center; } diff --git a/src/_h5ai/client/css/inc/preview-img.less b/src/_h5ai/client/css/inc/preview-img.less index a4542c22..4a1fe130 100644 --- a/src/_h5ai/client/css/inc/preview-img.less +++ b/src/_h5ai/client/css/inc/preview-img.less @@ -1,130 +1,18 @@ -#pv-img-overlay { - display: none; - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - z-index: 100; - - background-color: rgba(0,0,0,0.5); - .transition(background-color 0.3s ease-in-out); - - text-align: center; -} - -#pv-img-content, #pv-spinner { - position: fixed; -} - @check-white: #f8f8f8; @check-black: #e8e8e8; #pv-img-image { + position: absolute; + max-width: 100%; max-height: 100%; - border: 2px solid #fff; - .border-radius(4px); background-color: @check-white; background-image: -webkit-linear-gradient(45deg, @check-black 25%, transparent 25%, transparent 75%, @check-black 75%, @check-black), -webkit-linear-gradient(45deg, @check-black 25%, transparent 25%, transparent 75%, @check-black 75%, @check-black); background-size: 60px 60px; - background-position: 0 0, 30px 30px -} - -#pv-img-overlay.fullscreen { - background-color: #111; - - #pv-img-image { - border: 0; - .border-radius(0); - } -} - -#pv-img-close { - position: fixed; - width: 100%; - height: 100%; - cursor: pointer; -} - -#pv-img-prev { - position: fixed; - cursor: pointer; -} - -#pv-img-next { - position: fixed; - cursor: pointer; -} - -#pv-img-buttons, #pv-img-topbuttons { - list-style: none; - list-style-image: none; - margin: 0; - padding: 0; - - img { - position: relative; - top: -2px; - width: 16px; - height: 16px; - } - img + span, img + input { - margin-left: 6px; - } - input { - background-color: rgba(255,255,255,0.1); - border: none; - color: #ccc; - } - - .bar-label { - display: block; - color: #ccc; - height: 30px; - line-height: 30px; - padding: 0 10px; - opacity: 0.7; - .transition(all 0.2s ease-in-out); - } - - .bar-highlight { - background-color: rgba(255,255,255,0.1); - opacity: 1.0; - } - - @bar-sep-border: 1px solid rgba(255,255,255,0.08); - - .bar-button { - .bar-label; - cursor: pointer; - &:hover, &.hover { - .bar-highlight; - } - } - - .bar-left { - float: left; - border-right: @bar-sep-border; - } - - .bar-right { - float: right; - border-left: @bar-sep-border; - } -} - -#pv-img-bottombar { - position: fixed; - z-index: 5; - width: 100%; - height: 32px; - left: 0; - bottom: 0; - // .vert-gradient(rgb(27,27,27), rgb(14,14,14)); - background-color: rgb(27,27,27); - border-top: 1px solid rgb(45,45,45); + background-position: 0 0, 30px 30px; + + box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.3); } diff --git a/src/_h5ai/client/css/inc/preview-txt.less b/src/_h5ai/client/css/inc/preview-txt.less index bbbb893a..68bff18e 100644 --- a/src/_h5ai/client/css/inc/preview-txt.less +++ b/src/_h5ai/client/css/inc/preview-txt.less @@ -1,35 +1,13 @@ -#pv-txt-overlay { - display: none; - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - z-index: 100; - - background-color: rgba(0,0,0,0.5); - - text-align: center; -} - -#pv-txt-content { - max-width: 960px; - margin: 0 auto; - padding: 10px; - background-color: #fff; - border: 2px solid #fff; - .border-radius(4px); - text-align: left; - overflow: auto; - position: relative; -} - -#pv-txt-spinner { - position: fixed; -} - #pv-txt-text { + max-width: 960px; + text-align: left; + background-color: #fff; + margin: 0 auto; + padding: 8px; + overflow: auto; + + box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.3); &.highlighted { word-break: break-all; @@ -143,90 +121,3 @@ } } } - -#pv-txt-close { - position: fixed; - left: 0; - top: 0; - width: 100%; - height: 100%; - cursor: pointer; -} - -#pv-txt-prev { - position: fixed; - cursor: pointer; -} - -#pv-txt-next { - position: fixed; - cursor: pointer; -} - -#pv-txt-buttons, #pv-txt-topbuttons { - list-style: none; - list-style-image: none; - margin: 0; - padding: 0; - - img { - position: relative; - top: -2px; - width: 16px; - height: 16px; - } - img + span, img + input { - margin-left: 6px; - } - input { - background-color: rgba(255,255,255,0.1); - border: none; - color: #ccc; - } - - .bar-label { - display: block; - color: #ccc; - height: 30px; - line-height: 30px; - padding: 0 10px; - opacity: 0.7; - .transition(all 0.2s ease-in-out); - } - - .bar-highlight { - background-color: rgba(255,255,255,0.1); - opacity: 1.0; - } - - @bar-sep-border: 1px solid rgba(255,255,255,0.05); - - .bar-button { - .bar-label; - cursor: pointer; - &:hover, &.hover { - .bar-highlight; - } - } - - .bar-left { - float: left; - border-right: @bar-sep-border; - } - - .bar-right { - float: right; - border-left: @bar-sep-border; - } -} - -#pv-txt-bottombar { - position: fixed; - z-index: 5; - width: 100%; - height: 32px; - left: 0; - bottom: 0; - .vert-gradient(rgb(27,27,27), rgb(14,14,14)); - border-top: 1px solid rgb(45,45,45); -} diff --git a/src/_h5ai/client/css/inc/preview.less b/src/_h5ai/client/css/inc/preview.less new file mode 100644 index 00000000..49f03122 --- /dev/null +++ b/src/_h5ai/client/css/inc/preview.less @@ -0,0 +1,166 @@ + +#pv-overlay { + display: none; + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + z-index: 100; + + background-color: rgba(0,0,0,0.5); + .transition(background-color 0.3s ease-in-out); + + text-align: center; +} + +#pv-overlay.fullscreen { + background-color: #111; +} + +#pv-content { + position: absolute; +} + +#pv-spinner { + position: absolute; + + img { + width: 100px; + height: 100px; + margin: -50px -50px; + } +} + +#pv-close-area { + position: absolute; + right: 8px; + top: 8px; + cursor: pointer; + + img { + background-color: rgba(0,0,0,0.5); + border-radius: 8px; + width: 48px; + height: 48px; + opacity: 0.5; + } + + &:hover, &.hover { + img { + opacity: 1; + } + } +} + +#pv-prev-area, #pv-next-area { + position: absolute; + top: 50%; + cursor: pointer; + + img { + background-color: rgba(0,0,0,0.5); + border-radius: 8px; + width: 48px; + height: 48px; + margin: -72px 0; + padding: 48px 0; + opacity: 0.5; + } + + &:hover, &.hover { + img { + opacity: 1; + } + } +} + +#pv-prev-area { + left: 8px; +} + +#pv-next-area { + right: 8px; +} + +#pv-buttons { + list-style: none; + list-style-image: none; + margin: 0; + padding: 0; + + img { + position: relative; + top: -2px; + width: 16px; + height: 16px; + } + img + span, img + input { + margin-left: 6px; + } + input { + background-color: rgba(255,255,255,0.1); + border: none; + color: #ccc; + } + + .bar-label { + display: block; + color: #ccc; + height: 30px; + line-height: 30px; + padding: 0 10px; + opacity: 0.7; + .transition(all 0.2s ease-in-out); + } + + .bar-highlight { + background-color: rgba(255,255,255,0.1); + opacity: 1.0; + } + + @bar-sep-border: 1px solid rgba(255,255,255,0.08); + + .bar-button { + .bar-label; + cursor: pointer; + &:hover, &.hover { + .bar-highlight; + } + } + + .bar-left { + float: left; + border-right: @bar-sep-border; + } + + .bar-right { + float: right; + border-left: @bar-sep-border; + } +} + +#pv-bottombar { + position: fixed; + z-index: 5; + width: 100%; + height: 32px; + left: 0; + bottom: 0; + background-color: rgb(27,27,27); + border-top: 1px solid rgb(45,45,45); + +} + +#pv-overlay.fullscreen { + + #pv-bottombar { + opacity: 0.5; + } +} + +@media only screen and (max-width: 700px) { +#pv-prev-area, #pv-next-area, #pv-close-area { + display: none !important; +} +} diff --git a/src/_h5ai/client/css/inc/responsive.less b/src/_h5ai/client/css/inc/responsive.less index 2002a07a..d83d01d2 100644 --- a/src/_h5ai/client/css/inc/responsive.less +++ b/src/_h5ai/client/css/inc/responsive.less @@ -11,9 +11,9 @@ display: none; } } -#view.view-details, #view.view-list { +#view.view-details { .header .label, .item .label { - margin-right: 110px; + margin-right: 80px !important; } .header .date, .item .date { display: none; diff --git a/src/_h5ai/client/css/inc/topbar.less b/src/_h5ai/client/css/inc/topbar.less index 04b52559..e0da03c6 100644 --- a/src/_h5ai/client/css/inc/topbar.less +++ b/src/_h5ai/client/css/inc/topbar.less @@ -6,10 +6,8 @@ min-height: 30px; left: 0; top: 0; - // .vert-gradient(rgb(241,241,241), rgb(228,228,228)); background-color: @col-widget-back; border-bottom: @border-widget; - // .box-shadow(0 2px 4px 0 rgba(0, 0, 0, 0.15); } diff --git a/src/_h5ai/client/css/inc/tree.less b/src/_h5ai/client/css/inc/tree.less index 2f258b6f..be456672 100644 --- a/src/_h5ai/client/css/inc/tree.less +++ b/src/_h5ai/client/css/inc/tree.less @@ -12,15 +12,12 @@ border-right: @border-widget; .sp-scrollbar { - // margin: 8px 8px 8px 0; width: 6px; background-color: @col-sb-back; - // .border-radius(3px); cursor: pointer; .sp-thumb { background-color: @col-sb-thumb; - // .border-radius(3px); } &.active .sp-thumb { background-color: @col-sb-thumb-active; @@ -63,14 +60,13 @@ padding: 4px 6px; color: #555; border: 1px solid rgba(0,0,0,0); - .border-radius(3px); + border-radius: 3px; text-decoration: none; opacity: 0.7; &:hover, &.hover { color: @col-hover; background-color: @col-widget-back-hover; - // border-color: rgba(0,0,0,0.05); opacity: 1; } } diff --git a/src/_h5ai/client/css/inc/view-details.less b/src/_h5ai/client/css/inc/view-details.less index 5d1cdeff..c4c636a3 100644 --- a/src/_h5ai/client/css/inc/view-details.less +++ b/src/_h5ai/client/css/inc/view-details.less @@ -10,8 +10,8 @@ &.item { a, a:active, a:visited { - border-top: 1px solid @item-border-col-sep; border-bottom: 1px solid @item-border-col-sep; + height: @icon-size + 6px; &:hover, &.hover { border-color: @item-border-col-hover; @@ -19,28 +19,29 @@ } // needs to be here, to not conflict with header fields - .icon, .label, .date, .size { - padding: 8px 6px; + .icon { + padding: 8px; + } + .label, .date, .size { + padding: ((@icon-size - 16px)/2) 8px; } } - &.item + .item { - - a, a:active, a:visited { - border-top: none; - } - } - - .icon.small { + .icon.square { display: inline-block; position: absolute; left: 0; - top: -2px; - width: 16px; + top: -4px; + width: @icon-size; + + img { + width: @icon-size; + height: @icon-size; + } } .label { - margin: 0 270px 0 24px; + margin: 0 230px 0 (@icon-size + 16px); } .date { @@ -54,5 +55,67 @@ right: 0; top: 0; } + + .selector { + margin-top: -1px; + } + } +} + + +.view-details-sized(@size) { + + li { + + &.item { + + a, a:active, a:visited { + height: @size + 6px; + } + + .label, .date, .size { + padding: ((@size - 16px)/2) 8px; + } + } + + .icon.square { + width: @size; + + img { + width: @size; + height: @size; + } + } + + .label { + margin: 0 230px 0 (@size + 16px); + } + } +} + + +#view.view-details { + &.size-16 { + .view-details-sized(16px) + } + + &.size-24 { + .view-details-sized(24px) + } + + &.size-32 { + .view-details-sized(32px) + } + + &.size-48 { + .view-details-sized(48px) + } + + &.size-64 { + .view-details-sized(64px) + } + + &.size-96 { + .view-details-sized(96px) } } diff --git a/src/_h5ai/client/css/inc/view-grid.less b/src/_h5ai/client/css/inc/view-grid.less index 3576b298..9cb71c0b 100644 --- a/src/_h5ai/client/css/inc/view-grid.less +++ b/src/_h5ai/client/css/inc/view-grid.less @@ -5,33 +5,43 @@ &.item { float: left; + margin: 2px; a, a:active, a:visited { - float: left; - margin: 2px; - padding: 8px; - width: 164px; - height: 24px; + width: @icon-size + 182px; + height: @icon-size + 6px; border: 1px solid rgba(0,0,0,0); &:hover, &.hover { border-color: @item-border-col-hover; } } + + // needs to be here, to not conflict with header fields + .icon { + padding: 8px; + } + .label, .date, .size { + padding: ((@icon-size - 16px)/2) 8px; + } } - .icon.small { + .icon.square { display: inline-block; position: absolute; - left: 11px; - top: 9px; - width: 16px; + left: 0; + top: -4px; + width: @icon-size; + + img { + width: @icon-size; + height: @icon-size; + } } .label { display: block; - max-width: 140px; - margin: 0 0 0 24px; + margin: 0 0 0 (@icon-size + 8px); } .date, .size { @@ -39,3 +49,62 @@ } } } + + +.view-grid-sized(@size) { + + li { + + &.item { + + a, a:active, a:visited { + width: @size + 182px; + height: @size + 6px; + } + + .label, .date, .size { + padding: ((@size - 16px)/2) 8px; + } + } + + .icon.square { + width: @size; + + img { + width: @size; + height: @size; + } + } + + .label { + margin: 0 0 0 (@size + 8px); + } + } +} + + +#view.view-grid { + &.size-16 { + .view-grid-sized(16px) + } + + &.size-24 { + .view-grid-sized(24px) + } + + &.size-32 { + .view-grid-sized(32px) + } + + &.size-48 { + .view-grid-sized(48px) + } + + &.size-64 { + .view-grid-sized(64px) + } + + &.size-96 { + .view-grid-sized(96px) + } +} diff --git a/src/_h5ai/client/css/inc/view-icons.less b/src/_h5ai/client/css/inc/view-icons.less index 77415cc1..ecbab927 100644 --- a/src/_h5ai/client/css/inc/view-icons.less +++ b/src/_h5ai/client/css/inc/view-icons.less @@ -6,13 +6,13 @@ &.item { float: left; + margin: 8px; a, a:active, a:visited { - float: left; - margin: 8px; padding: 8px; - width: 100px; - height: 120px; + min-width: 96px; + width: @icon-size * 2; + height: @icon-size + 72px; border: 1px solid rgba(0,0,0,0); &:hover, &.hover { @@ -21,10 +21,15 @@ } } - .icon.big { + .icon.rational { display: block; - height: 48px; + height: @icon-size; margin-bottom: 6px; + + img { + max-width: @icon-size * 2; + max-height: @icon-size; + } } .label { @@ -44,3 +49,54 @@ height: 120px; } } + + +.view-icons-sized(@size) { + + li { + + &.item { + + a, a:active, a:visited { + width: @size * 2; + height: @size + 72px; + } + } + + .icon.rational { + height: @size; + + img { + max-width: @size * 2; + max-height: @size; + } + } + } +} + + +#view.view-icons { + &.size-16 { + .view-icons-sized(16px) + } + + &.size-24 { + .view-icons-sized(24px) + } + + &.size-32 { + .view-icons-sized(32px) + } + + &.size-48 { + .view-icons-sized(48px) + } + + &.size-64 { + .view-icons-sized(64px) + } + + &.size-96 { + .view-icons-sized(96px) + } +} diff --git a/src/_h5ai/client/css/inc/view-list.less b/src/_h5ai/client/css/inc/view-list.less deleted file mode 100644 index 42b77c6a..00000000 --- a/src/_h5ai/client/css/inc/view-list.less +++ /dev/null @@ -1,62 +0,0 @@ - -#view.view-list { - - li { - - &.header { - display: list-item; - } - - &.item { - - a, a:active, a:visited { - border-top: 1px solid @item-border-col-sep; - border-bottom: 1px solid @item-border-col-sep; - height: 60px; - - &:hover, &.hover { - border-color: @item-border-col-hover; - } - } - - // needs to be here, to not conflict with header fields - .icon { - padding: 8px 6px; - } - .label, .date, .size { - padding: 18px 6px; - } - } - - &.item + .item { - - a, a:active, a:visited { - border-top: none; - } - } - - .icon.big { - display: inline-block; - position: absolute; - left: 0; - top: -2px; - width: 100px; - } - - .label { - margin: 0 270px 0 110px; - } - - .date { - position: absolute; - right: 100px; - top: 0; - } - - .size { - position: absolute; - right: 0; - top: 0; - } - } -} diff --git a/src/_h5ai/client/css/inc/view.less b/src/_h5ai/client/css/inc/view.less index f75c44c7..39edaa8a 100644 --- a/src/_h5ai/client/css/inc/view.less +++ b/src/_h5ai/client/css/inc/view.less @@ -1,4 +1,16 @@ + +@item-border-col-sep: @col-border; + +@item-background-col-hover: rgba(0,0,0,0.02); +@item-border-col-hover: @col-border; + +@item-background-col-sel: rgba(0,0,0,0.02); +@item-border-col-sel: @col-border-strong; + +@icon-size: 48px; + + #selection-rect { display: none; position: absolute; @@ -9,15 +21,6 @@ background-color: rgba(0,0,0,0.01); } -@item-border-col-sep: @col-border; - -@item-background-col-hover: rgba(0,0,0,0.02); -@item-border-col-hover: @col-border; - -@item-background-col-sel: rgba(0,0,0,0.02); -@item-border-col-sel: @col-border-strong; - - #view { display: none; @@ -70,24 +73,28 @@ } &.item { + font-size: 15px; a, a:active, a:visited { display: block; overflow: hidden; &:hover, &.hover { - // color: #e80; color: @col-hover; background-color: @item-background-col-hover; border-color: @item-border-col-hover; } + + &:hover { + .selector { + display: block; + } + } } &.selected:not(.selecting), &.selecting:not(.selected) { a, a:active, a:visited { - // color: #000; - // color: @col-hover; background-color: @item-background-col-sel; border-color: @item-border-col-sel; @@ -96,6 +103,15 @@ border-color: @item-border-col-sel; } } + + .selector { + display: block; + // border-color: @col-border-stronger; + + img { + display: block; + } + } } } @@ -105,7 +121,6 @@ color: #aaa; &:hover, &.hover { - // color: #e80; color: @col-hover; } } @@ -129,25 +144,10 @@ text-align: center; img { + vertical-align: top; &.thumb { - .box-shadow(0 0 0 1px #ddd); - } - } - - &.small { - - img { - max-width: 16px; - max-height: 16px; - } - } - - &.big { - - img { - max-width: 100px; - max-height: 48px; + box-shadow: 0 0 0 1px #ddd; } } } @@ -156,17 +156,41 @@ display: block; overflow: hidden; text-align: left; + text-overflow: ellipsis; } .date { text-align: right; - width: 160px; + width: 130px; } .size { text-align: right; width: 80px; } + + .selector { + display: none; + position: absolute; + left: 0; + top: 0; + width: 18px; + height: 18px; + background-color: #fff; + border: 1px solid @col-border-strong; + cursor: pointer; + .transition(all 0.2s ease-in-out); + + &:hover { + border-color: @col-border-stronger; + } + + img { + display: none; + width: 100%; + height: 100%; + } + } } .empty, .no-match { diff --git a/src/_h5ai/client/css/lib/mixins.less b/src/_h5ai/client/css/lib/mixins.less deleted file mode 100644 index e1ecd862..00000000 --- a/src/_h5ai/client/css/lib/mixins.less +++ /dev/null @@ -1,57 +0,0 @@ - -.border-radius (@radius) { - -webkit-border-radius: @radius; /* Saf3-4, iOS 1-3.2, Android <1.6 */ - -moz-border-radius: @radius; /* FF1-3.6 */ - border-radius: @radius; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */ -} - - -.background-clip () { - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - - -.box-shadow (@shadow) { - -webkit-box-shadow: @shadow; /* Saf3-4 */ - -moz-box-shadow: @shadow; /* FF3.5 - 3.6 */ - box-shadow: @shadow; /* Opera 10.5, IE9, FF4+, Chrome 10+ */ -} - - -.transition (@transition) { - -webkit-transition: @transition; /* Saf3.2+, Chrome */ - -moz-transition: @transition; /* FF4+ */ - -ms-transition: @transition; /* IE10? */ - -o-transition: @transition; /* Opera 10.5+ */ - transition: @transition; -} - - -.transform (@transform) { - -webkit-transform: @transform; /* Saf3.1+, Chrome */ - -moz-transform: @transform; /* FF3.5+ */ - -ms-transform: @transform; /* IE9 */ - -o-transform: @transform; /* Opera 10.5 */ - transform: @transform; - zoom: 1; -} - - -.vert-gradient (@top, @bottom) { - background-color: @top; - background-image: -webkit-gradient(linear, left top, left bottom, from(@top), to(@bottom)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient(top, @top, @bottom); /* Chrome 10+, Saf5.1+, iOS 5+ */ - background-image: -moz-linear-gradient(top, @top, @bottom); /* FF3.6 */ - background-image: -ms-linear-gradient(top, @top, @bottom); /* IE10 */ - background-image: -o-linear-gradient(top, @top, @bottom); /* Opera 11.10+ */ - background-image: linear-gradient(top, @top, @bottom); -} - - -.background-size (@size) { - -webkit-background-size: @size; /* Saf3-4 */ - -moz-background-size: @size; /* FF3.6 */ - background-size: @size; /* Opera, IE9, Saf5, Chrome, FF4 */ -} diff --git a/src/_h5ai/client/css/styles.less b/src/_h5ai/client/css/styles.less index de6b62e8..b2fba482 100644 --- a/src/_h5ai/client/css/styles.less +++ b/src/_h5ai/client/css/styles.less @@ -2,8 +2,6 @@ @import "lib/h5bp-normalize"; @import "lib/h5bp-main-header"; -@import "lib/mixins"; - @import "inc/general"; @import "inc/topbar"; @import "inc/bottombar"; @@ -13,6 +11,7 @@ @import "inc/l10n"; @import "inc/tree"; @import "inc/qrcode"; +@import "inc/preview"; @import "inc/preview-img"; @import "inc/preview-txt"; @import "inc/notify"; @@ -21,7 +20,6 @@ @import "inc/view"; @import "inc/view-details"; @import "inc/view-icons"; -@import "inc/view-list"; @import "inc/view-grid"; // @import "inc/context-menu"; @import "inc/dropbox"; diff --git a/src/_h5ai/client/icons/16x16/archive.png b/src/_h5ai/client/icons/16x16/archive.png deleted file mode 100644 index 99ae6fc6..00000000 Binary files a/src/_h5ai/client/icons/16x16/archive.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/audio.png b/src/_h5ai/client/icons/16x16/audio.png deleted file mode 100644 index a67618d1..00000000 Binary files a/src/_h5ai/client/icons/16x16/audio.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/authors.png b/src/_h5ai/client/icons/16x16/authors.png deleted file mode 100644 index 78bf784d..00000000 Binary files a/src/_h5ai/client/icons/16x16/authors.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/bin.png b/src/_h5ai/client/icons/16x16/bin.png deleted file mode 100644 index ec2220bc..00000000 Binary files a/src/_h5ai/client/icons/16x16/bin.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/blank.png b/src/_h5ai/client/icons/16x16/blank.png deleted file mode 100644 index bef1f600..00000000 Binary files a/src/_h5ai/client/icons/16x16/blank.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/bmp.png b/src/_h5ai/client/icons/16x16/bmp.png deleted file mode 100644 index c6f30443..00000000 Binary files a/src/_h5ai/client/icons/16x16/bmp.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/c.png b/src/_h5ai/client/icons/16x16/c.png deleted file mode 100644 index 12adaa37..00000000 Binary files a/src/_h5ai/client/icons/16x16/c.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/calc.png b/src/_h5ai/client/icons/16x16/calc.png deleted file mode 100644 index a0343673..00000000 Binary files a/src/_h5ai/client/icons/16x16/calc.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/cd.png b/src/_h5ai/client/icons/16x16/cd.png deleted file mode 100644 index 3a3ffbb9..00000000 Binary files a/src/_h5ai/client/icons/16x16/cd.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/copying.png b/src/_h5ai/client/icons/16x16/copying.png deleted file mode 100644 index 83fa06e6..00000000 Binary files a/src/_h5ai/client/icons/16x16/copying.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/cpp.png b/src/_h5ai/client/icons/16x16/cpp.png deleted file mode 100644 index 47e8b1e2..00000000 Binary files a/src/_h5ai/client/icons/16x16/cpp.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/css.png b/src/_h5ai/client/icons/16x16/css.png deleted file mode 100644 index 15f76955..00000000 Binary files a/src/_h5ai/client/icons/16x16/css.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/deb.png b/src/_h5ai/client/icons/16x16/deb.png deleted file mode 100644 index 1b12d290..00000000 Binary files a/src/_h5ai/client/icons/16x16/deb.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/default.png b/src/_h5ai/client/icons/16x16/default.png deleted file mode 100644 index 69972298..00000000 Binary files a/src/_h5ai/client/icons/16x16/default.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/diff.png b/src/_h5ai/client/icons/16x16/diff.png deleted file mode 100644 index 5bef9207..00000000 Binary files a/src/_h5ai/client/icons/16x16/diff.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/doc.png b/src/_h5ai/client/icons/16x16/doc.png deleted file mode 100644 index 5732f9b2..00000000 Binary files a/src/_h5ai/client/icons/16x16/doc.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/draw.png b/src/_h5ai/client/icons/16x16/draw.png deleted file mode 100644 index 8f1da5c3..00000000 Binary files a/src/_h5ai/client/icons/16x16/draw.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/eps.png b/src/_h5ai/client/icons/16x16/eps.png deleted file mode 100644 index 93736bb9..00000000 Binary files a/src/_h5ai/client/icons/16x16/eps.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/exe.png b/src/_h5ai/client/icons/16x16/exe.png deleted file mode 100644 index 31299b7f..00000000 Binary files a/src/_h5ai/client/icons/16x16/exe.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder-0.png b/src/_h5ai/client/icons/16x16/folder-0.png deleted file mode 100644 index 7c613e05..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder-0.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder-page-0.png b/src/_h5ai/client/icons/16x16/folder-page-0.png deleted file mode 100644 index 604f9ad1..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder-page-0.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder-page.png b/src/_h5ai/client/icons/16x16/folder-page.png deleted file mode 100644 index bd2f8b99..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder-page.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder-parent-0.png b/src/_h5ai/client/icons/16x16/folder-parent-0.png deleted file mode 100644 index b82d7a99..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder-parent-0.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder-parent-1.png b/src/_h5ai/client/icons/16x16/folder-parent-1.png deleted file mode 100644 index 3c964f19..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder-parent-1.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder-parent.png b/src/_h5ai/client/icons/16x16/folder-parent.png deleted file mode 100644 index 183c3c8e..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder-parent.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/folder.png b/src/_h5ai/client/icons/16x16/folder.png deleted file mode 100644 index a8d601ae..00000000 Binary files a/src/_h5ai/client/icons/16x16/folder.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/gif.png b/src/_h5ai/client/icons/16x16/gif.png deleted file mode 100644 index 01a2f2a8..00000000 Binary files a/src/_h5ai/client/icons/16x16/gif.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/gzip.png b/src/_h5ai/client/icons/16x16/gzip.png deleted file mode 100644 index 99ae6fc6..00000000 Binary files a/src/_h5ai/client/icons/16x16/gzip.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/h.png b/src/_h5ai/client/icons/16x16/h.png deleted file mode 100644 index d3c7a9cc..00000000 Binary files a/src/_h5ai/client/icons/16x16/h.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/hpp.png b/src/_h5ai/client/icons/16x16/hpp.png deleted file mode 100644 index e5e52e25..00000000 Binary files a/src/_h5ai/client/icons/16x16/hpp.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/html.png b/src/_h5ai/client/icons/16x16/html.png deleted file mode 100644 index 2f94a784..00000000 Binary files a/src/_h5ai/client/icons/16x16/html.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/ico.png b/src/_h5ai/client/icons/16x16/ico.png deleted file mode 100644 index 82227e85..00000000 Binary files a/src/_h5ai/client/icons/16x16/ico.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/image.png b/src/_h5ai/client/icons/16x16/image.png deleted file mode 100644 index add1c591..00000000 Binary files a/src/_h5ai/client/icons/16x16/image.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/install.png b/src/_h5ai/client/icons/16x16/install.png deleted file mode 100644 index 0a9c0366..00000000 Binary files a/src/_h5ai/client/icons/16x16/install.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/java.png b/src/_h5ai/client/icons/16x16/java.png deleted file mode 100644 index 63b86830..00000000 Binary files a/src/_h5ai/client/icons/16x16/java.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/jpg.png b/src/_h5ai/client/icons/16x16/jpg.png deleted file mode 100644 index a50c99bb..00000000 Binary files a/src/_h5ai/client/icons/16x16/jpg.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/js.png b/src/_h5ai/client/icons/16x16/js.png deleted file mode 100644 index af1a475e..00000000 Binary files a/src/_h5ai/client/icons/16x16/js.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/json.png b/src/_h5ai/client/icons/16x16/json.png deleted file mode 100644 index af1a475e..00000000 Binary files a/src/_h5ai/client/icons/16x16/json.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/log.png b/src/_h5ai/client/icons/16x16/log.png deleted file mode 100644 index 02f1b9ac..00000000 Binary files a/src/_h5ai/client/icons/16x16/log.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/makefile.png b/src/_h5ai/client/icons/16x16/makefile.png deleted file mode 100644 index f99ea4c0..00000000 Binary files a/src/_h5ai/client/icons/16x16/makefile.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/markdown.png b/src/_h5ai/client/icons/16x16/markdown.png deleted file mode 100644 index 25c8373c..00000000 Binary files a/src/_h5ai/client/icons/16x16/markdown.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/package.png b/src/_h5ai/client/icons/16x16/package.png deleted file mode 100644 index fb1343ea..00000000 Binary files a/src/_h5ai/client/icons/16x16/package.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/pdf.png b/src/_h5ai/client/icons/16x16/pdf.png deleted file mode 100644 index 7408d8d6..00000000 Binary files a/src/_h5ai/client/icons/16x16/pdf.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/php.png b/src/_h5ai/client/icons/16x16/php.png deleted file mode 100644 index 22c4df63..00000000 Binary files a/src/_h5ai/client/icons/16x16/php.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/playlist.png b/src/_h5ai/client/icons/16x16/playlist.png deleted file mode 100644 index 8d6f281a..00000000 Binary files a/src/_h5ai/client/icons/16x16/playlist.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/png.png b/src/_h5ai/client/icons/16x16/png.png deleted file mode 100644 index 1fe1ec4e..00000000 Binary files a/src/_h5ai/client/icons/16x16/png.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/pres.png b/src/_h5ai/client/icons/16x16/pres.png deleted file mode 100644 index db195e92..00000000 Binary files a/src/_h5ai/client/icons/16x16/pres.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/ps.png b/src/_h5ai/client/icons/16x16/ps.png deleted file mode 100644 index 05f3ed93..00000000 Binary files a/src/_h5ai/client/icons/16x16/ps.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/psd.png b/src/_h5ai/client/icons/16x16/psd.png deleted file mode 100644 index 62718ee2..00000000 Binary files a/src/_h5ai/client/icons/16x16/psd.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/py.png b/src/_h5ai/client/icons/16x16/py.png deleted file mode 100644 index 0aaffd18..00000000 Binary files a/src/_h5ai/client/icons/16x16/py.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/rar.png b/src/_h5ai/client/icons/16x16/rar.png deleted file mode 100644 index 8a0ff54f..00000000 Binary files a/src/_h5ai/client/icons/16x16/rar.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/rb.png b/src/_h5ai/client/icons/16x16/rb.png deleted file mode 100644 index c7db42fc..00000000 Binary files a/src/_h5ai/client/icons/16x16/rb.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/readme.png b/src/_h5ai/client/icons/16x16/readme.png deleted file mode 100644 index 3ae48cd0..00000000 Binary files a/src/_h5ai/client/icons/16x16/readme.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/rpm.png b/src/_h5ai/client/icons/16x16/rpm.png deleted file mode 100644 index 64699ac0..00000000 Binary files a/src/_h5ai/client/icons/16x16/rpm.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/rss.png b/src/_h5ai/client/icons/16x16/rss.png deleted file mode 100644 index a1130a10..00000000 Binary files a/src/_h5ai/client/icons/16x16/rss.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/rtf.png b/src/_h5ai/client/icons/16x16/rtf.png deleted file mode 100644 index 25c8373c..00000000 Binary files a/src/_h5ai/client/icons/16x16/rtf.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/script.png b/src/_h5ai/client/icons/16x16/script.png deleted file mode 100644 index 1099b5fe..00000000 Binary files a/src/_h5ai/client/icons/16x16/script.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/source.png b/src/_h5ai/client/icons/16x16/source.png deleted file mode 100644 index 5bef9207..00000000 Binary files a/src/_h5ai/client/icons/16x16/source.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/sql.png b/src/_h5ai/client/icons/16x16/sql.png deleted file mode 100644 index b3b1467b..00000000 Binary files a/src/_h5ai/client/icons/16x16/sql.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/tar.png b/src/_h5ai/client/icons/16x16/tar.png deleted file mode 100644 index bab3b6ad..00000000 Binary files a/src/_h5ai/client/icons/16x16/tar.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/tex.png b/src/_h5ai/client/icons/16x16/tex.png deleted file mode 100644 index 1487b253..00000000 Binary files a/src/_h5ai/client/icons/16x16/tex.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/text.png b/src/_h5ai/client/icons/16x16/text.png deleted file mode 100644 index 1d48677c..00000000 Binary files a/src/_h5ai/client/icons/16x16/text.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/tiff.png b/src/_h5ai/client/icons/16x16/tiff.png deleted file mode 100644 index 819e64cd..00000000 Binary files a/src/_h5ai/client/icons/16x16/tiff.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/unknown.png b/src/_h5ai/client/icons/16x16/unknown.png deleted file mode 100644 index b1dcc3f6..00000000 Binary files a/src/_h5ai/client/icons/16x16/unknown.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/vcal.png b/src/_h5ai/client/icons/16x16/vcal.png deleted file mode 100644 index 3d814558..00000000 Binary files a/src/_h5ai/client/icons/16x16/vcal.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/video.png b/src/_h5ai/client/icons/16x16/video.png deleted file mode 100644 index f92f7e1e..00000000 Binary files a/src/_h5ai/client/icons/16x16/video.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/xml.png b/src/_h5ai/client/icons/16x16/xml.png deleted file mode 100644 index 83a83df9..00000000 Binary files a/src/_h5ai/client/icons/16x16/xml.png and /dev/null differ diff --git a/src/_h5ai/client/icons/16x16/zip.png b/src/_h5ai/client/icons/16x16/zip.png deleted file mode 100644 index cc196c1e..00000000 Binary files a/src/_h5ai/client/icons/16x16/zip.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/archive.png b/src/_h5ai/client/icons/48x48/archive.png deleted file mode 100644 index b3c07d56..00000000 Binary files a/src/_h5ai/client/icons/48x48/archive.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/audio.png b/src/_h5ai/client/icons/48x48/audio.png deleted file mode 100644 index 20c14897..00000000 Binary files a/src/_h5ai/client/icons/48x48/audio.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/authors.png b/src/_h5ai/client/icons/48x48/authors.png deleted file mode 100644 index 90ff6b3a..00000000 Binary files a/src/_h5ai/client/icons/48x48/authors.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/bin.png b/src/_h5ai/client/icons/48x48/bin.png deleted file mode 100644 index f623dceb..00000000 Binary files a/src/_h5ai/client/icons/48x48/bin.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/blank.png b/src/_h5ai/client/icons/48x48/blank.png deleted file mode 100644 index 78363b0f..00000000 Binary files a/src/_h5ai/client/icons/48x48/blank.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/bmp.png b/src/_h5ai/client/icons/48x48/bmp.png deleted file mode 100644 index 675cbf66..00000000 Binary files a/src/_h5ai/client/icons/48x48/bmp.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/c.png b/src/_h5ai/client/icons/48x48/c.png deleted file mode 100644 index 87ade51c..00000000 Binary files a/src/_h5ai/client/icons/48x48/c.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/calc.png b/src/_h5ai/client/icons/48x48/calc.png deleted file mode 100644 index af88f835..00000000 Binary files a/src/_h5ai/client/icons/48x48/calc.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/cd.png b/src/_h5ai/client/icons/48x48/cd.png deleted file mode 100644 index 7c73c487..00000000 Binary files a/src/_h5ai/client/icons/48x48/cd.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/copying.png b/src/_h5ai/client/icons/48x48/copying.png deleted file mode 100644 index 199d436c..00000000 Binary files a/src/_h5ai/client/icons/48x48/copying.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/cpp.png b/src/_h5ai/client/icons/48x48/cpp.png deleted file mode 100644 index 29b43873..00000000 Binary files a/src/_h5ai/client/icons/48x48/cpp.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/css.png b/src/_h5ai/client/icons/48x48/css.png deleted file mode 100644 index b0d09ee2..00000000 Binary files a/src/_h5ai/client/icons/48x48/css.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/deb.png b/src/_h5ai/client/icons/48x48/deb.png deleted file mode 100644 index a2806434..00000000 Binary files a/src/_h5ai/client/icons/48x48/deb.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/default.png b/src/_h5ai/client/icons/48x48/default.png deleted file mode 100644 index ec5c158d..00000000 Binary files a/src/_h5ai/client/icons/48x48/default.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/diff.png b/src/_h5ai/client/icons/48x48/diff.png deleted file mode 100644 index c7bf4344..00000000 Binary files a/src/_h5ai/client/icons/48x48/diff.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/doc.png b/src/_h5ai/client/icons/48x48/doc.png deleted file mode 100644 index da782123..00000000 Binary files a/src/_h5ai/client/icons/48x48/doc.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/draw.png b/src/_h5ai/client/icons/48x48/draw.png deleted file mode 100644 index 60c4836c..00000000 Binary files a/src/_h5ai/client/icons/48x48/draw.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/eps.png b/src/_h5ai/client/icons/48x48/eps.png deleted file mode 100644 index f5ebfe61..00000000 Binary files a/src/_h5ai/client/icons/48x48/eps.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/exe.png b/src/_h5ai/client/icons/48x48/exe.png deleted file mode 100644 index 0860f77c..00000000 Binary files a/src/_h5ai/client/icons/48x48/exe.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/folder-0.png b/src/_h5ai/client/icons/48x48/folder-0.png deleted file mode 100644 index f47e7e13..00000000 Binary files a/src/_h5ai/client/icons/48x48/folder-0.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/folder-page-0.png b/src/_h5ai/client/icons/48x48/folder-page-0.png deleted file mode 100644 index cd2175a9..00000000 Binary files a/src/_h5ai/client/icons/48x48/folder-page-0.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/folder-page.png b/src/_h5ai/client/icons/48x48/folder-page.png deleted file mode 100644 index 6a3ca2be..00000000 Binary files a/src/_h5ai/client/icons/48x48/folder-page.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/folder-parent-0.png b/src/_h5ai/client/icons/48x48/folder-parent-0.png deleted file mode 100644 index 0ae73de1..00000000 Binary files a/src/_h5ai/client/icons/48x48/folder-parent-0.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/folder-parent.png b/src/_h5ai/client/icons/48x48/folder-parent.png deleted file mode 100644 index 6a8ec84b..00000000 Binary files a/src/_h5ai/client/icons/48x48/folder-parent.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/folder.png b/src/_h5ai/client/icons/48x48/folder.png deleted file mode 100644 index bf477170..00000000 Binary files a/src/_h5ai/client/icons/48x48/folder.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/gif.png b/src/_h5ai/client/icons/48x48/gif.png deleted file mode 100644 index 0c525a1d..00000000 Binary files a/src/_h5ai/client/icons/48x48/gif.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/gzip.png b/src/_h5ai/client/icons/48x48/gzip.png deleted file mode 100644 index 6048579e..00000000 Binary files a/src/_h5ai/client/icons/48x48/gzip.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/h.png b/src/_h5ai/client/icons/48x48/h.png deleted file mode 100644 index 7999fc64..00000000 Binary files a/src/_h5ai/client/icons/48x48/h.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/hpp.png b/src/_h5ai/client/icons/48x48/hpp.png deleted file mode 100644 index a1f60756..00000000 Binary files a/src/_h5ai/client/icons/48x48/hpp.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/html.png b/src/_h5ai/client/icons/48x48/html.png deleted file mode 100644 index 36a1338c..00000000 Binary files a/src/_h5ai/client/icons/48x48/html.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/ico.png b/src/_h5ai/client/icons/48x48/ico.png deleted file mode 100644 index 3c32c985..00000000 Binary files a/src/_h5ai/client/icons/48x48/ico.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/image.png b/src/_h5ai/client/icons/48x48/image.png deleted file mode 100644 index 69bd44e7..00000000 Binary files a/src/_h5ai/client/icons/48x48/image.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/install.png b/src/_h5ai/client/icons/48x48/install.png deleted file mode 100644 index 0eb4fe1c..00000000 Binary files a/src/_h5ai/client/icons/48x48/install.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/java.png b/src/_h5ai/client/icons/48x48/java.png deleted file mode 100644 index b52c20ab..00000000 Binary files a/src/_h5ai/client/icons/48x48/java.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/jpg.png b/src/_h5ai/client/icons/48x48/jpg.png deleted file mode 100644 index f1d14cbe..00000000 Binary files a/src/_h5ai/client/icons/48x48/jpg.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/js.png b/src/_h5ai/client/icons/48x48/js.png deleted file mode 100644 index dbe9da65..00000000 Binary files a/src/_h5ai/client/icons/48x48/js.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/json.png b/src/_h5ai/client/icons/48x48/json.png deleted file mode 100644 index dbe9da65..00000000 Binary files a/src/_h5ai/client/icons/48x48/json.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/log.png b/src/_h5ai/client/icons/48x48/log.png deleted file mode 100644 index 23ac5af9..00000000 Binary files a/src/_h5ai/client/icons/48x48/log.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/makefile.png b/src/_h5ai/client/icons/48x48/makefile.png deleted file mode 100644 index 93187aa4..00000000 Binary files a/src/_h5ai/client/icons/48x48/makefile.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/markdown.png b/src/_h5ai/client/icons/48x48/markdown.png deleted file mode 100644 index 62ed33c9..00000000 Binary files a/src/_h5ai/client/icons/48x48/markdown.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/package.png b/src/_h5ai/client/icons/48x48/package.png deleted file mode 100644 index f9b43e9a..00000000 Binary files a/src/_h5ai/client/icons/48x48/package.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/pdf.png b/src/_h5ai/client/icons/48x48/pdf.png deleted file mode 100644 index 6bb7ab28..00000000 Binary files a/src/_h5ai/client/icons/48x48/pdf.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/php.png b/src/_h5ai/client/icons/48x48/php.png deleted file mode 100644 index 1bac2ec1..00000000 Binary files a/src/_h5ai/client/icons/48x48/php.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/playlist.png b/src/_h5ai/client/icons/48x48/playlist.png deleted file mode 100644 index 19ffe58c..00000000 Binary files a/src/_h5ai/client/icons/48x48/playlist.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/png.png b/src/_h5ai/client/icons/48x48/png.png deleted file mode 100644 index 90b70598..00000000 Binary files a/src/_h5ai/client/icons/48x48/png.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/pres.png b/src/_h5ai/client/icons/48x48/pres.png deleted file mode 100644 index d08d1b17..00000000 Binary files a/src/_h5ai/client/icons/48x48/pres.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/ps.png b/src/_h5ai/client/icons/48x48/ps.png deleted file mode 100644 index 52c30492..00000000 Binary files a/src/_h5ai/client/icons/48x48/ps.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/psd.png b/src/_h5ai/client/icons/48x48/psd.png deleted file mode 100644 index caae2589..00000000 Binary files a/src/_h5ai/client/icons/48x48/psd.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/py.png b/src/_h5ai/client/icons/48x48/py.png deleted file mode 100644 index adc55705..00000000 Binary files a/src/_h5ai/client/icons/48x48/py.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/rar.png b/src/_h5ai/client/icons/48x48/rar.png deleted file mode 100644 index a9b49d1f..00000000 Binary files a/src/_h5ai/client/icons/48x48/rar.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/rb.png b/src/_h5ai/client/icons/48x48/rb.png deleted file mode 100644 index 69e0da52..00000000 Binary files a/src/_h5ai/client/icons/48x48/rb.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/readme.png b/src/_h5ai/client/icons/48x48/readme.png deleted file mode 100644 index 84d994d8..00000000 Binary files a/src/_h5ai/client/icons/48x48/readme.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/rpm.png b/src/_h5ai/client/icons/48x48/rpm.png deleted file mode 100644 index 1264e621..00000000 Binary files a/src/_h5ai/client/icons/48x48/rpm.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/rss.png b/src/_h5ai/client/icons/48x48/rss.png deleted file mode 100644 index ccf5882c..00000000 Binary files a/src/_h5ai/client/icons/48x48/rss.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/rtf.png b/src/_h5ai/client/icons/48x48/rtf.png deleted file mode 100644 index 62ed33c9..00000000 Binary files a/src/_h5ai/client/icons/48x48/rtf.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/script.png b/src/_h5ai/client/icons/48x48/script.png deleted file mode 100644 index cbae3e1c..00000000 Binary files a/src/_h5ai/client/icons/48x48/script.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/source.png b/src/_h5ai/client/icons/48x48/source.png deleted file mode 100644 index c7bf4344..00000000 Binary files a/src/_h5ai/client/icons/48x48/source.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/sql.png b/src/_h5ai/client/icons/48x48/sql.png deleted file mode 100644 index ca3fa0e5..00000000 Binary files a/src/_h5ai/client/icons/48x48/sql.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/tar.png b/src/_h5ai/client/icons/48x48/tar.png deleted file mode 100644 index ba2a7738..00000000 Binary files a/src/_h5ai/client/icons/48x48/tar.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/tex.png b/src/_h5ai/client/icons/48x48/tex.png deleted file mode 100644 index 66e57411..00000000 Binary files a/src/_h5ai/client/icons/48x48/tex.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/text.png b/src/_h5ai/client/icons/48x48/text.png deleted file mode 100644 index fefa360d..00000000 Binary files a/src/_h5ai/client/icons/48x48/text.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/tiff.png b/src/_h5ai/client/icons/48x48/tiff.png deleted file mode 100644 index 6bf950b7..00000000 Binary files a/src/_h5ai/client/icons/48x48/tiff.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/unknown.png b/src/_h5ai/client/icons/48x48/unknown.png deleted file mode 100644 index 41c53cdf..00000000 Binary files a/src/_h5ai/client/icons/48x48/unknown.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/vcal.png b/src/_h5ai/client/icons/48x48/vcal.png deleted file mode 100644 index d026cbf6..00000000 Binary files a/src/_h5ai/client/icons/48x48/vcal.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/video.png b/src/_h5ai/client/icons/48x48/video.png deleted file mode 100644 index 6b8f79c0..00000000 Binary files a/src/_h5ai/client/icons/48x48/video.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/xml.png b/src/_h5ai/client/icons/48x48/xml.png deleted file mode 100644 index 5cda3e62..00000000 Binary files a/src/_h5ai/client/icons/48x48/xml.png and /dev/null differ diff --git a/src/_h5ai/client/icons/48x48/zip.png b/src/_h5ai/client/icons/48x48/zip.png deleted file mode 100644 index 4d2c42ba..00000000 Binary files a/src/_h5ai/client/icons/48x48/zip.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/7zip.png b/src/_h5ai/client/icons/96/7zip.png new file mode 100644 index 00000000..fc84a3e7 Binary files /dev/null and b/src/_h5ai/client/icons/96/7zip.png differ diff --git a/src/_h5ai/client/icons/96/ace.png b/src/_h5ai/client/icons/96/ace.png new file mode 100644 index 00000000..5b244922 Binary files /dev/null and b/src/_h5ai/client/icons/96/ace.png differ diff --git a/src/_h5ai/client/icons/96/archive.png b/src/_h5ai/client/icons/96/archive.png new file mode 100644 index 00000000..e8f85877 Binary files /dev/null and b/src/_h5ai/client/icons/96/archive.png differ diff --git a/src/_h5ai/client/icons/96/audio.png b/src/_h5ai/client/icons/96/audio.png new file mode 100644 index 00000000..a59842ae Binary files /dev/null and b/src/_h5ai/client/icons/96/audio.png differ diff --git a/src/_h5ai/client/icons/96/authors.png b/src/_h5ai/client/icons/96/authors.png new file mode 100644 index 00000000..02663d26 Binary files /dev/null and b/src/_h5ai/client/icons/96/authors.png differ diff --git a/src/_h5ai/client/icons/96/bak.png b/src/_h5ai/client/icons/96/bak.png new file mode 100644 index 00000000..916f486c Binary files /dev/null and b/src/_h5ai/client/icons/96/bak.png differ diff --git a/src/_h5ai/client/icons/96/bin.png b/src/_h5ai/client/icons/96/bin.png new file mode 100644 index 00000000..d6a19fa8 Binary files /dev/null and b/src/_h5ai/client/icons/96/bin.png differ diff --git a/src/_h5ai/client/icons/96/blank.png b/src/_h5ai/client/icons/96/blank.png new file mode 100644 index 00000000..3418e3e2 Binary files /dev/null and b/src/_h5ai/client/icons/96/blank.png differ diff --git a/src/_h5ai/client/icons/96/bmp.png b/src/_h5ai/client/icons/96/bmp.png new file mode 100644 index 00000000..325022cc Binary files /dev/null and b/src/_h5ai/client/icons/96/bmp.png differ diff --git a/src/_h5ai/client/icons/96/c.png b/src/_h5ai/client/icons/96/c.png new file mode 100644 index 00000000..2b9a8ea9 Binary files /dev/null and b/src/_h5ai/client/icons/96/c.png differ diff --git a/src/_h5ai/client/icons/96/calc.png b/src/_h5ai/client/icons/96/calc.png new file mode 100644 index 00000000..b73524ac Binary files /dev/null and b/src/_h5ai/client/icons/96/calc.png differ diff --git a/src/_h5ai/client/icons/96/cd.png b/src/_h5ai/client/icons/96/cd.png new file mode 100644 index 00000000..402e2136 Binary files /dev/null and b/src/_h5ai/client/icons/96/cd.png differ diff --git a/src/_h5ai/client/icons/96/copying.png b/src/_h5ai/client/icons/96/copying.png new file mode 100644 index 00000000..f0baf60b Binary files /dev/null and b/src/_h5ai/client/icons/96/copying.png differ diff --git a/src/_h5ai/client/icons/96/cpp.png b/src/_h5ai/client/icons/96/cpp.png new file mode 100644 index 00000000..41fda1e8 Binary files /dev/null and b/src/_h5ai/client/icons/96/cpp.png differ diff --git a/src/_h5ai/client/icons/96/css.png b/src/_h5ai/client/icons/96/css.png new file mode 100644 index 00000000..3aa68ea3 Binary files /dev/null and b/src/_h5ai/client/icons/96/css.png differ diff --git a/src/_h5ai/client/icons/96/cue.png b/src/_h5ai/client/icons/96/cue.png new file mode 100644 index 00000000..e2aa2000 Binary files /dev/null and b/src/_h5ai/client/icons/96/cue.png differ diff --git a/src/_h5ai/client/icons/96/deb.png b/src/_h5ai/client/icons/96/deb.png new file mode 100644 index 00000000..74ffc7e7 Binary files /dev/null and b/src/_h5ai/client/icons/96/deb.png differ diff --git a/src/_h5ai/client/icons/96/default.png b/src/_h5ai/client/icons/96/default.png new file mode 100644 index 00000000..48545606 Binary files /dev/null and b/src/_h5ai/client/icons/96/default.png differ diff --git a/src/_h5ai/client/icons/96/dia.png b/src/_h5ai/client/icons/96/dia.png new file mode 100644 index 00000000..ea41ca8b Binary files /dev/null and b/src/_h5ai/client/icons/96/dia.png differ diff --git a/src/_h5ai/client/icons/96/diff.png b/src/_h5ai/client/icons/96/diff.png new file mode 100644 index 00000000..b779bfb1 Binary files /dev/null and b/src/_h5ai/client/icons/96/diff.png differ diff --git a/src/_h5ai/client/icons/96/doc.png b/src/_h5ai/client/icons/96/doc.png new file mode 100644 index 00000000..f7a0e36d Binary files /dev/null and b/src/_h5ai/client/icons/96/doc.png differ diff --git a/src/_h5ai/client/icons/96/draw.png b/src/_h5ai/client/icons/96/draw.png new file mode 100644 index 00000000..0a615600 Binary files /dev/null and b/src/_h5ai/client/icons/96/draw.png differ diff --git a/src/_h5ai/client/icons/96/encrypted.png b/src/_h5ai/client/icons/96/encrypted.png new file mode 100644 index 00000000..7325b5d4 Binary files /dev/null and b/src/_h5ai/client/icons/96/encrypted.png differ diff --git a/src/_h5ai/client/icons/96/eps.png b/src/_h5ai/client/icons/96/eps.png new file mode 100644 index 00000000..170594db Binary files /dev/null and b/src/_h5ai/client/icons/96/eps.png differ diff --git a/src/_h5ai/client/icons/96/exe.png b/src/_h5ai/client/icons/96/exe.png new file mode 100644 index 00000000..2fb16639 Binary files /dev/null and b/src/_h5ai/client/icons/96/exe.png differ diff --git a/src/_h5ai/client/icons/96/flash.png b/src/_h5ai/client/icons/96/flash.png new file mode 100644 index 00000000..0a3de67d Binary files /dev/null and b/src/_h5ai/client/icons/96/flash.png differ diff --git a/src/_h5ai/client/icons/96/folder-page.png b/src/_h5ai/client/icons/96/folder-page.png new file mode 100644 index 00000000..5af90f7b Binary files /dev/null and b/src/_h5ai/client/icons/96/folder-page.png differ diff --git a/src/_h5ai/client/icons/96/folder-parent.png b/src/_h5ai/client/icons/96/folder-parent.png new file mode 100644 index 00000000..f47cc6e0 Binary files /dev/null and b/src/_h5ai/client/icons/96/folder-parent.png differ diff --git a/src/_h5ai/client/icons/96/folder.png b/src/_h5ai/client/icons/96/folder.png new file mode 100644 index 00000000..a7bf9334 Binary files /dev/null and b/src/_h5ai/client/icons/96/folder.png differ diff --git a/src/_h5ai/client/icons/96/font.png b/src/_h5ai/client/icons/96/font.png new file mode 100644 index 00000000..97d192bd Binary files /dev/null and b/src/_h5ai/client/icons/96/font.png differ diff --git a/src/_h5ai/client/icons/96/gif.png b/src/_h5ai/client/icons/96/gif.png new file mode 100644 index 00000000..eee13d67 Binary files /dev/null and b/src/_h5ai/client/icons/96/gif.png differ diff --git a/src/_h5ai/client/icons/96/glade.png b/src/_h5ai/client/icons/96/glade.png new file mode 100644 index 00000000..b5f2467e Binary files /dev/null and b/src/_h5ai/client/icons/96/glade.png differ diff --git a/src/_h5ai/client/icons/96/gzip.png b/src/_h5ai/client/icons/96/gzip.png new file mode 100644 index 00000000..282943a4 Binary files /dev/null and b/src/_h5ai/client/icons/96/gzip.png differ diff --git a/src/_h5ai/client/icons/96/h.png b/src/_h5ai/client/icons/96/h.png new file mode 100644 index 00000000..45fdc7cd Binary files /dev/null and b/src/_h5ai/client/icons/96/h.png differ diff --git a/src/_h5ai/client/icons/96/hpp.png b/src/_h5ai/client/icons/96/hpp.png new file mode 100644 index 00000000..a1f91ce3 Binary files /dev/null and b/src/_h5ai/client/icons/96/hpp.png differ diff --git a/src/_h5ai/client/icons/96/html.png b/src/_h5ai/client/icons/96/html.png new file mode 100644 index 00000000..89b5d567 Binary files /dev/null and b/src/_h5ai/client/icons/96/html.png differ diff --git a/src/_h5ai/client/icons/96/ico.png b/src/_h5ai/client/icons/96/ico.png new file mode 100644 index 00000000..f5eb99c4 Binary files /dev/null and b/src/_h5ai/client/icons/96/ico.png differ diff --git a/src/_h5ai/client/icons/96/image.png b/src/_h5ai/client/icons/96/image.png new file mode 100644 index 00000000..bdf05c6e Binary files /dev/null and b/src/_h5ai/client/icons/96/image.png differ diff --git a/src/_h5ai/client/icons/96/install.png b/src/_h5ai/client/icons/96/install.png new file mode 100644 index 00000000..174858d8 Binary files /dev/null and b/src/_h5ai/client/icons/96/install.png differ diff --git a/src/_h5ai/client/icons/96/jar.png b/src/_h5ai/client/icons/96/jar.png new file mode 100644 index 00000000..f41814a0 Binary files /dev/null and b/src/_h5ai/client/icons/96/jar.png differ diff --git a/src/_h5ai/client/icons/96/java.png b/src/_h5ai/client/icons/96/java.png new file mode 100644 index 00000000..06658cac Binary files /dev/null and b/src/_h5ai/client/icons/96/java.png differ diff --git a/src/_h5ai/client/icons/96/jpg.png b/src/_h5ai/client/icons/96/jpg.png new file mode 100644 index 00000000..63af404c Binary files /dev/null and b/src/_h5ai/client/icons/96/jpg.png differ diff --git a/src/_h5ai/client/icons/96/js.png b/src/_h5ai/client/icons/96/js.png new file mode 100644 index 00000000..35e58fa5 Binary files /dev/null and b/src/_h5ai/client/icons/96/js.png differ diff --git a/src/_h5ai/client/icons/96/json.png b/src/_h5ai/client/icons/96/json.png new file mode 100644 index 00000000..35e58fa5 Binary files /dev/null and b/src/_h5ai/client/icons/96/json.png differ diff --git a/src/_h5ai/client/icons/96/log.png b/src/_h5ai/client/icons/96/log.png new file mode 100644 index 00000000..4a686016 Binary files /dev/null and b/src/_h5ai/client/icons/96/log.png differ diff --git a/src/_h5ai/client/icons/96/makefile.png b/src/_h5ai/client/icons/96/makefile.png new file mode 100644 index 00000000..b385d0c0 Binary files /dev/null and b/src/_h5ai/client/icons/96/makefile.png differ diff --git a/src/_h5ai/client/icons/96/markdown.png b/src/_h5ai/client/icons/96/markdown.png new file mode 100644 index 00000000..15007924 Binary files /dev/null and b/src/_h5ai/client/icons/96/markdown.png differ diff --git a/src/_h5ai/client/icons/96/message.png b/src/_h5ai/client/icons/96/message.png new file mode 100644 index 00000000..5ee14d95 Binary files /dev/null and b/src/_h5ai/client/icons/96/message.png differ diff --git a/src/_h5ai/client/icons/96/mp3.png b/src/_h5ai/client/icons/96/mp3.png new file mode 100644 index 00000000..b26a9667 Binary files /dev/null and b/src/_h5ai/client/icons/96/mp3.png differ diff --git a/src/_h5ai/client/icons/96/ogg.png b/src/_h5ai/client/icons/96/ogg.png new file mode 100644 index 00000000..34a7185c Binary files /dev/null and b/src/_h5ai/client/icons/96/ogg.png differ diff --git a/src/_h5ai/client/icons/96/package.png b/src/_h5ai/client/icons/96/package.png new file mode 100644 index 00000000..d75909d3 Binary files /dev/null and b/src/_h5ai/client/icons/96/package.png differ diff --git a/src/_h5ai/client/icons/96/pdf.png b/src/_h5ai/client/icons/96/pdf.png new file mode 100644 index 00000000..551c133c Binary files /dev/null and b/src/_h5ai/client/icons/96/pdf.png differ diff --git a/src/_h5ai/client/icons/96/pgp.png b/src/_h5ai/client/icons/96/pgp.png new file mode 100644 index 00000000..8a4b2554 Binary files /dev/null and b/src/_h5ai/client/icons/96/pgp.png differ diff --git a/src/_h5ai/client/icons/96/php.png b/src/_h5ai/client/icons/96/php.png new file mode 100644 index 00000000..6cfd766e Binary files /dev/null and b/src/_h5ai/client/icons/96/php.png differ diff --git a/src/_h5ai/client/icons/96/playlist.png b/src/_h5ai/client/icons/96/playlist.png new file mode 100644 index 00000000..3fa9edfb Binary files /dev/null and b/src/_h5ai/client/icons/96/playlist.png differ diff --git a/src/_h5ai/client/icons/96/png.png b/src/_h5ai/client/icons/96/png.png new file mode 100644 index 00000000..ce7f88a1 Binary files /dev/null and b/src/_h5ai/client/icons/96/png.png differ diff --git a/src/_h5ai/client/icons/96/pres.png b/src/_h5ai/client/icons/96/pres.png new file mode 100644 index 00000000..e2a1f2c1 Binary files /dev/null and b/src/_h5ai/client/icons/96/pres.png differ diff --git a/src/_h5ai/client/icons/96/ps.png b/src/_h5ai/client/icons/96/ps.png new file mode 100644 index 00000000..cbc67241 Binary files /dev/null and b/src/_h5ai/client/icons/96/ps.png differ diff --git a/src/_h5ai/client/icons/96/psd.png b/src/_h5ai/client/icons/96/psd.png new file mode 100644 index 00000000..91b43f46 Binary files /dev/null and b/src/_h5ai/client/icons/96/psd.png differ diff --git a/src/_h5ai/client/icons/96/py.png b/src/_h5ai/client/icons/96/py.png new file mode 100644 index 00000000..d0e410ef Binary files /dev/null and b/src/_h5ai/client/icons/96/py.png differ diff --git a/src/_h5ai/client/icons/96/rar.png b/src/_h5ai/client/icons/96/rar.png new file mode 100644 index 00000000..0d0faa58 Binary files /dev/null and b/src/_h5ai/client/icons/96/rar.png differ diff --git a/src/_h5ai/client/icons/96/rb.png b/src/_h5ai/client/icons/96/rb.png new file mode 100644 index 00000000..9fcc9953 Binary files /dev/null and b/src/_h5ai/client/icons/96/rb.png differ diff --git a/src/_h5ai/client/icons/96/readme.png b/src/_h5ai/client/icons/96/readme.png new file mode 100644 index 00000000..82ff8f9a Binary files /dev/null and b/src/_h5ai/client/icons/96/readme.png differ diff --git a/src/_h5ai/client/icons/96/rpm.png b/src/_h5ai/client/icons/96/rpm.png new file mode 100644 index 00000000..a5bf2f14 Binary files /dev/null and b/src/_h5ai/client/icons/96/rpm.png differ diff --git a/src/_h5ai/client/icons/96/rss.png b/src/_h5ai/client/icons/96/rss.png new file mode 100644 index 00000000..6720f084 Binary files /dev/null and b/src/_h5ai/client/icons/96/rss.png differ diff --git a/src/_h5ai/client/icons/96/rtf.png b/src/_h5ai/client/icons/96/rtf.png new file mode 100644 index 00000000..15007924 Binary files /dev/null and b/src/_h5ai/client/icons/96/rtf.png differ diff --git a/src/_h5ai/client/icons/96/script.png b/src/_h5ai/client/icons/96/script.png new file mode 100644 index 00000000..b53f0a6a Binary files /dev/null and b/src/_h5ai/client/icons/96/script.png differ diff --git a/src/_h5ai/client/icons/96/source.png b/src/_h5ai/client/icons/96/source.png new file mode 100644 index 00000000..b779bfb1 Binary files /dev/null and b/src/_h5ai/client/icons/96/source.png differ diff --git a/src/_h5ai/client/icons/96/sql.png b/src/_h5ai/client/icons/96/sql.png new file mode 100644 index 00000000..e897b242 Binary files /dev/null and b/src/_h5ai/client/icons/96/sql.png differ diff --git a/src/_h5ai/client/icons/96/svg.png b/src/_h5ai/client/icons/96/svg.png new file mode 100644 index 00000000..0a615600 Binary files /dev/null and b/src/_h5ai/client/icons/96/svg.png differ diff --git a/src/_h5ai/client/icons/96/tar.png b/src/_h5ai/client/icons/96/tar.png new file mode 100644 index 00000000..e8f85877 Binary files /dev/null and b/src/_h5ai/client/icons/96/tar.png differ diff --git a/src/_h5ai/client/icons/96/tex-bib.png b/src/_h5ai/client/icons/96/tex-bib.png new file mode 100644 index 00000000..22ca5e7b Binary files /dev/null and b/src/_h5ai/client/icons/96/tex-bib.png differ diff --git a/src/_h5ai/client/icons/96/tex.png b/src/_h5ai/client/icons/96/tex.png new file mode 100644 index 00000000..3347e9d7 Binary files /dev/null and b/src/_h5ai/client/icons/96/tex.png differ diff --git a/src/_h5ai/client/icons/96/text.png b/src/_h5ai/client/icons/96/text.png new file mode 100644 index 00000000..e0b6abce Binary files /dev/null and b/src/_h5ai/client/icons/96/text.png differ diff --git a/src/_h5ai/client/icons/96/theme.png b/src/_h5ai/client/icons/96/theme.png new file mode 100644 index 00000000..dd0d6386 Binary files /dev/null and b/src/_h5ai/client/icons/96/theme.png differ diff --git a/src/_h5ai/client/icons/96/tiff.png b/src/_h5ai/client/icons/96/tiff.png new file mode 100644 index 00000000..a1474df7 Binary files /dev/null and b/src/_h5ai/client/icons/96/tiff.png differ diff --git a/src/_h5ai/client/icons/96/torrent.png b/src/_h5ai/client/icons/96/torrent.png new file mode 100644 index 00000000..134b2338 Binary files /dev/null and b/src/_h5ai/client/icons/96/torrent.png differ diff --git a/src/_h5ai/client/icons/96/unknown.png b/src/_h5ai/client/icons/96/unknown.png new file mode 100644 index 00000000..2accf934 Binary files /dev/null and b/src/_h5ai/client/icons/96/unknown.png differ diff --git a/src/_h5ai/client/icons/96/vcal.png b/src/_h5ai/client/icons/96/vcal.png new file mode 100644 index 00000000..0b6ed063 Binary files /dev/null and b/src/_h5ai/client/icons/96/vcal.png differ diff --git a/src/_h5ai/client/icons/96/video.png b/src/_h5ai/client/icons/96/video.png new file mode 100644 index 00000000..79d44630 Binary files /dev/null and b/src/_h5ai/client/icons/96/video.png differ diff --git a/src/_h5ai/client/icons/96/wav.png b/src/_h5ai/client/icons/96/wav.png new file mode 100644 index 00000000..60a843dc Binary files /dev/null and b/src/_h5ai/client/icons/96/wav.png differ diff --git a/src/_h5ai/client/icons/96/wma.png b/src/_h5ai/client/icons/96/wma.png new file mode 100644 index 00000000..c2e17911 Binary files /dev/null and b/src/_h5ai/client/icons/96/wma.png differ diff --git a/src/_h5ai/client/icons/96/xcf.png b/src/_h5ai/client/icons/96/xcf.png new file mode 100644 index 00000000..41335b87 Binary files /dev/null and b/src/_h5ai/client/icons/96/xcf.png differ diff --git a/src/_h5ai/client/icons/96/xhtml.png b/src/_h5ai/client/icons/96/xhtml.png new file mode 100644 index 00000000..27cc3369 Binary files /dev/null and b/src/_h5ai/client/icons/96/xhtml.png differ diff --git a/src/_h5ai/client/icons/96/xml.png b/src/_h5ai/client/icons/96/xml.png new file mode 100644 index 00000000..b566c54e Binary files /dev/null and b/src/_h5ai/client/icons/96/xml.png differ diff --git a/src/_h5ai/client/icons/96/zip.png b/src/_h5ai/client/icons/96/zip.png new file mode 100644 index 00000000..ff94ba80 Binary files /dev/null and b/src/_h5ai/client/icons/96/zip.png differ diff --git a/src/_h5ai/client/images/loading.gif b/src/_h5ai/client/images/loading.gif deleted file mode 100644 index 1b3280ef..00000000 Binary files a/src/_h5ai/client/images/loading.gif and /dev/null differ diff --git a/src/_h5ai/client/images/selected.svg b/src/_h5ai/client/images/selected.svg new file mode 100644 index 00000000..84a8c603 --- /dev/null +++ b/src/_h5ai/client/images/selected.svg @@ -0,0 +1,54 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/src/_h5ai/client/images/size.svg b/src/_h5ai/client/images/size.svg new file mode 100644 index 00000000..4d2b849b --- /dev/null +++ b/src/_h5ai/client/images/size.svg @@ -0,0 +1,194 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/_h5ai/client/images/view-list.svg b/src/_h5ai/client/images/view-list.svg deleted file mode 100644 index 4079bd01..00000000 --- a/src/_h5ai/client/images/view-list.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/src/_h5ai/client/js/inc/core/resource.js b/src/_h5ai/client/js/inc/core/resource.js index db012abe..152dc6de 100644 --- a/src/_h5ai/client/js/inc/core/resource.js +++ b/src/_h5ai/client/js/inc/core/resource.js @@ -1,14 +1,14 @@ modulejs.define('core/resource', ['core/settings'], function (settings) { - var image = function (id, customExt) { + var image = function (id) { - return settings.h5aiAbsHref + 'client/images/' + id + (customExt ? '' : '.svg'); + return settings.h5aiAbsHref + 'client/images/' + id + '.svg'; }, - icon = function (id, big) { + icon = function (id) { - return settings.h5aiAbsHref + 'client/icons/' + (big ? '48x48' : '16x16') + '/' + id + '.png'; + return settings.h5aiAbsHref + 'client/icons/96/' + id + '.png'; }; return { diff --git a/src/_h5ai/client/js/inc/ext/delete.js b/src/_h5ai/client/js/inc/ext/delete.js index 9fb54cca..5158e2ed 100644 --- a/src/_h5ai/client/js/inc/ext/delete.js +++ b/src/_h5ai/client/js/inc/ext/delete.js @@ -37,7 +37,7 @@ modulejs.define('ext/delete', ['_', '$', 'core/settings', 'core/event', 'core/re requestDeletion = function (hrefsStr) { $delete.addClass('current'); - $img.attr('src', resource.image('loading.gif', true)); + $img.attr('src', resource.image('loading')); server.request({action: 'delete', hrefs: hrefsStr}, handleResponse); }, @@ -48,7 +48,7 @@ modulejs.define('ext/delete', ['_', '$', 'core/settings', 'core/event', 'core/re selectedHrefsStr = _.map(items, function (item) { return item.absHref; - }).join(':'); + }).join('|:|'); $delete.appendTo('#navbar').show(); } else { $delete.hide(); diff --git a/src/_h5ai/client/js/inc/ext/download.js b/src/_h5ai/client/js/inc/ext/download.js index 01400677..4b1278d7 100644 --- a/src/_h5ai/client/js/inc/ext/download.js +++ b/src/_h5ai/client/js/inc/ext/download.js @@ -54,7 +54,7 @@ modulejs.define('ext/download', ['_', '$', 'core/settings', 'core/resource', 'co $form = $('
'); for (var key in query) { - $form.append('') + $form.append(''); } $form.appendTo('body').submit().remove(); }, diff --git a/src/_h5ai/client/js/inc/ext/dropbox.js b/src/_h5ai/client/js/inc/ext/dropbox.js index 5512cb34..d80f1ad9 100644 --- a/src/_h5ai/client/js/inc/ext/dropbox.js +++ b/src/_h5ai/client/js/inc/ext/dropbox.js @@ -48,7 +48,8 @@ modulejs.define('ext/dropbox', ['_', '$', 'core/settings', 'core/location', 'cor event.sub('ready', function () { - $content.filedrop({ + // $content.filedrop({ + $('html').filedrop({ paramname: 'userfile', diff --git a/src/_h5ai/client/js/inc/ext/l10n.js b/src/_h5ai/client/js/inc/ext/l10n.js index b27d145d..dd9bb961 100644 --- a/src/_h5ai/client/js/inc/ext/l10n.js +++ b/src/_h5ai/client/js/inc/ext/l10n.js @@ -34,7 +34,7 @@ modulejs.define('ext/l10n', ['_', '$', 'core/settings', 'core/langs', 'core/form '', langOptionTemplate = '
  • ', - storekey = 'l10n.lang', + storekey = 'ext/l10n', loaded = { en: _.extend({}, defaultTranslations) @@ -151,14 +151,11 @@ modulejs.define('ext/l10n', ['_', '$', 'core/settings', 'core/langs', 'core/form init = function () { - if (!settings.enabled) { - event.sub('ready', function () { update(); }); - return; + if (settings.enabled) { + initLangSelector(langs); } - initLangSelector(langs); - - event.sub('ready', function () { + event.sub('location.changed', function () { localize(langs, settings.lang, settings.useBrowserLang); }); diff --git a/src/_h5ai/client/js/inc/ext/preview-img.js b/src/_h5ai/client/js/inc/ext/preview-img.js index bf693a9b..d118a95e 100644 --- a/src/_h5ai/client/js/inc/ext/preview-img.js +++ b/src/_h5ai/client/js/inc/ext/preview-img.js @@ -1,100 +1,11 @@ -modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/event', 'core/location'], function (_, $, allsettings, resource, store, event, location) { +modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/event', 'ext/preview'], function (_, $, allsettings, event, preview) { var settings = _.extend({ enabled: false, - types: ['bmp', 'gif', 'ico', 'image', 'jpg', 'png', 'tiff'] + types: [] }, allsettings['preview-img']), - template = '
    ' + - '
    ' + - '' + - '
    ' + - '
    ' + - '' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
      ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    ' + - '
    ' + - '
    ', - - storekey = 'preview-img.isFullscreen', - - currentEntries = [], - currentIdx = 0, - isFullscreen = store.get(storekey) || false, - - adjustSize = function () { - - var rect = $(window).fracs('viewport'), - $container = $('#pv-img-content'), - $spinner = $('#pv-spinner'), - $spinnerimg = $spinner.find('img').width(100).height(100), - $img = $('#pv-img-image'), - margin = isFullscreen ? 0 : 20, - barheight = isFullscreen ? 0 : 31; - - $container.add($spinner).css({ - width: rect.width - 2 * margin, - height: rect.height - 2 * margin - barheight, - left: margin, - top: margin - }); - - var lr = ($container.width() - $img.width()) / 2, - tb = ($container.height() - $img.height()) / 2; - - $img.css({ - margin: '' + tb + 'px ' + lr + 'px' - }); - $spinnerimg.css({ - margin: '' + (($spinner.height() - $spinnerimg.height()) / 2) + 'px ' + (($spinner.width() - $spinnerimg.height()) / 2) + 'px' - }); - - rect = $img.fracs('rect'); - if (!rect) { - return; - } - rect = rect.relativeTo($('#pv-img-overlay').fracs('rect')); - - $('#pv-img-prev').css({ - left: rect.left, - top: rect.top, - width: rect.width / 2, - height: rect.height - }); - $('#pv-img-next').css({ - left: rect.left + rect.width / 2, - top: rect.top, - width: rect.width / 2, - height: rect.height - }); - - $('#pv-img-bar-percent').text('' + (100 * $img.width() / $img[0].naturalWidth).toFixed(0) + '%'); - if (isFullscreen) { - $('#pv-img-overlay').addClass('fullscreen'); - $('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/no-fullscreen')); - $('#pv-img-bottombar').fadeOut(400); - } else { - $('#pv-img-overlay').removeClass('fullscreen'); - $('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/fullscreen')); - $('#pv-img-bottombar').fadeIn(200); - } - }, - preloadImg = function (src, callback) { var $img = $('') @@ -106,94 +17,69 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource', .attr('src', src); }, - onIndexChange = function (idx) { - - currentIdx = (idx + currentEntries.length) % currentEntries.length; - - var $container = $('#pv-img-content'), - $img = $('#pv-img-image'), - src = currentEntries[currentIdx].absHref, - spinnerTimeout = setTimeout(function () { $('#pv-spinner').show(); }, 200); - - preloadImg(src, function ($preloaded_img) { - - clearTimeout(spinnerTimeout); - $('#pv-spinner').hide(); - - $('#pv-img-image').fadeOut(100, function () { - - $('#pv-img-image').replaceWith($preloaded_img.hide()); - $preloaded_img.attr('id', 'pv-img-image').fadeIn(200); - - // small timeout, so $preloaded_img is visible and therefore $preloaded_img.width is available - setTimeout(function () { - - adjustSize(); - $('#pv-img-bar-label').text(currentEntries[currentIdx].label); - $('#pv-img-bar-size').text('' + $preloaded_img[0].naturalWidth + 'x' + $preloaded_img[0].naturalHeight); - $('#pv-img-bar-idx').text('' + (currentIdx + 1) + ' / ' + currentEntries.length); - $('#pv-img-bar-original').find('a').attr('href', currentEntries[currentIdx].absHref); - }, 10); - }); - }); - }, - onEnter = function (items, idx) { - $(window).on('keydown', onKeydown); - $('#pv-img-image').hide(); - $('#pv-img-overlay').stop(true, true).fadeIn(200); + var currentItems = items, + currentIdx = idx, + currentItem = items[idx], - currentEntries = items; - adjustSize(); - onIndexChange(idx); - }, + onAdjustSize = function () { - onNext = function () { + var $content = $('#pv-content'), + $img = $('#pv-img-image'); - onIndexChange(currentIdx + 1); - }, + if ($img.length) { - onPrevious = function () { + $img.css({ + 'left': '' + (($content.width()-$img.width())*0.5) + 'px', + 'top': '' + (($content.height()-$img.height())*0.5) + 'px' + }); - onIndexChange(currentIdx - 1); - }, + preview.setLabels([ + currentItem.label, + '' + $img[0].naturalWidth + 'x' + $img[0].naturalHeight, + '' + (100 * $img.width() / $img[0].naturalWidth).toFixed(0) + '%' + ]); + } + }, - onExit = function () { + onIdxChange = function (rel) { - $(window).off('keydown', onKeydown); - $('#pv-img-overlay').stop(true, true).fadeOut(200); - }, + currentIdx = (currentIdx + rel + currentItems.length) % currentItems.length; + currentItem = currentItems[currentIdx]; - onFullscreen = function () { + var spinnerTimeout = setTimeout(function () { preview.showSpinner(true); }, 200); - isFullscreen = !isFullscreen; - store.put(storekey, isFullscreen); + preloadImg(currentItem.absHref, function ($preloaded_img) { - adjustSize(); - }, + clearTimeout(spinnerTimeout); + preview.showSpinner(false); - onKeydown = function (event) { + $('#pv-content').fadeOut(100, function () { - var key = event.which; + $('#pv-content').empty().append($preloaded_img.attr('id', 'pv-img-image')).fadeIn(200); - if (key === 27) { // esc - event.preventDefault(); - event.stopImmediatePropagation(); - onExit(); - } else if (key === 8 || key === 37 || key === 40) { // backspace, left, down - event.preventDefault(); - event.stopImmediatePropagation(); - onPrevious(); - } else if (key === 13 || key === 32 || key === 38 || key === 39) { // enter, space, up, right - event.preventDefault(); - event.stopImmediatePropagation(); - onNext(); - } else if (key === 70) { // f - event.preventDefault(); - event.stopImmediatePropagation(); - onFullscreen(); - } + // small timeout, so $preloaded_img is visible and therefore $preloaded_img.width is available + setTimeout(function () { + + onAdjustSize(); + + preview.setIndex(currentIdx + 1, currentItems.length); + preview.setLabels([ + currentItem.label, + '' + $preloaded_img[0].naturalWidth + 'x' + $preloaded_img[0].naturalHeight, + '' + (100 * $preloaded_img.width() / $preloaded_img[0].naturalWidth).toFixed(0) + '%' + ]); + preview.setRawLink(currentItem.absHref); + }, 10); + }); + }); + }; + + onIdxChange(0); + preview.setOnIndexChange(onIdxChange); + preview.setOnAdjustSize(onAdjustSize); + preview.enter(); }, initItem = function (item) { @@ -230,59 +116,8 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource', return; } - $(template).appendTo('body'); - $('#pv-img-bar-prev, #pv-img-prev').on('click', onPrevious); - $('#pv-img-bar-next, #pv-img-next').on('click', onNext); - $('#pv-img-bar-close, #pv-img-close').on('click', onExit); - $('#pv-img-bar-fullscreen').on('click', onFullscreen); - - $('#pv-img-prev') - .on('mouseenter', function () { - $('#pv-img-bar-prev').addClass('hover'); - }) - .on('mouseleave', function () { - $('#pv-img-bar-prev').removeClass('hover'); - }); - - $('#pv-img-next') - .on('mouseenter', function () { - $('#pv-img-bar-next').addClass('hover'); - }) - .on('mouseleave', function () { - $('#pv-img-bar-next').removeClass('hover'); - }); - - $('#pv-img-close') - .on('mouseenter', function () { - $('#pv-img-bar-close').addClass('hover'); - }) - .on('mouseleave', function () { - $('#pv-img-bar-close').removeClass('hover'); - }); - - $('#pv-img-overlay') - .on('keydown', onKeydown) - .on('mousemove', function (event) { - - if (isFullscreen) { - var rect = $('#pv-img-overlay').fracs('rect'); - - if (rect.bottom - event.pageY < 64) { - $('#pv-img-bottombar').fadeIn(200); - } else { - $('#pv-img-bottombar').fadeOut(400); - } - } - }) - .on('click mousedown mousemove keydown keypress', function (event) { - - event.stopImmediatePropagation(); - }); - event.sub('location.changed', onLocationChanged); event.sub('location.refreshed', onLocationRefreshed); - - $(window).on('resize load', adjustSize); }; init(); diff --git a/src/_h5ai/client/js/inc/ext/preview-txt.js b/src/_h5ai/client/js/inc/ext/preview-txt.js index 508fd323..a6a85a2c 100644 --- a/src/_h5ai/client/js/inc/ext/preview-txt.js +++ b/src/_h5ai/client/js/inc/ext/preview-txt.js @@ -1,60 +1,14 @@ -modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/event', 'core/location'], function (_, $, allsettings, resource, store, event, location) { +modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/event', 'ext/preview'], function (_, $, allsettings, event, preview) { var settings = _.extend({ enabled: false, - types: { - authors: 'plain', - copying: 'plain', - c: 'c', - cpp: 'cpp', - css: 'css', - h: 'c', - hpp: 'cpp', - install: 'plain', - log: 'plain', - java: 'java', - makefile: 'xml', - markdown: 'plain', - // php: 'php', - python: 'python', - readme: 'plain', - rb: 'ruby', - rtf: 'plain', - script: 'shell', - text: 'plain', - js: 'js', - xml: 'xml' - } + types: {} }, allsettings['preview-txt']), - template = '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '' + - '
    ' + - '
    ' + - '
      ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    ' + - '
    ' + - '
    ', - templateText = '
    ',
     		templateMarkdown = '
    ', - currentEntries = [], - currentIdx = 0, - // adapted from SyntaxHighlighter getHighlightedLines = function (sh, alias, content) { @@ -116,32 +70,6 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', loadScript(allsettings.h5aiAbsHref + 'client/js/markdown.js', 'markdown', callback); }, - adjustSize = function () { - - var $window = $(window), - $container = $('#pv-txt-content'), - $spinner = $('#pv-txt-spinner'), - $spinnerimg = $spinner.find('img').width(100).height(100), - margin = 20, - barheight = 31; - - $container.css({ - height: $window.height() - 2 * margin - barheight - 32, - top: margin - }); - - $spinner.css({ - width: $window.width() - 2 * margin, - height: $window.height() - 2 * margin - barheight, - left: margin, - top: margin - }); - - $spinnerimg.css({ - margin: '' + (($spinner.height() - $spinnerimg.height()) / 2) + 'px ' + (($spinner.width() - $spinnerimg.height()) / 2) + 'px' - }); - }, - preloadText = function (absHref, callback) { $.ajax({ @@ -159,107 +87,94 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', }); }, - onIndexChange = function (idx) { - - currentIdx = (idx + currentEntries.length) % currentEntries.length; - - var $container = $('#pv-txt-content'), - $text = $('#pv-txt-text'), - current = currentEntries[currentIdx], - spinnerTimeout = setTimeout(function () { $('#pv-txt-spinner').show(); }, 200); - - preloadText(current.absHref, function (content) { - - clearTimeout(spinnerTimeout); - $('#pv-txt-spinner').hide(); - - $text.fadeOut(100, function () { - - var $nText; - - if (current.type === 'markdown') { - $nText = $(templateMarkdown).hide().text(content); - $text.replaceWith($nText); - - loadMarkdown(function (md) { - - if (md) { - $nText.html(md.toHTML(content)); - } - }); - } else { - $nText = $(templateText).hide().text(content); - $text.replaceWith($nText); - - loadSyntaxhighlighter(function (sh) { - - if (sh) { - var $table = $(''); - - getHighlightedLines(sh, settings.types[current.type], content).each(function (i) { - $('') - .append($('
    ').addClass('nr').append(i + 1)) - .append($('').addClass('line').append(this)) - .appendTo($table); - }); - - $nText.empty().append($table); - } - }); - } - $nText.fadeIn(200); - - adjustSize(); - $('#pv-txt-bar-label').text(current.label); - $('#pv-txt-bar-size').text('' + current.size + ' bytes'); - $('#pv-txt-bar-idx').text('' + (currentIdx + 1) + ' / ' + currentEntries.length); - $('#pv-txt-bar-original').find('a').attr('href', current.absHref); - }); - }); - }, - onEnter = function (items, idx) { - $(window).on('keydown', onKeydown); - $('#pv-txt-overlay').stop(true, true).fadeIn(200); + var currentItems = items, + currentIdx = idx, + currentItem = items[idx], - currentEntries = items; - onIndexChange(idx); - }, + onAdjustSize = function () { - onNext = function () { + var $content = $('#pv-content'), + $text = $('#pv-txt-text'); - onIndexChange(currentIdx + 1); - }, + if ($text.length) { - onPrevious = function () { + $text.height($content.height() - 16); + } + }, - onIndexChange(currentIdx - 1); - }, + onIdxChange = function (rel) { - onExit = function () { + currentIdx = (currentIdx + rel + currentItems.length) % currentItems.length; + currentItem = currentItems[currentIdx]; - $(window).off('keydown', onKeydown); - $('#pv-txt-overlay').stop(true, true).fadeOut(200); - }, + var spinnerTimeout = setTimeout(function () { preview.showSpinner(true); }, 200); - onKeydown = function (event) { + preloadText(currentItem.absHref, function (textContent) { - var key = event.which; + clearTimeout(spinnerTimeout); + preview.showSpinner(false); - if (key === 27) { // esc - event.preventDefault(); - event.stopImmediatePropagation(); - onExit(); - } else if (key === 8 || key === 37 || key === 40) { // backspace, left, down - event.preventDefault(); - event.stopImmediatePropagation(); - onPrevious(); - } else if (key === 13 || key === 32 || key === 38 || key === 39) { // enter, space, up, right - event.preventDefault(); - event.stopImmediatePropagation(); - onNext(); - } + $('#pv-content').fadeOut(100, function () { + + var $text; + + if (settings.types[currentItem.type] === 'none') { + + $text = $(templateMarkdown).text(textContent); + + } else if (settings.types[currentItem.type] === 'fixed') { + + $text = $(templateText).text(textContent); + + } else if (settings.types[currentItem.type] === 'markdown') { + + $text = $(templateMarkdown).text(textContent); + + loadMarkdown(function (md) { + + if (md) { + $text.html(md.toHTML(textContent)); + } + }); + } else { + + $text = $(templateText).text(textContent); + + loadSyntaxhighlighter(function (sh) { + + if (sh) { + var $table = $(''); + + getHighlightedLines(sh, settings.types[currentItem.type], textContent).each(function (i) { + $('') + .append($('
    ').addClass('nr').append(i + 1)) + .append($('').addClass('line').append(this)) + .appendTo($table); + }); + + $text.empty().append($table); + } + }); + } + $('#pv-content').empty().append($text).fadeIn(200); + onAdjustSize(); + + preview.setIndex(currentIdx + 1, currentItems.length); + preview.setLabels([ + currentItem.label, + '' + currentItem.size + ' bytes' + ]); + preview.setRawLink(currentItem.absHref); + }); + }); + }; + + onIdxChange(0); + preview.setOnIndexChange(onIdxChange); + preview.setOnAdjustSize(onAdjustSize); + preview.enter(); }, initItem = function (item) { @@ -296,31 +211,8 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', return; } - $(template).appendTo('body'); - $('#pv-txt-bar-prev').on('click', onPrevious); - $('#pv-txt-bar-next').on('click', onNext); - $('#pv-txt-bar-close, #pv-txt-close').on('click', onExit); - - $('#pv-txt-close') - .on('mouseenter', function () { - $('#pv-txt-bar-close').addClass('hover'); - }) - .on('mouseleave', function () { - $('#pv-txt-bar-close').removeClass('hover'); - }); - - - $('#pv-txt-overlay') - .on('keydown', onKeydown) - .on('click mousedown mousemove keydown keypress', function (event) { - - event.stopImmediatePropagation(); - }); - event.sub('location.changed', onLocationChanged); event.sub('location.refreshed', onLocationRefreshed); - - $(window).on('resize load', adjustSize); }; init(); diff --git a/src/_h5ai/client/js/inc/ext/preview.js b/src/_h5ai/client/js/inc/ext/preview.js new file mode 100644 index 00000000..6a1feab5 --- /dev/null +++ b/src/_h5ai/client/js/inc/ext/preview.js @@ -0,0 +1,252 @@ + +modulejs.define('ext/preview', ['_', '$', 'core/settings', 'core/resource', 'core/store'], function (_, $, allsettings, resource, store) { + + var settings = _.extend({ + enabled: true + }, allsettings['preview']), + + template = '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
      ' + + '
    • ' + + '
    • ' + + '
    • ' + + '
    • ' + + '
    • ' + + '
    • ' + + '
    ' + + '
    ' + + '
    ', + + storekey = 'ext/preview', + + currentEntries = [], + currentIdx = 0, + isFullscreen = store.get(storekey) || false, + + adjustSize = function () { + + var rect = $(window).fracs('viewport'), + $container = $('#pv-content'), + $spinner = $('#pv-spinner'), + margin = isFullscreen ? 0 : 20, + barheight = isFullscreen ? 0 : 31; + + $container.css({ + width: rect.width - 2 * margin, + height: rect.height - 2 * margin - barheight, + left: margin, + top: margin + }); + + $spinner.css({ + left: rect.width * 0.5, + top: rect.height * 0.5 + }); + + if (isFullscreen) { + $('#pv-overlay').addClass('fullscreen'); + $('#pv-bar-fullscreen').find('img').attr('src', resource.image('preview/no-fullscreen')); + } else { + $('#pv-overlay').removeClass('fullscreen'); + $('#pv-bar-fullscreen').find('img').attr('src', resource.image('preview/fullscreen')); + } + + if (_.isFunction(onAdjustSize)) { + onAdjustSize(1); + } + }, + + onEnter = function () { + + $(window).on('keydown', onKeydown); + $('#pv-content').empty(); + $('#pv-overlay').stop(true, true).fadeIn(200); + + adjustSize(); + }, + + onExit = function () { + + $(window).off('keydown', onKeydown); + $('#pv-overlay').stop(true, true).fadeOut(200); + }, + + onNext = function () { + + if (_.isFunction(onIndexChange)) { + onIndexChange(1); + } + }, + + onPrevious = function () { + + if (_.isFunction(onIndexChange)) { + onIndexChange(-1); + } + }, + + userAliveTimeoutId = null, + userAlive = function () { + + clearTimeout(userAliveTimeoutId); + $('#pv-overlay .hof').stop(true, true).fadeIn(200); + + if (isFullscreen) { + + userAliveTimeoutId = setTimeout(function () { + + $('#pv-overlay .hof').stop(true, true).fadeOut(2000); + }, 2000); + } + }, + + onFullscreen = function () { + + isFullscreen = !isFullscreen; + store.put(storekey, isFullscreen); + + userAlive(); + adjustSize(); + }, + + onKeydown = function (event) { + + var key = event.which, + delay = 300; + + if (key === 27) { // esc + event.preventDefault(); + event.stopImmediatePropagation(); + $('#pv-bar-close, #pv-close-area').addClass('hover'); + setTimeout(function () { $('#pv-bar-close, #pv-close-area').removeClass('hover'); }, delay); + onExit(); + } else if (key === 8 || key === 37) { // backspace, left + event.preventDefault(); + event.stopImmediatePropagation(); + $('#pv-bar-prev, #pv-prev-area').addClass('hover'); + setTimeout(function () { $('#pv-bar-prev, #pv-prev-area').removeClass('hover'); }, delay); + onPrevious(); + } else if (key === 13 || key === 32 || key === 39) { // enter, space, right + event.preventDefault(); + event.stopImmediatePropagation(); + $('#pv-bar-next, #pv-next-area').addClass('hover'); + setTimeout(function () { $('#pv-bar-next, #pv-next-area').removeClass('hover'); }, delay); + onNext(); + } else if (key === 70) { // f + event.preventDefault(); + event.stopImmediatePropagation(); + $('#pv-bar-fullscreen').addClass('hover'); + setTimeout(function () { $('#pv-bar-fullscreen').removeClass('hover'); }, delay); + onFullscreen(); + } + }, + + enter = function () { + + onEnter(); + }, + + exit = function () { + + onExit(); + }, + + setIndex = function (idx, total) { + + if (_.isNumber(idx)) { + $('#pv-bar-idx').text('' + idx + (_.isNumber(total) ? '/' + total : '')).show(); + } else { + $('#pv-bar-idx').text('').hide(); + } + }, + + setRawLink = function (href) { + + if (href) { + $('#pv-bar-raw').find('a').attr('href', href).end().show(); + } else { + $('#pv-bar-raw').find('a').attr('href', '#').end().hide(); + } + }, + + setLabels = function (labels) { + + $('#pv-buttons .bar-left').remove(); + _.each(labels, function (label) { + + $('
  • ') + .addClass('bar-left bar-label') + .text(label) + .appendTo('#pv-buttons'); + }); + }, + + onIndexChange = null, + setOnIndexChange = function (fn) { + + onIndexChange = fn; + }, + + onAdjustSize = null, + setOnAdjustSize = function (fn) { + + onAdjustSize = fn; + }, + + showSpinner = function (show, millis) { + + if (!_.isNumber(millis)) { + millis = 400; + } + + if (show) { + $('#pv-spinner').stop(true, true).fadeIn(millis); + } else { + $('#pv-spinner').stop(true, true).fadeOut(millis); + } + }, + + init = function () { + + if (!settings.enabled) { + return; + } + + $(template).appendTo('body'); + + $('#pv-spinner').hide(); + $('#pv-bar-prev, #pv-prev-area').on('click', onPrevious); + $('#pv-bar-next, #pv-next-area').on('click', onNext); + $('#pv-bar-close, #pv-close-area').on('click', onExit); + $('#pv-bar-fullscreen').on('click', onFullscreen); + + $('#pv-overlay') + .on('keydown', onKeydown) + .on('mousemove mousedown', userAlive) + .on('click mousedown mousemove keydown keypress', function (event) { + + event.stopImmediatePropagation(); + }); + + $(window).on('resize load', adjustSize); + }; + + init(); + + return { + enter: enter, + exit: exit, + setIndex: setIndex, + setRawLink: setRawLink, + setLabels: setLabels, + setOnIndexChange: setOnIndexChange, + setOnAdjustSize: setOnAdjustSize, + showSpinner: showSpinner + }; +}); diff --git a/src/_h5ai/client/js/inc/ext/select.js b/src/_h5ai/client/js/inc/ext/select.js index 4d14a439..b1287a1d 100644 --- a/src/_h5ai/client/js/inc/ext/select.js +++ b/src/_h5ai/client/js/inc/ext/select.js @@ -1,10 +1,13 @@ -modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/event'], function (_, $, allsettings, event) { +modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/resource', 'core/event'], function (_, $, allsettings, resource, event) { var settings = _.extend({ - enabled: false + enabled: false, + checkboxes: false }, allsettings.select), + template = 'selected', + x = 0, y = 0, l = 0, t = 0, w = 0, h = 0, shrink = 1/3, @@ -111,8 +114,28 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/event'], functio } }, - onLocationChanged = function () { + initItem = function (item) { + if (item.$view) { + + $(template) + .appendTo(item.$view.find('a')) + .on('click', function (event) { + + event.stopImmediatePropagation(); + event.preventDefault(); + + item.$view.toggleClass('selected'); + publish(); + }); + } + }, + + onLocationChanged = function (item) { + + if (settings.checkboxes) { + _.each(item.content, initItem); + } publish(); }, @@ -120,6 +143,9 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/event'], functio var selectionChanged = false; + if (settings.checkboxes) { + _.each(added, initItem); + } _.each(removed, function (item) { if (item.$view && item.$view.hasClass('selected')) { diff --git a/src/_h5ai/client/js/inc/ext/sort.js b/src/_h5ai/client/js/inc/ext/sort.js index 268f6a43..4d99a698 100644 --- a/src/_h5ai/client/js/inc/ext/sort.js +++ b/src/_h5ai/client/js/inc/ext/sort.js @@ -3,73 +3,151 @@ modulejs.define('ext/sort', ['_', '$', 'core/settings', 'core/resource', 'core/e var settings = _.extend({ enabled: false, - order: 'na' + column: 0, + reverse: false, + ignorecase: true, + natural: false }, allsettings.sort), - storekey = 'sort.order', + storekey = 'ext/sort', + template = 'ascending' + + 'descending', - type = function (item) { + getType = function (item) { var $item = $(item); if ($item.hasClass('folder-parent')) { return 0; - } else if ($item.hasClass('folder')) { + } + if ($item.hasClass('folder')) { return 1; } return 2; }, - cmpFn = function (rev, getVal) { - - return function (item1, item2) { - - var res, val1, val2; - - res = type(item1) - type(item2); - if (res !== 0) { - return res; - } - - val1 = getVal(item1); - val2 = getVal(item2); - if (val1 < val2) { - return rev ? 1 : -1; - } else if (val1 > val2) { - return rev ? -1 : 1; - } - return 0; - }; - }, - getName = function (item) { - return $(item).find('.label').text().toLowerCase(); + return $(item).find('.label').text(); }, + getTime = function (item) { return $(item).find('.date').data('time'); }, + getSize = function (item) { return $(item).find('.size').data('bytes'); }, - $all, orders, + columnGetters = { + 0: getName, + 1: getTime, + 2: getSize + }, - sortBy = function (id) { + columnClasses = { + 0: 'label', + 1: 'date', + 2: 'size' + }, - var order = orders[id]; + // Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license + // Author: Jim Palmer (based on chunking idea from Dave Koelle) + // + // Modified to make it work with h5ai + naturalCmpFn = function (val1, val2) { - store.put(storekey, id); + var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi, + sre = /(^[ ]*|[ ]*$)/g, + dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, + hre = /^0x[0-9a-f]+$/i, + ore = /^0/, + // convert all to strings strip whitespace + x = ('' + val1).replace(sre, ''), + y = ('' + val2).replace(sre, ''), + // chunk/tokenize + xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), + yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), + // numeric, hex or date detection + xD = parseInt(x.match(hre), 10) || (xN.length != 1 && x.match(dre) && Date.parse(x)), + yD = parseInt(y.match(hre), 10) || xD && y.match(dre) && Date.parse(y) || null, + oFxNcL, oFyNcL; + // first try and sort Hex codes or Dates + if (yD) + if ( xD < yD ) return -1; + else if ( xD > yD ) return 1; + // natural sorting through split numeric strings and default strings + for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) { + // find floats not starting with '0', string or 0 if not defined (Clint Priest) + oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0; + oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0; + // handle numeric vs string comparison - number < string - (Kyle Adams) + if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { return (isNaN(oFxNcL)) ? 1 : -1; } + // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' + else if (typeof oFxNcL !== typeof oFyNcL) { + oFxNcL += ''; + oFyNcL += ''; + } + if (oFxNcL < oFyNcL) return -1; + if (oFxNcL > oFyNcL) return 1; + } + return 0; + }, + + cmpFn = function (getValue, reverse, ignorecase, natural) { + + return function (item1, item2) { + + var res, val1, val2; + + res = getType(item1) - getType(item2); + if (res !== 0) { + return res; + } + + val1 = getValue(item1); + val2 = getValue(item2); + + if (isNaN(val1) || isNaN(val2)) { + val1 = '' + val1; + val2 = '' + val2; + + if (ignorecase) { + val1 = val1.toLowerCase(); + val2 = val2.toLowerCase(); + } + } + + if (natural) { + res = naturalCmpFn(val1, val2); + } else { + res = val1 < val2 ? -1 : (val1 > val2 ? 1 : 0); + } + + return reverse ? -res : res; + }; + }, + + sortItems = function (column, reverse) { + + var headers = $('#items li.header a'), + header = $('#items li.header a.' + columnClasses[column]), + + fn = cmpFn(columnGetters[column], reverse, settings.ignorecase, column === 0 && settings.natural), + + current = $('#items .item'), + sorted = $('#items .item').sort(fn); + + store.put(storekey, {column: column, reverse: reverse}); + + headers.removeClass('ascending descending'); + header.addClass(reverse ? 'descending' : 'ascending'); - $all.removeClass('ascending').removeClass('descending'); - order.head.addClass(order.clas); - var current = $('#items .item'); - var sorted = $('#items .item').sort(order.fn); for (var i = 0, l = current.length; i < l; i += 1) { if (current[i] !== sorted[i]) { - sorted.detach().sort(order.fn).appendTo('#items'); + sorted.detach().sort(fn).appendTo('#items'); break; } } @@ -77,7 +155,11 @@ modulejs.define('ext/sort', ['_', '$', 'core/settings', 'core/resource', 'core/e onContentChanged = function (item) { - sortBy(store.get(storekey) || settings.order); + var order = store.get(storekey), + column = order && order.column || settings.column, + reverse = order && order.reverse || settings.reverse; + + sortItems(column, reverse); }, init = function () { @@ -86,69 +168,31 @@ modulejs.define('ext/sort', ['_', '$', 'core/settings', 'core/resource', 'core/e return; } - var $ascending = $('ascending'), - $descending = $('descending'), - $header = $('#items li.header'), - $label = $header.find('a.label'), - $date = $header.find('a.date'), - $size = $header.find('a.size'); + $('#items li.header') - $all = $header.find('a.label,a.date,a.size'); - orders = { - na: { - head: $label, - clas: 'ascending', - fn: cmpFn(false, getName) - }, - nd: { - head: $label, - clas: 'descending', - fn: cmpFn(true, getName) - }, - da: { - head: $date, - clas: 'ascending', - fn: cmpFn(false, getTime) - }, - dd: { - head: $date, - clas: 'descending', - fn: cmpFn(true, getTime) - }, - sa: { - head: $size, - clas: 'ascending', - fn: cmpFn(false, getSize) - }, - sd: { - head: $size, - clas: 'descending', - fn: cmpFn(true, getSize) - } - }; + .find('a.label') + .append(template) + .click(function (event) { + sortItems(0, $(this).hasClass('ascending')); + event.preventDefault(); + }) + .end() - sortBy(store.get(storekey) || settings.order); + .find('a.date') + .prepend(template) + .click(function (event) { + sortItems(1, $(this).hasClass('ascending')); + event.preventDefault(); + }) + .end() - $label - .append($ascending.clone()).append($descending.clone()) - .click(function (event) { - sortBy('n' + ($label.hasClass('ascending') ? 'd' : 'a')); - event.preventDefault(); - }); - - $date - .prepend($ascending.clone()).prepend($descending.clone()) - .click(function (event) { - sortBy('d' + ($date.hasClass('ascending') ? 'd' : 'a')); - event.preventDefault(); - }); - - $size - .prepend($ascending.clone()).prepend($descending.clone()) - .click(function (event) { - sortBy('s' + ($size.hasClass('ascending') ? 'd' : 'a')); - event.preventDefault(); - }); + .find('a.size') + .prepend(template) + .click(function (event) { + sortItems(2, $(this).hasClass('ascending')); + event.preventDefault(); + }) + .end(); event.sub('location.changed', onContentChanged); event.sub('location.refreshed', onContentChanged); diff --git a/src/_h5ai/client/js/inc/ext/thumbnails.js b/src/_h5ai/client/js/inc/ext/thumbnails.js index fd4849f7..28d4d566 100644 --- a/src/_h5ai/client/js/inc/ext/thumbnails.js +++ b/src/_h5ai/client/js/inc/ext/thumbnails.js @@ -3,23 +3,23 @@ modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/event', 'core/ser var settings = _.extend({ enabled: false, - img: ['bmp', 'gif', 'ico', 'image', 'jpg', 'png', 'tiff'], + img: ['bmp', 'gif', 'ico', 'image', 'jpg', 'png'], mov: ['video'], doc: ['pdf', 'ps'], - delay: 1000 + delay: 1000, + size: 96 }, allsettings.thumbnails), - requestThumbSmall = function (type, href, callback) { + requestThumb = function (type, href, mode, ratio, callback) { - server.request({action: 'getThumbHref', type: type, href: href, mode: 'square', width: 16, height: 16}, function (json) { - - callback(json && json.code === 0 ? json.absHref : null); - }); - }, - - requestThumbBig = function (type, href, callback) { - - server.request({action: 'getThumbHref', type: type, href: href, mode: 'rational', width: 100, height: 48}, function (json) { + server.request({ + action: 'getThumbHref', + type: type, + href: href, + mode: mode, + width: settings.size * ratio, + height: settings.size + }, function (json) { callback(json && json.code === 0 ? json.absHref : null); }); @@ -29,34 +29,34 @@ modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/event', 'core/ser var type = null; - if (_.indexOf(settings.img, item.type) >= 0) { + if (_.contains(settings.img, item.type)) { type = 'img'; - } else if (_.indexOf(settings.mov, item.type) >= 0) { + } else if (_.contains(settings.mov, item.type)) { type = 'mov'; - } else if (_.indexOf(settings.doc, item.type) >= 0) { + } else if (_.contains(settings.doc, item.type)) { type = 'doc'; } if (type) { - if (item.thumbSmall) { - item.$view.find('.icon.small img').addClass('thumb').attr('src', item.thumbSmall); + if (item.thumbSquare) { + item.$view.find('.icon.square img').addClass('thumb').attr('src', item.thumbSquare); } else { - requestThumbSmall(type, item.absHref, function (src) { + requestThumb(type, item.absHref, 'square', 1, function (src) { if (src && item.$view) { - item.thumbSmall = src; - item.$view.find('.icon.small img').addClass('thumb').attr('src', src); + item.thumbSquare = src; + item.$view.find('.icon.square img').addClass('thumb').attr('src', src); } }); } - if (item.thumbBig) { - item.$view.find('.icon.big img').addClass('thumb').attr('src', item.thumbBig); + if (item.thumbRational) { + item.$view.find('.icon.rational img').addClass('thumb').attr('src', item.thumbRational); } else { - requestThumbBig(type, item.absHref, function (src) { + requestThumb(type, item.absHref, 'rational', 2, function (src) { if (src && item.$view) { - item.thumbBig = src; - item.$view.find('.icon.big img').addClass('thumb').attr('src', src); + item.thumbRational = src; + item.$view.find('.icon.rational img').addClass('thumb').attr('src', src); } }); } diff --git a/src/_h5ai/client/js/inc/ext/tree.js b/src/_h5ai/client/js/inc/ext/tree.js index e07645b3..5ab8c6bc 100644 --- a/src/_h5ai/client/js/inc/ext/tree.js +++ b/src/_h5ai/client/js/inc/ext/tree.js @@ -34,7 +34,6 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e .data('status', item.status); location.setLink($a, item); - // $img.attr('src', resource.icon(item.type)); $img.attr('src', resource.image('folder')); $label.text(item.label); @@ -95,7 +94,6 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e // reflect folder status if (_.isNumber(item.status)) { if (item.status === 200) { - // $img.attr('src', resource.icon('folder-page')); $img.attr('src', resource.image('folder-page')); } else { $html.addClass('error'); diff --git a/src/_h5ai/client/js/inc/info.js b/src/_h5ai/client/js/inc/info.js index 58197760..54bb59cc 100644 --- a/src/_h5ai/client/js/inc/info.js +++ b/src/_h5ai/client/js/inc/info.js @@ -22,6 +22,7 @@ modulejs.define('info', ['$'], function ($) { setCheckResult(this, json.checks[$(this).data('id')]); }); + $('.test.php .test-result').text(json.checks['phpversion']); } }); }; diff --git a/src/_h5ai/client/js/inc/view/items.js b/src/_h5ai/client/js/inc/view/items.js index 1629f434..58008e33 100644 --- a/src/_h5ai/client/js/inc/view/items.js +++ b/src/_h5ai/client/js/inc/view/items.js @@ -4,13 +4,14 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core var settings = _.extend({ setParentFolderLabels: false, hideParentFolderLinks: false, + hideFolders: false, binaryPrefix: false }, allsettings.view), itemTemplate = '
  • ' + '' + - '' + - '' + + '' + + '' + '' + '' + '' + @@ -39,8 +40,7 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core var $html = $(itemTemplate), $a = $html.find('a'), - $imgSmall = $html.find('.icon.small img'), - $imgBig = $html.find('.icon.big img'), + $iconImg = $html.find('.icon img'), $label = $html.find('.label'), $date = $html.find('.date'), $size = $html.find('.size'); @@ -51,8 +51,7 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core location.setLink($a, item); - $imgSmall.attr('src', resource.icon(item.type)).attr('alt', item.type); - $imgBig.attr('src', resource.icon(item.type, true)).attr('alt', item.type); + $iconImg.attr('src', resource.icon(item.type)).attr('alt', item.type); $label.text(item.label); $date.data('time', item.time).text(format.formatDate(item.time)); $size.data('bytes', item.size).text(format.formatSize(item.size)); @@ -60,8 +59,7 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core if (item.isFolder() && _.isNumber(item.status)) { if (item.status === 200) { $html.addClass('page'); - $imgSmall.attr('src', resource.icon('folder-page')); - $imgBig.attr('src', resource.icon('folder-page', true)); + $iconImg.attr('src', resource.icon('folder-page')); } else { $html.addClass('error'); $label.append($(hintTemplate).text(' ' + item.status + ' ')); @@ -69,8 +67,7 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core } if (item.isCurrentParentFolder()) { - $imgSmall.attr('src', resource.icon('folder-parent')); - $imgBig.attr('src', resource.icon('folder-parent', true)); + $iconImg.attr('src', resource.icon('folder-parent')); if (!settings.setParentFolderLabels) { $label.addClass('l10n-parentDirectory'); } @@ -110,7 +107,9 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core _.each(item.content, function (e) { - $items.append(update(e, true)); + if (!(e.isFolder() && settings.hideFolders)) { + $items.append(update(e, true)); + } }); if (item.isEmpty()) { @@ -127,7 +126,9 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core _.each(added, function (item) { - update(item, true).hide().appendTo($items).fadeIn(400); + if (!(item.isFolder() && settings.hideFolders)) { + update(item, true).hide().appendTo($items).fadeIn(400); + } }); _.each(removed, function (item) { diff --git a/src/_h5ai/client/js/inc/view/spacing.js b/src/_h5ai/client/js/inc/view/spacing.js index 98fd353f..805752ce 100644 --- a/src/_h5ai/client/js/inc/view/spacing.js +++ b/src/_h5ai/client/js/inc/view/spacing.js @@ -4,9 +4,9 @@ modulejs.define('view/spacing', ['_', '$', 'core/settings', 'core/event'], funct var settings = _.extend({ maxWidth: 960, top: 50, - right: "auto", + right: 'auto', bottom: 50, - left: "auto" + left: 'auto' }, allsettings.spacing), adjustSpacing = function () { diff --git a/src/_h5ai/client/js/inc/view/viewmode.js b/src/_h5ai/client/js/inc/view/viewmode.js index 045f8bf9..16189501 100644 --- a/src/_h5ai/client/js/inc/view/viewmode.js +++ b/src/_h5ai/client/js/inc/view/viewmode.js @@ -1,10 +1,12 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/event'], function (_, $, allsettings, resource, store, event) { - var modes = ['details', 'list', 'grid', 'icons'], + var modes = ['details', 'grid', 'icons'], + sizes = [16, 24, 32, 48, 64, 96], settings = _.extend({}, { - modes: modes + modes: modes, + sizes: sizes }, allsettings.view), storekey = 'viewmode', @@ -16,29 +18,50 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c '' + '
  • ', + sizeTemplate = '
  • ' + + '' + + 'size' + + '[SIZE]' + + '' + + '
  • ', + adjustSpacing = function () { var contentWidth = $('#content').width(), $view = $('#view'), - itemWidth = ($view.hasClass('view-icons') || $view.hasClass('view-grid')) ? ($view.find('.item').eq(0).width() || 1) : 1; + itemWidth = ($view.hasClass('view-icons') || $view.hasClass('view-grid')) ? ($view.find('.item').eq(0).outerWidth(true) || 1) : 1; $view.width(Math.floor(contentWidth / itemWidth) * itemWidth); }, - update = function (viewmode) { + update = function (mode, size) { - var $view = $('#view'); + var $view = $('#view'), + stored = store.get(storekey); - viewmode = _.indexOf(settings.modes, viewmode) >= 0 ? viewmode : settings.modes[0]; - store.put(storekey, viewmode); + mode = mode || stored && stored.mode; + size = size || stored && stored.size; + mode = _.contains(settings.modes, mode) ? mode : settings.modes[0]; + size = _.contains(settings.sizes, size) ? size : settings.sizes[0]; + store.put(storekey, {mode: mode, size: size}); - _.each(modes, function (mode) { - if (mode === viewmode) { - $('#view-' + mode).addClass('current'); - $view.addClass('view-' + mode).show(); + _.each(modes, function (m) { + if (m === mode) { + $('#view-' + m).addClass('current'); + $view.addClass('view-' + m).show(); } else { - $('#view-' + mode).removeClass('current'); - $view.removeClass('view-' + mode); + $('#view-' + m).removeClass('current'); + $view.removeClass('view-' + m); + } + }); + + _.each(sizes, function (s) { + if (s === size) { + $('#view-' + s).addClass('current'); + $view.addClass('size-' + s).show(); + } else { + $('#view-' + s).removeClass('current'); + $view.removeClass('size-' + s); } }); @@ -52,8 +75,8 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c settings.modes = _.intersection(settings.modes, modes); if (settings.modes.length > 1) { - _.each(modes.reverse(), function (mode) { - if (_.indexOf(settings.modes, mode) >= 0) { + _.each(modes.slice(0).reverse(), function (mode) { + if (_.contains(settings.modes, mode)) { $(template.replace(/\[MODE\]/g, mode)) .appendTo($navbar) .on('click', 'a', function (event) { @@ -64,7 +87,20 @@ modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'c }); } - update(store.get(storekey)); + if (settings.sizes.length > 1) { + _.each(sizes.slice(0).reverse(), function (size) { + if (_.contains(settings.sizes, size)) { + $(sizeTemplate.replace(/\[SIZE\]/g, size)) + .appendTo($navbar) + .on('click', 'a', function (event) { + update(null, size); + event.preventDefault(); + }); + } + }); + } + + update(); event.sub('location.changed', adjustSpacing); $(window).on('resize', adjustSpacing); diff --git a/src/_h5ai/client/js/lib/jquery.filedrop-0.1.0.js b/src/_h5ai/client/js/lib/jquery.filedrop-0.1.0.js deleted file mode 100755 index 2d87013b..00000000 --- a/src/_h5ai/client/js/lib/jquery.filedrop-0.1.0.js +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Default text - jQuery plugin for html5 dragging files from desktop to browser - * - * Author: Weixi Yen - * - * Email: [Firstname][Lastname]@gmail.com - * - * Copyright (c) 2010 Resopollution - * - * Licensed under the MIT license: - * http://www.opensource.org/licenses/mit-license.php - * - * Project home: - * http://www.github.com/weixiyen/jquery-filedrop - * - * Version: 0.1.0 - * - * Features: - * Allows sending of extra parameters with file. - * Works with Firefox 3.6+ - * Future-compliant with HTML5 spec (will work with Webkit browsers and IE9) - * Usage: - * See README at project homepage - * - */ -;(function($) { - - jQuery.event.props.push("dataTransfer"); - - var default_opts = { - fallback_id: '', - url: '', - refresh: 1000, - paramname: 'userfile', - allowedfiletypes:[], - maxfiles: 25, // Ignored if queuefiles is set > 0 - maxfilesize: 1, // MB file size limit - queuefiles: 0, // Max files before queueing (for large volume uploads) - queuewait: 200, // Queue wait time if full - data: {}, - headers: {}, - drop: empty, - dragEnter: empty, - dragOver: empty, - dragLeave: empty, - docEnter: empty, - docOver: empty, - docLeave: empty, - beforeEach: empty, - afterAll: empty, - rename: empty, - error: function(err, file, i) { - alert(err); - }, - uploadStarted: empty, - uploadFinished: empty, - progressUpdated: empty, - speedUpdated: empty - }, - errors = ["BrowserNotSupported", "TooManyFiles", "FileTooLarge", "FileTypeNotAllowed"], - doc_leave_timer, stop_loop = false, - files_count = 0, - files; - - $.fn.filedrop = function(options) { - var opts = $.extend({}, default_opts, options); - - this.on('drop', drop).on('dragenter', dragEnter).on('dragover', dragOver).on('dragleave', dragLeave); - $(document).on('drop', docDrop).on('dragenter', docEnter).on('dragover', docOver).on('dragleave', docLeave); - - $('#' + opts.fallback_id).change(function(e) { - opts.drop(e); - files = e.target.files; - files_count = files.length; - upload(); - }); - - function drop(e) { - opts.drop(e); - files = e.dataTransfer.files; - if (files === null || files === undefined) { - opts.error(errors[0]); - return false; - } - files_count = files.length; - upload(); - e.preventDefault(); - return false; - } - - function getBuilder(filename, filedata, mime, boundary) { - var dashdash = '--', - crlf = '\r\n', - builder = ''; - - if (opts.data) { - var params = $.param(opts.data).split(/&/); - - $.each(params, function() { - var pair = this.split(/=/, 2); - var name = decodeURIComponent(pair[0]); - var val = decodeURIComponent(pair[1]); - - builder += dashdash; - builder += boundary; - builder += crlf; - builder += 'Content-Disposition: form-data; name="' + name + '"'; - builder += crlf; - builder += crlf; - builder += val; - builder += crlf; - }); - } - - builder += dashdash; - builder += boundary; - builder += crlf; - builder += 'Content-Disposition: form-data; name="' + opts.paramname + '"'; - builder += '; filename="' + filename + '"'; - builder += crlf; - - builder += 'Content-Type: ' + mime; - builder += crlf; - builder += crlf; - - builder += filedata; - builder += crlf; - - builder += dashdash; - builder += boundary; - builder += dashdash; - builder += crlf; - return builder; - } - - function progress(e) { - if (e.lengthComputable) { - var percentage = Math.round((e.loaded * 100) / e.total); - if (this.currentProgress != percentage) { - - this.currentProgress = percentage; - opts.progressUpdated(this.index, this.file, this.currentProgress); - - var elapsed = new Date().getTime(); - var diffTime = elapsed - this.currentStart; - if (diffTime >= opts.refresh) { - var diffData = e.loaded - this.startData; - var speed = diffData / diffTime; // KB per second - opts.speedUpdated(this.index, this.file, speed); - this.startData = e.loaded; - this.currentStart = elapsed; - } - } - } - } - - // Respond to an upload - function upload() { - - stop_loop = false; - - if (!files) { - opts.error(errors[0]); - return false; - } - if(opts.allowedfiletypes.push && opts.allowedfiletypes.length){ - for(var fileIndex = files.length;fileIndex--;){ - if(!files[fileIndex].type || $.inArray(files[fileIndex].type, opts.allowedfiletypes) < 0){ - opts.error(errors[3]); - return false; - } - } - } - - var filesDone = 0, - filesRejected = 0; - - if (files_count > opts.maxfiles && opts.queuefiles === 0) { - opts.error(errors[1]); - return false; - } - - // Define queues to manage upload process - var workQueue = []; - var processingQueue = []; - var doneQueue = []; - - // Add everything to the workQueue - for (var i = 0; i < files_count; i++) { - workQueue.push(i); - } - - // Helper function to enable pause of processing to wait - // for in process queue to complete - var pause = function(timeout) { - setTimeout(process, timeout); - return; - } - - // Process an upload, recursive - var process = function() { - - var fileIndex; - - if (stop_loop) return false; - - // Check to see if are in queue mode - if (opts.queuefiles > 0 && processingQueue.length >= opts.queuefiles) { - - return pause(opts.queuewait); - - } else { - - // Take first thing off work queue - fileIndex = workQueue[0]; - workQueue.splice(0, 1); - - // Add to processing queue - processingQueue.push(fileIndex); - - } - - try { - if (beforeEach(files[fileIndex]) != false) { - if (fileIndex === files_count) return; - var reader = new FileReader(), - max_file_size = 1048576 * opts.maxfilesize; - - reader.index = fileIndex; - if (files[fileIndex].size > max_file_size) { - opts.error(errors[2], files[fileIndex], fileIndex); - // Remove from queue - processingQueue.forEach(function(value, key) { - if (value === fileIndex) processingQueue.splice(key, 1); - }); - filesRejected++; - return true; - } - reader.onloadend = send; - reader.readAsBinaryString(files[fileIndex]); - - } else { - filesRejected++; - } - } catch (err) { - // Remove from queue - processingQueue.forEach(function(value, key) { - if (value === fileIndex) processingQueue.splice(key, 1); - }); - opts.error(errors[0]); - return false; - } - - // If we still have work to do, - if (workQueue.length > 0) { - process(); - } - - }; - - var send = function(e) { - - var fileIndex = ((typeof(e.srcElement) === "undefined") ? e.target : e.srcElement).index - - // Sometimes the index is not attached to the - // event object. Find it by size. Hack for sure. - if (e.target.index == undefined) { - e.target.index = getIndexBySize(e.total); - } - - var xhr = new XMLHttpRequest(), - upload = xhr.upload, - file = files[e.target.index], - index = e.target.index, - start_time = new Date().getTime(), - boundary = '------multipartformboundary' + (new Date).getTime(), - builder; - - newName = rename(file.name); - mime = file.type - if (typeof newName === "string") { - builder = getBuilder(newName, e.target.result, mime, boundary); - } else { - builder = getBuilder(file.name, e.target.result, mime, boundary); - } - - upload.index = index; - upload.file = file; - upload.downloadStartTime = start_time; - upload.currentStart = start_time; - upload.currentProgress = 0; - upload.startData = 0; - upload.addEventListener("progress", progress, false); - - xhr.open("POST", opts.url, true); - xhr.setRequestHeader('content-type', 'multipart/form-data; boundary=' + boundary); - - // Add headers - $.each(opts.headers, function(k, v) { - xhr.setRequestHeader(k, v); - }); - - xhr.sendAsBinary(builder); - - opts.uploadStarted(index, file, files_count); - - xhr.onload = function() { - if (xhr.responseText) { - var now = new Date().getTime(), - timeDiff = now - start_time, - result = opts.uploadFinished(index, file, jQuery.parseJSON(xhr.responseText), timeDiff, xhr); - filesDone++; - - // Remove from processing queue - processingQueue.forEach(function(value, key) { - if (value === fileIndex) processingQueue.splice(key, 1); - }); - - // Add to donequeue - doneQueue.push(fileIndex); - - if (filesDone == files_count - filesRejected) { - afterAll(); - } - if (result === false) stop_loop = true; - } - - //Pass any errors to the error option - if(xhr.status != 200){ - opts.error(xhr.statusText); - } - - }; - - } - - // Initiate the processing loop - process(); - - } - - function getIndexBySize(size) { - for (var i = 0; i < files_count; i++) { - if (files[i].size == size) { - return i; - } - } - - return undefined; - } - - function rename(name) { - return opts.rename(name); - } - - function beforeEach(file) { - return opts.beforeEach(file); - } - - function afterAll() { - return opts.afterAll(); - } - - function dragEnter(e) { - clearTimeout(doc_leave_timer); - e.preventDefault(); - opts.dragEnter(e); - } - - function dragOver(e) { - clearTimeout(doc_leave_timer); - e.preventDefault(); - opts.docOver(e); - opts.dragOver(e); - } - - function dragLeave(e) { - clearTimeout(doc_leave_timer); - opts.dragLeave(e); - e.stopPropagation(); - } - - function docDrop(e) { - e.preventDefault(); - opts.docLeave(e); - return false; - } - - function docEnter(e) { - clearTimeout(doc_leave_timer); - e.preventDefault(); - opts.docEnter(e); - return false; - } - - function docOver(e) { - clearTimeout(doc_leave_timer); - e.preventDefault(); - opts.docOver(e); - return false; - } - - function docLeave(e) { - doc_leave_timer = setTimeout(function() { - opts.docLeave(e); - }, 200); - } - return this; - }; - function empty() {} - - try { - if (XMLHttpRequest.prototype.sendAsBinary) return; - XMLHttpRequest.prototype.sendAsBinary = function(datastr) { - function byteValue(x) { - return x.charCodeAt(0) & 0xff; - } - var ords = Array.prototype.map.call(datastr, byteValue); - var ui8a = new Uint8Array(ords); - this.send(ui8a.buffer); - } - } catch (e) {} - -})(jQuery); diff --git a/src/_h5ai/client/js/lib/jquery.filedrop-0.1.0~0a38cbc.js b/src/_h5ai/client/js/lib/jquery.filedrop-0.1.0~0a38cbc.js new file mode 100644 index 00000000..f1440142 --- /dev/null +++ b/src/_h5ai/client/js/lib/jquery.filedrop-0.1.0~0a38cbc.js @@ -0,0 +1,555 @@ +/*global jQuery:false, alert:false */ + +/* + * Default text - jQuery plugin for html5 dragging files from desktop to browser + * + * Author: Weixi Yen + * + * Email: [Firstname][Lastname]@gmail.com + * + * Copyright (c) 2010 Resopollution + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * Project home: + * http://www.github.com/weixiyen/jquery-filedrop + * + * Version: 0.1.0 + * + * Features: + * Allows sending of extra parameters with file. + * Works with Firefox 3.6+ + * Future-compliant with HTML5 spec (will work with Webkit browsers and IE9) + * Usage: + * See README at project homepage + * + */ +;(function($) { + + jQuery.event.props.push("dataTransfer"); + + var default_opts = { + fallback_id: '', + url: '', + refresh: 1000, + paramname: 'userfile', + requestType: 'POST', // just in case you want to use another HTTP verb + allowedfileextensions:[], + allowedfiletypes:[], + maxfiles: 25, // Ignored if queuefiles is set > 0 + maxfilesize: 1, // MB file size limit + queuefiles: 0, // Max files before queueing (for large volume uploads) + queuewait: 200, // Queue wait time if full + data: {}, + headers: {}, + drop: empty, + dragStart: empty, + dragEnter: empty, + dragOver: empty, + dragLeave: empty, + docEnter: empty, + docOver: empty, + docLeave: empty, + beforeEach: empty, + afterAll: empty, + rename: empty, + error: function(err, file, i, status) { + alert(err); + }, + uploadStarted: empty, + uploadFinished: empty, + progressUpdated: empty, + globalProgressUpdated: empty, + speedUpdated: empty + }, + errors = ["BrowserNotSupported", "TooManyFiles", "FileTooLarge", "FileTypeNotAllowed", "NotFound", "NotReadable", "AbortError", "ReadError", "FileExtensionNotAllowed"]; + + $.fn.filedrop = function(options) { + var opts = $.extend({}, default_opts, options), + global_progress = [], + doc_leave_timer, stop_loop = false, + files_count = 0, + files; + + $('#' + opts.fallback_id).css({ + display: 'none', + width: 0, + height: 0 + }); + + this.on('drop', drop).on('dragstart', opts.dragStart).on('dragenter', dragEnter).on('dragover', dragOver).on('dragleave', dragLeave); + $(document).on('drop', docDrop).on('dragenter', docEnter).on('dragover', docOver).on('dragleave', docLeave); + + this.on('click', function(e){ + $('#' + opts.fallback_id).trigger(e); + }); + + $('#' + opts.fallback_id).change(function(e) { + opts.drop(e); + files = e.target.files; + files_count = files.length; + upload(); + }); + + function drop(e) { + if( opts.drop.call(this, e) === false ) return false; + if(!e.dataTransfer) + return; + files = e.dataTransfer.files; + if (files === null || files === undefined || files.length === 0) { + opts.error(errors[0]); + return false; + } + files_count = files.length; + upload(); + e.preventDefault(); + return false; + } + + function getBuilder(filename, filedata, mime, boundary) { + var dashdash = '--', + crlf = '\r\n', + builder = '', + paramname = opts.paramname; + + if (opts.data) { + var params = $.param(opts.data).replace(/\+/g, '%20').split(/&/); + + $.each(params, function() { + var pair = this.split("=", 2), + name = decodeURIComponent(pair[0]), + val = decodeURIComponent(pair[1]); + + if (pair.length !== 2) { + return; + } + + builder += dashdash; + builder += boundary; + builder += crlf; + builder += 'Content-Disposition: form-data; name="' + name + '"'; + builder += crlf; + builder += crlf; + builder += val; + builder += crlf; + }); + } + + if (jQuery.isFunction(paramname)){ + paramname = paramname(filename); + } + + builder += dashdash; + builder += boundary; + builder += crlf; + builder += 'Content-Disposition: form-data; name="' + (paramname||"") + '"'; + builder += '; filename="' + filename + '"'; + builder += crlf; + + builder += 'Content-Type: ' + mime; + builder += crlf; + builder += crlf; + + builder += filedata; + builder += crlf; + + builder += dashdash; + builder += boundary; + builder += dashdash; + builder += crlf; + return builder; + } + + function progress(e) { + if (e.lengthComputable) { + var percentage = Math.round((e.loaded * 100) / e.total); + if (this.currentProgress !== percentage) { + + this.currentProgress = percentage; + opts.progressUpdated(this.index, this.file, this.currentProgress); + + global_progress[this.global_progress_index] = this.currentProgress; + globalProgress(); + + var elapsed = new Date().getTime(); + var diffTime = elapsed - this.currentStart; + if (diffTime >= opts.refresh) { + var diffData = e.loaded - this.startData; + var speed = diffData / diffTime; // KB per second + opts.speedUpdated(this.index, this.file, speed); + this.startData = e.loaded; + this.currentStart = elapsed; + } + } + } + } + + function globalProgress() { + if (global_progress.length === 0) { + return; + } + + var total = 0, index; + for (index in global_progress) { + if(global_progress.hasOwnProperty(index)) { + total = total + global_progress[index]; + } + } + + opts.globalProgressUpdated(Math.round(total / global_progress.length)); + } + + // Respond to an upload + function upload() { + stop_loop = false; + + if (!files) { + opts.error(errors[0]); + return false; + } + + if (opts.allowedfiletypes.push && opts.allowedfiletypes.length) { + for(var fileIndex = files.length;fileIndex--;) { + if(!files[fileIndex].type || $.inArray(files[fileIndex].type, opts.allowedfiletypes) < 0) { + opts.error(errors[3], files[fileIndex]); + return false; + } + } + } + + if (opts.allowedfileextensions.push && opts.allowedfileextensions.length) { + for(var fileIndex = files.length;fileIndex--;) { + var allowedextension = false; + for (i=0;i opts.maxfiles && opts.queuefiles === 0) { + opts.error(errors[1]); + return false; + } + + // Define queues to manage upload process + var workQueue = []; + var processingQueue = []; + var doneQueue = []; + + // Add everything to the workQueue + for (var i = 0; i < files_count; i++) { + workQueue.push(i); + } + + // Helper function to enable pause of processing to wait + // for in process queue to complete + var pause = function(timeout) { + setTimeout(process, timeout); + return; + }; + + // Process an upload, recursive + var process = function() { + + var fileIndex; + + if (stop_loop) { + return false; + } + + // Check to see if are in queue mode + if (opts.queuefiles > 0 && processingQueue.length >= opts.queuefiles) { + return pause(opts.queuewait); + } else { + // Take first thing off work queue + fileIndex = workQueue[0]; + workQueue.splice(0, 1); + + // Add to processing queue + processingQueue.push(fileIndex); + } + + try { + if (beforeEach(files[fileIndex]) !== false) { + if (fileIndex === files_count) { + return; + } + var reader = new FileReader(), + max_file_size = 1048576 * opts.maxfilesize; + + reader.index = fileIndex; + if (files[fileIndex].size > max_file_size) { + opts.error(errors[2], files[fileIndex], fileIndex); + // Remove from queue + processingQueue.forEach(function(value, key) { + if (value === fileIndex) { + processingQueue.splice(key, 1); + } + }); + filesRejected++; + return true; + } + + reader.onerror = function(e) { + switch(e.target.error.code) { + case e.target.error.NOT_FOUND_ERR: + opts.error(errors[4]); + return false; + case e.target.error.NOT_READABLE_ERR: + opts.error(errors[5]); + return false; + case e.target.error.ABORT_ERR: + opts.error(errors[6]); + return false; + default: + opts.error(errors[7]); + return false; + }; + }; + + reader.onloadend = !opts.beforeSend ? send : function (e) { + opts.beforeSend(files[fileIndex], fileIndex, function () { send(e); }); + }; + + reader.readAsDataURL(files[fileIndex]); + + } else { + filesRejected++; + } + } catch (err) { + // Remove from queue + processingQueue.forEach(function(value, key) { + if (value === fileIndex) { + processingQueue.splice(key, 1); + } + }); + opts.error(errors[0]); + return false; + } + + // If we still have work to do, + if (workQueue.length > 0) { + process(); + } + }; + + var send = function(e) { + + var fileIndex = (e.srcElement || e.target).index; + + // Sometimes the index is not attached to the + // event object. Find it by size. Hack for sure. + if (e.target.index === undefined) { + e.target.index = getIndexBySize(e.total); + } + + var xhr = new XMLHttpRequest(), + upload = xhr.upload, + file = files[e.target.index], + index = e.target.index, + start_time = new Date().getTime(), + boundary = '------multipartformboundary' + (new Date()).getTime(), + global_progress_index = global_progress.length, + builder, + newName = rename(file.name), + mime = file.type; + + if (opts.withCredentials) { + xhr.withCredentials = opts.withCredentials; + } + + var data = atob(e.target.result.split(',')[1]); + if (typeof newName === "string") { + builder = getBuilder(newName, data, mime, boundary); + } else { + builder = getBuilder(file.name, data, mime, boundary); + } + + upload.index = index; + upload.file = file; + upload.downloadStartTime = start_time; + upload.currentStart = start_time; + upload.currentProgress = 0; + upload.global_progress_index = global_progress_index; + upload.startData = 0; + upload.addEventListener("progress", progress, false); + + // Allow url to be a method + if (jQuery.isFunction(opts.url)) { + xhr.open(opts.requestType, opts.url(), true); + } else { + xhr.open(opts.requestType, opts.url, true); + } + + xhr.setRequestHeader('content-type', 'multipart/form-data; boundary=' + boundary); + xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + + // Add headers + $.each(opts.headers, function(k, v) { + xhr.setRequestHeader(k, v); + }); + + xhr.sendAsBinary(builder); + + global_progress[global_progress_index] = 0; + globalProgress(); + + opts.uploadStarted(index, file, files_count); + + xhr.onload = function() { + var serverResponse = null; + + if (xhr.responseText) { + try { + serverResponse = jQuery.parseJSON(xhr.responseText); + } + catch (e) { + serverResponse = xhr.responseText; + } + } + + var now = new Date().getTime(), + timeDiff = now - start_time, + result = opts.uploadFinished(index, file, serverResponse, timeDiff, xhr); + filesDone++; + + // Remove from processing queue + processingQueue.forEach(function(value, key) { + if (value === fileIndex) { + processingQueue.splice(key, 1); + } + }); + + // Add to donequeue + doneQueue.push(fileIndex); + + // Make sure the global progress is updated + global_progress[global_progress_index] = 100; + globalProgress(); + + if (filesDone === (files_count - filesRejected)) { + afterAll(); + } + if (result === false) { + stop_loop = true; + } + + + // Pass any errors to the error option + if (xhr.status < 200 || xhr.status > 299) { + opts.error(xhr.statusText, file, fileIndex, xhr.status); + } + }; + }; + + // Initiate the processing loop + process(); + } + + function getIndexBySize(size) { + for (var i = 0; i < files_count; i++) { + if (files[i].size === size) { + return i; + } + } + + return undefined; + } + + function rename(name) { + return opts.rename(name); + } + + function beforeEach(file) { + return opts.beforeEach(file); + } + + function afterAll() { + return opts.afterAll(); + } + + function dragEnter(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.dragEnter.call(this, e); + } + + function dragOver(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.docOver.call(this, e); + opts.dragOver.call(this, e); + } + + function dragLeave(e) { + clearTimeout(doc_leave_timer); + opts.dragLeave.call(this, e); + e.stopPropagation(); + } + + function docDrop(e) { + e.preventDefault(); + opts.docLeave.call(this, e); + return false; + } + + function docEnter(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.docEnter.call(this, e); + return false; + } + + function docOver(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.docOver.call(this, e); + return false; + } + + function docLeave(e) { + doc_leave_timer = setTimeout((function(_this) { + return function() { + opts.docLeave.call(_this, e); + }; + })(this), 200); + } + + return this; + }; + + function empty() {} + + try { + if (XMLHttpRequest.prototype.sendAsBinary) { + return; + } + XMLHttpRequest.prototype.sendAsBinary = function(datastr) { + function byteValue(x) { + return x.charCodeAt(0) & 0xff; + } + var ords = Array.prototype.map.call(datastr, byteValue); + var ui8a = new Uint8Array(ords); + + // Not pretty: Chrome 22 deprecated sending ArrayBuffer, moving instead + // to sending ArrayBufferView. Sadly, no proper way to detect this + // functionality has been discovered. Happily, Chrome 22 also introduced + // the base ArrayBufferView class, not present in Chrome 21. + if ('ArrayBufferView' in window) + this.send(ui8a); + else + this.send(ui8a.buffer); + }; + } catch (e) {} + +})(jQuery); diff --git a/src/_h5ai/conf/l10n/da.json b/src/_h5ai/conf/l10n/da.json new file mode 100644 index 00000000..ba2344eb --- /dev/null +++ b/src/_h5ai/conf/l10n/da.json @@ -0,0 +1,19 @@ +{ + "lang": "dansk", + "details": "detaljer", + "list": "list", + "grid": "grid", + "icons": "ikoner", + "name": "Navn", + "lastModified": "Sidst ændret", + "size": "Størrelse", + "parentDirectory": "Overordnet mappe", + "empty": "tom", + "folders": "mapper", + "files": "filer", + "download": "download", + "noMatch": "ingen match", + "dateFormat": "DD-MM-YYYY HH:mm", + "filter": "filter", + "delete": "slet" +} \ No newline at end of file diff --git a/src/_h5ai/conf/l10n/pl.json b/src/_h5ai/conf/l10n/pl.json index de4b7c07..ab672614 100644 --- a/src/_h5ai/conf/l10n/pl.json +++ b/src/_h5ai/conf/l10n/pl.json @@ -9,10 +9,10 @@ "size": "Rozmiar", "parentDirectory": "Katalog nadrzędny", "empty": "pusty", - "folders": "foldery", - "files": "pliki", + "folders": "folderów", + "files": "plików", "download": "pobierz", - "noMatch": "nie pasuje", + "noMatch": "nie znaleziono", "dateFormat": "YYYY-MM-DD HH:mm", "filter": "filtr", "delete": "usuń" diff --git a/src/_h5ai/conf/options.json b/src/_h5ai/conf/options.json index 71405d05..12f3f40c 100644 --- a/src/_h5ai/conf/options.json +++ b/src/_h5ai/conf/options.json @@ -23,13 +23,19 @@ Options /* General view options. - - modes: array of "details", "icons", "grid" and/or "list" + - modes: array, subset of ["details", "grid", "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. + - sizes: array, subset of [16, 24, 32, 48, 64, 96] 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. - setParentFolderLabels: set parent folder labels to real folder names - - hideParentFolderLinks: hide parent folder links + - hideParentFolderLinks: hide parent folder links in the main view + - hideFolders: hide all folders in the main view - binaryPrefix: set to true uses 1024B=1KiB when formatting file sizes (see http://en.wikipedia.org/wiki/Binary_prefix) - indexFiles: consider folder with those files as non {{pkg.name}} folders - ignore: don't list items matching these regular expressions @@ -37,14 +43,16 @@ Options - extInNewWindow: open non-h5ai links in new window/tab */ "view": { - "modes": ["details", "icons", "grid", "list"], + "modes": ["details", "grid", "icons"], + "sizes": [48, 24, 96], "setParentFolderLabels": true, "hideParentFolderLinks": false, + "hideFolders": false, "binaryPrefix": false, "indexFiles": ["index.html", "index.htm", "index.php"], "ignore": ["^\\.", "^_{{pkg.name}}"], "smartBrowsing": true, - "extInNewWindow": true + "extInNewWindow": false }, @@ -107,7 +115,7 @@ Options - packageName: basename of the download package, null for current foldername */ "download": { - "enabled": true, + "enabled": false, "type": "php-tar", "packageName": null }, @@ -129,7 +137,7 @@ Options Calc the size of folders. */ "foldersize": { - "enabled": true + "enabled": false }, /* @@ -180,7 +188,7 @@ Options 2: mode, servername and -version */ "mode": { - "enabled": true, + "enabled": false, "display": 2 }, @@ -208,38 +216,41 @@ Options /* Show text file preview on click. - "types" maps file types to SyntaxHighligher brushes. Special case: "markdown" will - be rendered as HTML. - + "types" maps file types to SyntaxHighligher brushes. For available brushes see http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/ + Additional type are: + - "markdown" to render Markdown text + - "none" for floating text + - "fixed" for fixed width text + - types: maps types to brushes */ "preview-txt": { "enabled": true, "types": { - "authors": "plain", - "copying": "plain", + "authors": "fixed", + "copying": "fixed", "c": "c", "cpp": "cpp", "css": "css", "diff": "diff", "h": "c", "hpp": "cpp", - "install": "plain", - "log": "plain", + "install": "fixed", + "log": "fixed", "java": "java", "js": "js", "json": "js", "makefile": "xml", - "markdown": "plain", + "markdown": "markdown", // "php": "php", "python": "python", - "readme": "plain", + "readme": "fixed", "rb": "ruby", - "rtf": "plain", + "rtf": "fixed", "script": "shell", - "text": "plain", + "text": "fixed", "xml": "xml" } }, @@ -263,23 +274,31 @@ Options }, /* - Make entries selectable. At the moment only needed for packaged download and delete. + Make entries selectable (first mouse button + drag). + At the moment only needed for packaged download and delete. + + - checkboxes: boolean, show a checkbox on mouse over item */ "select": { - "enabled": true + "enabled": true, + "checkboxes": true }, /* - 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". + Default sort order. + "column" and "reverse" are locally stored. - - order: "na", "nd", "da", "dd", "sa" or "sd" + - column: int, 0 for "Name", 1 for "Date", 2 for "Size" + - reverse: boolean, false for ascending, true for descending + - ignorecase: boolean, compare ignorecase + - natural: boolean, use natural sort order */ "sort": { "enabled": true, - "order": "na" + "column": 0, + "reverse": false, + "ignorecase": true, + "natural": false }, /* @@ -297,13 +316,17 @@ Options - mov: array of types - doc: array of types - delay: delay in milliseconds after "dom-ready" before thumb-requesting starts + - size: number, size in pixel of the generated thumbnails + - exif: boolean, use included EXIF thumbs if possible */ "thumbnails": { "enabled": true, "img": ["bmp", "gif", "ico", "image", "jpg", "png"], "mov": ["video"], "doc": ["pdf", "ps"], - "delay": 1 + "delay": 1, + "size": 96, + "exif": true }, /* diff --git a/src/_h5ai/conf/types.json b/src/_h5ai/conf/types.json index 1e7105df..bf0f5f1a 100644 --- a/src/_h5ai/conf/types.json +++ b/src/_h5ai/conf/types.json @@ -7,7 +7,7 @@ File types mapped to file extensions { "archive": [".tar.bz2", ".tar.gz", ".tgz"], - "audio": [".aif", ".flac", ".m4a", ".mid", ".mp3", ".mpa", ".ra", ".ogg", ".wav", ".wma"], + "audio": [".aif", ".aiff", ".flac", ".m4a", ".mid", ".mp3", ".mpa", ".ra", ".ogg", ".wav", ".wma"], "authors": ["authors"], "bin": [".class", ".o", ".so"], "blank": [], diff --git a/src/_h5ai/index.html.jade b/src/_h5ai/index.html.jade index 708aee0e..eea96a56 100644 --- a/src/_h5ai/index.html.jade +++ b/src/_h5ai/index.html.jade @@ -2,7 +2,7 @@ doctype 5 //if lt IE 9 //[if gt IE 8]>= 5.2.1 + div.test-info PHP version >= 5.2.1 li.test( data-id="cache" ) - span.test-label cache directory + span.test-label Cache directory span.test-result ? - div.test-info web server has write access + div.test-info Web server has write access li.test( data-id="thumbs" ) - span.test-label image thumbs + span.test-label Image thumbs span.test-result ? div.test-info PHP GD extension with JPEG support available + li.test( data-id="exif" ) + span.test-label Use EXIF thumbs + span.test-result ? + div.test-info PHP EXIF extension available li.test( data-id="ffmpeg" ) - span.test-label movie thumbs + span.test-label Movie thumbs span.test-result ? - div.test-info command 'ffmpeg' available + div.test-info + | Command line program + code ffmpeg + | available li.test( data-id="convert" ) - span.test-label pdf thumbs + span.test-label PDF thumbs span.test-result ? - div.test-info command 'convert' available + div.test-info + | Command line program + code convert + | available li.test( data-id="tar" ) - span.test-label shell tar + span.test-label Shell tar span.test-result ? - div.test-info command 'tar' available + div.test-info + | Command line program + code tar + | available li.test( data-id="zip" ) - span.test-label shell zip + span.test-label Shell zip span.test-result ? - div.test-info command 'zip' available + div.test-info + | Command line program + code zip + | available li.test( data-id="du" ) - span.test-label folder size + span.test-label Folder sizes span.test-result ? - div.test-info command 'du' available + div.test-info + | Command line program + code du + | available div#bottombar.clearfix span.left a#h5ai-reference( href="{{pkg.url}}", title="{{pkg.name}} · {{pkg.description}}" ) | {{pkg.name}} {{pkg.version}} - span.hideOnJs.noJsMsg + span.noJsMsg | ⚡ JavaScript disabled! ⚡ span.noBrowserMsg | ⚡ Unsupported browser! Works best in diff --git a/src/_h5ai/server/php/inc/Api.php b/src/_h5ai/server/php/inc/Api.php index 6968a14c..518a4702 100644 --- a/src/_h5ai/server/php/inc/Api.php +++ b/src/_h5ai/server/php/inc/Api.php @@ -207,6 +207,8 @@ class Api { json_exit(); } + + json_fail(100, "unsupported request"); } } diff --git a/src/_h5ai/server/php/inc/App.php b/src/_h5ai/server/php/inc/App.php index 1617ad4c..c353f3c9 100644 --- a/src/_h5ai/server/php/inc/App.php +++ b/src/_h5ai/server/php/inc/App.php @@ -209,11 +209,13 @@ class App { $html = ""; $html .= ""; if ($folder->get_parent($cache)) { - $html .= ""; + $html .= ""; } foreach ($items as $item) { + $type = $item->is_folder ? "folder" : "default"; + $html .= ""; - $html .= ""; + $html .= ""; $html .= ""; $html .= ""; $html .= ""; @@ -278,18 +280,21 @@ class App { $gdinfo = gd_info(); $gd = array_key_exists("JPG Support", $gdinfo) && $gdinfo["JPG Support"] || array_key_exists("JPEG Support", $gdinfo) && $gdinfo["JPEG Support"]; } + $exif = function_exists("exif_thumbnail"); $cache = @is_writable($this->get_cache_abs_path()); - $tar = @preg_match("/tar(.exe)?$/i", `which tar`) > 0; - $zip = @preg_match("/zip(.exe)?$/i", `which zip`) > 0; - $convert = @preg_match("/convert(.exe)?$/i", `which convert`) > 0; - $ffmpeg = @preg_match("/ffmpeg(.exe)?$/i", `which ffmpeg`) > 0; - $du = @preg_match("/du(.exe)?$/i", `which du`) > 0; + $tar = @preg_match("/tar(.exe)?$/i", `command -v tar`) > 0; + $zip = @preg_match("/zip(.exe)?$/i", `command -v zip`) > 0; + $convert = @preg_match("/convert(.exe)?$/i", `command -v convert`) > 0; + $ffmpeg = @preg_match("/ffmpeg(.exe)?$/i", `command -v ffmpeg`) > 0; + $du = @preg_match("/du(.exe)?$/i", `command -v du`) > 0; return array( "idx" => $this->app_abs_href . "server/php/index.php", + "phpversion" => PHP_VERSION, "php" => $php, "cache" => $cache, "thumbs" => $gd, + "exif" => $exif, "tar" => $tar, "zip" => $zip, "convert" => $convert, diff --git a/src/_h5ai/server/php/inc/Archive.php b/src/_h5ai/server/php/inc/Archive.php index 80482eb3..92fd30f0 100644 --- a/src/_h5ai/server/php/inc/Archive.php +++ b/src/_h5ai/server/php/inc/Archive.php @@ -44,9 +44,9 @@ class Archive { private function shell_cmd($cmd) { - $cmd = str_replace("[ROOTDIR]", "\"" . $this->app->get_abs_path() . "\"", $cmd); - $cmd = str_replace("[DIRS]", count($this->dirs) ? "\"" . implode("\" \"", array_values($this->dirs)) . "\"" : "", $cmd); - $cmd = str_replace("[FILES]", count($this->files) ? "\"" . implode("\" \"", array_values($this->files)) . "\"" : "", $cmd); + $cmd = str_replace("[ROOTDIR]", escapeshellarg($this->app->get_abs_path()), $cmd); + $cmd = str_replace("[DIRS]", count($this->dirs) ? implode(" ", array_map("escapeshellarg", $this->dirs)) : "", $cmd); + $cmd = str_replace("[FILES]", count($this->files) ? implode(" ", array_map("escapeshellarg", $this->files)) : "", $cmd); try { passthru($cmd); } catch (Exeption $err) { @@ -113,7 +113,7 @@ class Archive { . str_repeat("\0", 100) // linkname [100] . "ustar\0" // magic [6] . "00" // version [2] - . str_repeat("\0", 80) // uname, gname, defmajor, devminor [32 + 32 + 8 + 8] ?92? + . str_repeat("\0", 80) // uname, gname, defmajor, devminor [32 + 32 + 8 + 8] . str_pad($prefix, 155, "\0") // filename [155] . str_repeat("\0", 12); // fill [12] assert(strlen($header) === 512); @@ -153,7 +153,7 @@ class Archive { if ($code == App::$MAGIC_SEQUENCE && !$this->app->is_ignored($n)) { $real_file = $this->app->get_abs_path($href); - $archived_file = preg_replace("!^" . normalize_path($this->app->get_abs_path(), true) . "!", "", $real_file); + $archived_file = preg_replace("!^" . preg_quote(normalize_path($this->app->get_abs_path(), true)) . "!", "", $real_file); if (is_dir($real_file)) { $this->add_dir($real_file, $archived_file); diff --git a/src/_h5ai/server/php/inc/Item.php b/src/_h5ai/server/php/inc/Item.php index 1a5c6135..2da5bffa 100644 --- a/src/_h5ai/server/php/inc/Item.php +++ b/src/_h5ai/server/php/inc/Item.php @@ -2,7 +2,7 @@ class Item { - private static $FOLDER_SIZE_CMD = "du -sk \"[DIR]\""; + private static $FOLDER_SIZE_CMD = "du -sk [DIR]"; public static function cmp($item1, $item2) { @@ -57,7 +57,7 @@ class Item { $this->size = null; $options = $app->get_options(); if ($options["foldersize"]["enabled"]) { - $cmd = str_replace("[DIR]", $this->abs_path, Item::$FOLDER_SIZE_CMD); + $cmd = str_replace("[DIR]", escapeshellarg($this->abs_path), Item::$FOLDER_SIZE_CMD); $this->size = intval(preg_replace("/\s.*$/", "", `$cmd`), 10) * 1024; } } else { diff --git a/src/_h5ai/server/php/inc/Thumb.php b/src/_h5ai/server/php/inc/Thumb.php index d4b6dacd..5912f376 100644 --- a/src/_h5ai/server/php/inc/Thumb.php +++ b/src/_h5ai/server/php/inc/Thumb.php @@ -2,8 +2,9 @@ class Thumb { - private static $FFMPEG_CMD = "ffmpeg -i \"[SOURCE]\" -an -ss 3 -vframes 1 \"[TARGET]\""; - private static $CONVERT_CMD = "convert -strip \"[SOURCE][0]\" \"[TARGET]\""; + private static $FFMPEG_CMD = "ffmpeg -i [SOURCE] -an -ss 3 -vframes 1 [TARGET]"; + private static $CONVERT_CMD = "convert -strip [SOURCE][0] [TARGET]"; + private static $THUMB_CACHE = "thumbs"; public static final function is_supported() { @@ -22,6 +23,8 @@ class Thumb { public function __construct($app) { $this->app = $app; + $this->thumbs_path = $this->app->get_cache_abs_path() . "/" . Thumb::$THUMB_CACHE; + $this->thumbs_href = $this->app->get_cache_abs_href() . Thumb::$THUMB_CACHE; } @@ -47,17 +50,22 @@ class Thumb { return null; } + if (!is_dir($this->thumbs_path)) { + @mkdir($this->thumbs_path, 0755, true); + } + $name = "thumb-" . sha1("$source_abs_path-$width-$height-$mode") . ".jpg"; - $thumb_abs_path = $this->app->get_cache_abs_path() . "/" . $name; - $thumb_abs_href = $this->app->get_cache_abs_href() . $name; + $thumb_abs_path = $this->thumbs_path . "/" . $name; + $thumb_abs_href = $this->thumbs_href . "/" . $name; if (!file_exists($thumb_abs_path) || filemtime($source_abs_path) >= filemtime($thumb_abs_path)) { $image = new Image(); $et = false; - if (function_exists("exif_thumbnail")) { - $et = exif_thumbnail($source_abs_path); + $opts = $this->app->get_options(); + if ($opts["thumbnails"]["exif"] === true && function_exists("exif_thumbnail")) { + $et = @exif_thumbnail($source_abs_path); } if($et !== false) { file_put_contents($thumb_abs_path, $et); @@ -84,8 +92,8 @@ class Thumb { $capture_abs_path = $this->app->get_cache_abs_path() . "/capture-" . sha1($source_abs_path) . ".jpg"; if (!file_exists($capture_abs_path) || filemtime($source_abs_path) >= filemtime($capture_abs_path)) { - $cmd = str_replace("[SOURCE]", $source_abs_path, $cmd); - $cmd = str_replace("[TARGET]", $capture_abs_path, $cmd); + $cmd = str_replace("[SOURCE]", escapeshellarg($source_abs_path), $cmd); + $cmd = str_replace("[TARGET]", escapeshellarg($capture_abs_path), $cmd); `$cmd`; } @@ -94,66 +102,6 @@ class Thumb { } - -class Magic { - - private static $GET_SIZE_CMD = "identify -format \"%w %h\" \"[SOURCE]\""; - private static $RESIZE_CMD = "convert -strip -transparent-color \"#ffffff\" -resize [WIDTH]x[HEIGHT] -quality 80 \"[SOURCE]\" \"[TARGET]\""; - private static $SQUARE_CMD = "convert -strip -transparent-color \"#ffffff\" -crop [CWIDTH]x[CWIDTH]+[CLEFT]+[CTOP] -resize [WIDTH]x[WIDTH] -quality 80 \"[SOURCE]\" \"[TARGET]\""; - - - private static final function img_size($source) { - - $cmd = str_replace("[SOURCE]", str_replace("\"", "\\\"", $source), Magic::$GET_SIZE_CMD); - $size = explode(" ", `$cmd`); - $size[0] = intval($size[0]); - $size[1] = intval($size[1]); - return $size; - } - - private static final function rational($source, $target, $width, $height) { - - $cmd = str_replace("[SOURCE]", str_replace("\"", "\\\"", $source), Magic::$RESIZE_CMD); - $cmd = str_replace("[TARGET]", str_replace("\"", "\\\"", $target), $cmd); - $cmd = str_replace("[WIDTH]", $width, $cmd); - $cmd = str_replace("[HEIGHT]", $height, $cmd); - `$cmd`; - } - - private static final function square($source, $target, $width) { - - $size = Magic::img_size($source); - $w = $size[0]; - $h = $size[1]; - - $cwidth = min($w, $h); - $cleft = ($w - $cwidth) / 2; - $ctop = ($h - $cwidth) / 2; - - $cmd = str_replace("[SOURCE]", str_replace("\"", "\\\"", $source), Magic::$SQUARE_CMD); - $cmd = str_replace("[TARGET]", str_replace("\"", "\\\"", $target), $cmd); - $cmd = str_replace("[CWIDTH]", $cwidth, $cmd); - $cmd = str_replace("[CLEFT]", $cleft, $cmd); - $cmd = str_replace("[CTOP]", $ctop, $cmd); - $cmd = str_replace("[WIDTH]", $width, $cmd); - `$cmd`; - } - - public static final function thumb($mode, $source, $target, $width, $height = null, $color = null) { - - if ($height === null) { - $height = $width; - } - if ($mode === "square") { - Magic::square($source, $target, $width); - } elseif ($mode === "rational") { - Magic::rational($source, $target, $width, $height); - } - } -} - - - class Image { private $source_file, $source, $width, $height, $type, $dest; diff --git a/src/_h5ai/server/php/inc/page.php.jade b/src/_h5ai/server/php/inc/page.php.jade index 6b56d57d..f49aec7e 100644 --- a/src/_h5ai/server/php/inc/page.php.jade +++ b/src/_h5ai/server/php/inc/page.php.jade @@ -6,7 +6,7 @@ doctype 5 //if lt IE 9 //[if gt IE 8]> $value) { - $result[$key] = array_merge($result[$key], $b[$key]); - } - - return $result; -} -*/ - ?> \ No newline at end of file diff --git a/src/_h5ai/server/php/index.php b/src/_h5ai/server/php/index.php index 50916f7d..967d49b1 100644 --- a/src/_h5ai/server/php/index.php +++ b/src/_h5ai/server/php/index.php @@ -53,8 +53,6 @@ if (array_key_exists("action", $_REQUEST)) { $api = new Api($app); $api->apply(); - json_fail(100, "unsupported request"); - } else { header("Content-type: text/html;charset=utf-8");
    NameLast modifiedSize
    app_abs_href . "client/icons/16x16/folder-parent.png\"/>Parent Directory
    app_abs_href . "client/icons/96/folder-parent.png\" alt=\"folder-parent\"/>Parent Directory
    app_abs_href . "client/icons/16x16/" . ($item->is_folder ? "folder" : "default") . ".png\"/>app_abs_href . "client/icons/96/" . $type . ".png\" alt=\"" . $type . "\"/>abs_href . "\">" . basename($item->abs_path) . "" . date("Y-m-d H:i", $item->date) . "" . ($item->size !== null ? intval($item->size / 1000) . " KB" : "" ) . "