diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..8043b0f9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,442 @@ +# Changelog +**h5ai** uses [semantic versioning](http://semver.org/). + + +## v0.25.0 - *2014-06-22* + +* adds sidebar +* adds initial theme support +* adds icons from [Evolvere Icon Theme](http://franksouza183.deviantart.com/art/Evolvere-Icon-theme-440718295) +* adds PHP variant to calc folder sizes +* adds scroll position reset on location change (issue [#279](https://github.com/lrsjng/h5ai/issues/279)) +* adds option to hide unreadable files +* adds option where to place folders (top, inplace, bottom) +* adds markdown support for custom header and footer files +* adds video and audio preview via HTML5 elements (no fallback, works best in Chrome) +* adds filter reset on location change +* adds option to make download button always visible +* adds Google UA support +* extends selectable icon sizes (adds 128px, 192px, 256px, 384px) +* improves preview GUI +* disable thumbs in `cache` folder +* fixes QR code URI origin (issue [#287](https://github.com/lrsjng/h5ai/issues/287)) +* replaces PHP backtick operator with `exec` +* removes server side file manipulation extensions `dropbox`, `delete` and `rename` +* updates H5BP to 4.3.0 +* updates jQuery to 2.1.1 +* updates json2.js to 2014-02-04 +* updates markdown-js to 0.5.0 +* updates Modernizr to 2.8.2 +* updates Moment.js to 2.6.0 +* updates Underscore.js to 1.6.0 +* language updates (`bg`, `ko`, `pt`, `sl`, `sv`, `zh-cn`) + + +## v0.24.1 - *2014-04-09* + +* security fixes! (issues [#268](https://github.com/lrsjng/h5ai/issues/268), [#269](https://github.com/lrsjng/h5ai/issues/269)) +* language updates (`fi`, `fr`, `hi`, `it`, `zh-tw`) +* fixes WinOS command detection + + +## 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* + +* removes `aai` mode! +* drops support for IE7+8 (simple fallback, same as no javascript) +* uses History API if available (way faster browsing) +* faster thumbnail generation if EXIF thumbnails available +* adds optional custom headers/footers that are propageted to all subfolders +* optional hide parent folder links +* some fixes on previews +* speeds up packaged downloads +* add line wrap and line highlighting (on hover) to text preview +* new design (colors, images) +* now uses scalable images for the interface +* fixes filter (ignore parent folder, display of `no match`) +* lots of small fixes +* updates H5BP to 4.2.0 +* updates jQuery to 2.0.3 +* updates jQuery.mousewheel to 3.1.3 +* updates Moment.js to 2.1.0 +* updates markdown-js to 0.4.0-9c21acdf08 +* updates json2.js to 2013-05-26 +* adds `uk` translation by Viktor Matveenko +* updates to `pl` translation by Mark + + +## v0.22.1 - *2012-10-16* + +* bug fix concerning API requests in PHP mode +* minor changes in responsive styles + + +## v0.22 - *2012-10-14* + +* general changes h5ai directory layout and configuration +* splits configuration file (`config.json`) into files `options.json`, `types.json` and `langs.json` +* localization now in separate files +* adds auto-refresh +* adds drag'n'drop upload (PHP, experimental) +* adds file deletion (PHP, experimental) +* cleans and improves PHP code +* PHP no longer respects htaccess restrictions (so be careful) +* PHP ignore patterns might include paths now +* improves separation between aai and php mode +* improves performance in aai mode +* adds optional binary prefixes for file sizes +* improves filter: autofocus on keypress, clear on `ESC` +* download packages now packaged relative to current folder +* download package name changable +* splits type `js` into `js` and `json` +* prevents some errors with files > 2GB on 32bit OS +* adds max subfolder size in tree view +* adds ctrl-click file selection +* adds Piwik analytics extension +* temp download packages are now stored in the `cache`-folder and deleted as soon as possible +* updates translations +* adds `he` translation by [Tomer Cohen](https://github.com/tomer) +* updates 3rd party libs + + +## v0.21 - *2012-08-06* + +* fixes misaligned image previews +* adds no JavaScript fallback to PHP version +* fixes duplicate tree entries and empty main views +* adds Google Analytics support (async) +* 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](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](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 +* updates to [Moment.js](http://momentjs.com) 1.7.0 +* updates to [Underscore.js](http://underscorejs.org) 1.3.3 + + +## v0.20 - *2012-05-11* + +* adds image preview +* adds thumbnails for video and pdf +* adds support for lighttpd, nginx and cherokee and maybe other webservers with PHP +* adds folder size in PHP version via shell `du` +* fixes some localization problems +* updates info page at `/_h5ai/` +* switches to JSHint + + +## v0.19 - *2012-04-19* + +* adds lots of config options +* changes in `config.js` and `h5ai.htaccess` +* fixes js problems in IE 7+8 +* hides broken tree view in IE < 9, adds a message to the footer +* removes hash changes since they break logical browser history +* fixes thumbnail size for portrait images in icon view +* fixes problems with file type recognition +* adds an info page at `/_h5ai/` +* sort order is preserved while browsing +* removes PHP error messages on thumbnail generation +* fixes PHP some problems with packed download +* adds support for tarred downloads +* changes crumb image for folders with an index file +* 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](https://github.com/brandonaaron/jquery-mousewheel) to 3.0.6 +* updates `lv` translation +* 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* + +* adds optional QRCode display +* adds optional filtering for displayed files and folders +* updates design +* improves zipped download +* adds support for zipped download of htaccess restricted files +* changes h5ai.htaccess +* custom headers/footers are now optional and disabled by default +* fixes problems with folder recognition in the JS version +* fixes include problems in PHP version +* fixes path problems on servers running on Windows in PHP version +* fixes broken links in custom headers/footers while zipped download enabled +* fixes problems with thumbnails for files with single or double quotes in filename +* improves url hashes +* updates year in `LICENSE.TXT` +* updates es translation +* adds `zh-tw` translation by [Yao Wei](https://github.com/medicalwei) +* updates `zh-cn` translation + + +## v0.17 - *2011-11-28* + +* h5ai is now located in `_h5ai` to reduce collisions +* switches from HTML5 Boilerplate reset to normalization +* adds some style changes for small devices +* configuration (options, types, translations) now via `config.js` +* icons for JS version are now configured via `config.js` +* sort order configuration changed +* sorting is now done without page reload +* adds `customHeader` and `customFooter` to `config.js` +* supports restricted folders to some extent +* some style changes on tree and language menu +* fixes total file/folder count in status bar +* adds support for use with userdir (requires some manual changes) + + +## v0.16 - *2011-11-02* + +* sorts translations in `options.js` +* improves HTML head sections +* refactors JavaScript and PHP a lot +* improves/fixes file selection for zipped download +* fixes scrollbar and header/footer link issues (didn't work when zipped download enabled) +* adds support for ctrl-select +* `dateFormat` in `options.js` changed, now affecting JS and PHP version +* `dateFormat` is localizable by adding it to a translation in `options.js` +* PHP version is now configurable via `php/config.php` (set custom doc root and other PHP related things) +* image thumbs and zipped download is disabled by default now, but works fine if PHP is configured + + +## v0.15.2 - *2011-09-18* + +* adds `it` translation by [Salvo Gentile](https://github.com/SalvoGentile) and [Marco Patriarca](https://github.com/Fexys) +* switches build process from scripp to wepp + + +## v0.15.1 - *2011-09-06* + +* fixes security issues with the zipped download feature +* makes zipped download optional (but enabled by default) + + +## v0.15 - *2011-09-04* + +* adds zipped download for selected files +* cleans and refactores + + +## v0.14.1 - *2011-09-01* + +* display meta information in bottom bar (icon view) +* adds `zh-cn` translation by [Dongsheng Cai](https://github.com/dongsheng) +* adds `pl` translation by Radosław Zając +* adds `ru` translation by Богдан Илюхин + + +## v0.14 - *2011-08-16* + +* adds image thumbnails for PHP version +* new option `slideTree` to turn off auto slide in + + +## v0.13.2 - *2011-08-12* + +* changes in `/h5ai/.htaccess` ... PHP configuration ... + + +## v0.13.1 - *2011-08-12* + +* fixes initial tree display +* adds sort order option +* adds/fixes some translations +* adds `lv` translation by Sandis Veinbergs + + +## v0.13 - *2011-08-06* + +* adds PHP implementation! (should work with PHP 5.2+) +* adds new options +* changes layout of the bottom bar to display status information +* adds language selector to the bottom bar +* quotes keys in `options.js` to make it valid json +* 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](https://github.com/jonnsl) +* adds `bg` translation by George Andonov + + +## v0.12.3 - *2011-07-30* + +* adds `tr` translation by [Batuhan Icoz](https://github.com/batuhanicoz) + + +## v0.12.2 - *2011-07-30* + +* adds `es` translation by Jose David Calderon Serrano + + +## v0.12.1 - *2011-07-29* + +* fixes unchecked use of console.log + + +## v0.12 - *2011-07-28* + +* improves performance + + +## v0.11 - *2011-07-27* + +* changes license to MIT license, see `LICENSE.txt` + + +## v0.10.2 - *2011-07-26* + +* improves tree scrollbar + + +## v0.10.1 - *2011-07-24* + +* fixes problems with ' in links + + +## 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](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) + + +## v0.9 - *2011-07-18* + +* links hover states between crumb, extended view and tree +* 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](https://github.com/Nicosmos) +* adds `nl` translation by [Stefan de Konink](https://github.com/skinkie) +* adds `sv` translation by Oscar Carlsson + + +## v0.8 - *2011-07-08* + +* removes slashes from folder labels +* optionally rename parent folder entries to real folder names, see `options.js` +* long breadcrumbs (multiple rows) no longer hide content +* error folder icons are opaque now +* refactores js a lot (again...) + + +## v0.7 - *2011-07-07* + +* removes shadows +* smarter tree side bar + + +## v0.6 - *2011-07-05* + +* refactores js +* adds localization, see `options.js` + + +## v0.5.3 - *2011-07-04* + +* refactores js +* adds basic options support via `options.js` +* adds comments to `options.js` +* adds optional tree sidebar + + +## v0.5.2 - *2011-07-02* + +* details view adjusts to window width +* links icon for *.gz and *.bz2 + + +## v0.5.1 - *2011-07-01* + +* disables tree sidebar for now, since it had unwanted side effects + + +## v0.5 - *2011-07-01* + +* adds tree sidebar +* some refactorings + + +## v0.4 - *2011-06-27* + +* adds better fallback, in case JavaScript is disabled +* rewrites js, fixed middle-button click etc. problems +* refactors css +* sorts, adds and moves icons and images +* updates dot.access + + +## v0.3.2 - *2011-06-24* + +* removes lib versions from file names +* adds 'empty' indicator for icons view + + +## v0.3.1 - *2011-06-24* + +* refactores js +* adds `folderClick` and `fileClick` callback hooks +* fixes .emtpy style + + +## v0.3 - *2011-06-23* + +* includes build stuff, files previously found in the base directory are now located in folder `target` +* styles and scripts are now minified +* adds Modernizr 2.0.4 for future use +* updates jQuery to version 1.6.1 + + +## v0.2.3 - *2011-06-17* + +* more refactoring in main.js + + +## v0.2.2 - *2011-06-16* + +* refactores a lot, adds some comments +* includes fixes from [NumEricR](https://github.com/NumEricR) +* adds top/bottom message support, only basicly styled + + +## v0.2.1 - *2011-06-16* + +* fixes croped filenames +* fixes missing .png extension in header +* adds some color to the links +* adds changelog + + +## v0.2 - *2011-06-15* + +* adds icon view diff --git a/LICENSE.md b/LICENSE.md index 35363c3f..24370d2e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2013 Lars Jung, http://larsjung.de +Copyright (c) 2014 Lars Jung, http://larsjung.de Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index e7329f82..60f8ce54 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,11 @@ You'll find a new directory `build` including a fresh zipball. **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), +[Evolvere Icon Theme](http://franksouza183.deviantart.com/art/Evolvere-Icon-theme-440718295) (CC BY-NC-ND 3.0), +[Faenza Icons](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) (GPL), [Gnome Symbolic Icon Theme](https://git.gnome.org/browse/gnome-icon-theme-symbolic/) (CC BY-SA 3.0), [HTML5 ★ Boilerplate](http://html5boilerplate.com) (MIT), [jQuery](http://jquery.com) (MIT), -[jQuery.filedrop](http://www.github.com/weixiyen/jquery-filedrop) (MIT), [jQuery.fracs](http://larsjung.de/fracs/) (MIT), [jQuery.mousewheel](https://github.com/brandonaaron/jquery-mousewheel) (MIT), [jQuery.qrcode](http://larsjung.de/qrcode/) (MIT), @@ -48,418 +48,3 @@ It profits from these great projects: [Moment.js](http://momentjs.com) (MIT), [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) (MIT/GPL), [Underscore.js](http://underscorejs.org) (MIT) - - -## Changelog -**h5ai** uses [semantic versioning](http://semver.org/). - - -### v0.24.1 - *2014-04-09* - -* security fixes! (issues #268, #269) -* language updates (`fi`, `fr`, `hi`, `it`, `zh-tw`) -* fixes WinOS command detection - - -### 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* - -* removes `aai` mode! -* drops support for IE7+8 (simple fallback, same as no javascript) -* uses History API if available (way faster browsing) -* faster thumbnail generation if EXIF thumbnails available -* adds optional custom headers/footers that are propageted to all subfolders -* optional hide parent folder links -* some fixes on previews -* speeds up packaged downloads -* add line wrap and line highlighting (on hover) to text preview -* new design (colors, images) -* now uses scalable images for the interface -* fixes filter (ignore parent folder, display of `no match`) -* lots of small fixes -* updates H5BP to 4.2.0 -* updates jQuery to 2.0.3 -* updates jQuery.mousewheel to 3.1.3 -* updates Moment.js to 2.1.0 -* updates markdown-js to 0.4.0-9c21acdf08 -* updates json2.js to 2013-05-26 -* adds `uk` translation by Viktor Matveenko -* updates to `pl` translation by Mark - - -### v0.22.1 - *2012-10-16* - -* bug fix concerning API requests in PHP mode -* minor changes in responsive styles - - -### v0.22 - *2012-10-14* - -* general changes h5ai directory layout and configuration -* splits configuration file (`config.json`) into files `options.json`, `types.json` and `langs.json` -* localization now in separate files -* adds auto-refresh -* adds drag'n'drop upload (PHP, experimental) -* adds file deletion (PHP, experimental) -* cleans and improves PHP code -* PHP no longer respects htaccess restrictions (so be careful) -* PHP ignore patterns might include paths now -* improves separation between aai and php mode -* improves performance in aai mode -* adds optional binary prefixes for file sizes -* improves filter: autofocus on keypress, clear on `ESC` -* download packages now packaged relative to current folder -* download package name changable -* splits type `js` into `js` and `json` -* prevents some errors with files > 2GB on 32bit OS -* adds max subfolder size in tree view -* adds ctrl-click file selection -* adds Piwik analytics extension -* temp download packages are now stored in the `cache`-folder and deleted as soon as possible -* updates translations -* adds `he` translation by [Tomer Cohen](https://github.com/tomer) -* updates 3rd party libs - - -### v0.21 - *2012-08-06* - -* fixes misaligned image previews -* adds no JavaScript fallback to PHP version -* fixes duplicate tree entries and empty main views -* adds Google Analytics support (async) -* 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](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](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 -* updates to [Moment.js](http://momentjs.com) 1.7.0 -* updates to [Underscore.js](http://underscorejs.org) 1.3.3 - - -### v0.20 - *2012-05-11* - -* adds image preview -* adds thumbnails for video and pdf -* adds support for lighttpd, nginx and cherokee and maybe other webservers with PHP -* adds folder size in PHP version via shell `du` -* fixes some localization problems -* updates info page at `/_h5ai/` -* switches to JSHint - - -### v0.19 - *2012-04-19* - -* adds lots of config options -* changes in `config.js` and `h5ai.htaccess` -* fixes js problems in IE 7+8 -* hides broken tree view in IE < 9, adds a message to the footer -* removes hash changes since they break logical browser history -* fixes thumbnail size for portrait images in icon view -* fixes problems with file type recognition -* adds an info page at `/_h5ai/` -* sort order is preserved while browsing -* removes PHP error messages on thumbnail generation -* fixes PHP some problems with packed download -* adds support for tarred downloads -* changes crumb image for folders with an index file -* 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](https://github.com/brandonaaron/jquery-mousewheel) to 3.0.6 -* updates `lv` translation -* 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* - -* adds optional QRCode display -* adds optional filtering for displayed files and folders -* updates design -* improves zipped download -* adds support for zipped download of htaccess restricted files -* changes h5ai.htaccess -* custom headers/footers are now optional and disabled by default -* fixes problems with folder recognition in the JS version -* fixes include problems in PHP version -* fixes path problems on servers running on Windows in PHP version -* fixes broken links in custom headers/footers while zipped download enabled -* fixes problems with thumbnails for files with single or double quotes in filename -* improves url hashes -* updates year in `LICENSE.TXT` -* updates es translation -* adds `zh-tw` translation by [Yao Wei](https://github.com/medicalwei) -* updates `zh-cn` translation - - -### v0.17 - *2011-11-28* - -* h5ai is now located in `_h5ai` to reduce collisions -* switches from HTML5 Boilerplate reset to normalization -* adds some style changes for small devices -* configuration (options, types, translations) now via `config.js` -* icons for JS version are now configured via `config.js` -* sort order configuration changed -* sorting is now done without page reload -* adds `customHeader` and `customFooter` to `config.js` -* supports restricted folders to some extent -* some style changes on tree and language menu -* fixes total file/folder count in status bar -* adds support for use with userdir (requires some manual changes) - - -### v0.16 - *2011-11-02* - -* sorts translations in `options.js` -* improves HTML head sections -* refactors JavaScript and PHP a lot -* improves/fixes file selection for zipped download -* fixes scrollbar and header/footer link issues (didn't work when zipped download enabled) -* adds support for ctrl-select -* `dateFormat` in `options.js` changed, now affecting JS and PHP version -* `dateFormat` is localizable by adding it to a translation in `options.js` -* PHP version is now configurable via `php/config.php` (set custom doc root and other PHP related things) -* image thumbs and zipped download is disabled by default now, but works fine if PHP is configured - - -### v0.15.2 - *2011-09-18* - -* adds `it` translation by [Salvo Gentile](https://github.com/SalvoGentile) and [Marco Patriarca](https://github.com/Fexys) -* switches build process from scripp to wepp - - -### v0.15.1 - *2011-09-06* - -* fixes security issues with the zipped download feature -* makes zipped download optional (but enabled by default) - - -### v0.15 - *2011-09-04* - -* adds zipped download for selected files -* cleans and refactores - - -### v0.14.1 - *2011-09-01* - -* display meta information in bottom bar (icon view) -* adds `zh-cn` translation by [Dongsheng Cai](https://github.com/dongsheng) -* adds `pl` translation by Radosław Zając -* adds `ru` translation by Богдан Илюхин - - -### v0.14 - *2011-08-16* - -* adds image thumbnails for PHP version -* new option `slideTree` to turn off auto slide in - - -### v0.13.2 - *2011-08-12* - -* changes in `/h5ai/.htaccess` ... PHP configuration ... - - -### v0.13.1 - *2011-08-12* - -* fixes initial tree display -* adds sort order option -* adds/fixes some translations -* adds `lv` translation by Sandis Veinbergs - - -### v0.13 - *2011-08-06* - -* adds PHP implementation! (should work with PHP 5.2+) -* adds new options -* changes layout of the bottom bar to display status information -* adds language selector to the bottom bar -* quotes keys in `options.js` to make it valid json -* 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](https://github.com/jonnsl) -* adds `bg` translation by George Andonov - - -### v0.12.3 - *2011-07-30* - -* adds `tr` translation by [Batuhan Icoz](https://github.com/batuhanicoz) - - -### v0.12.2 - *2011-07-30* - -* adds `es` translation by Jose David Calderon Serrano - - -### v0.12.1 - *2011-07-29* - -* fixes unchecked use of console.log - - -### v0.12 - *2011-07-28* - -* improves performance - - -### v0.11 - *2011-07-27* - -* changes license to MIT license, see `LICENSE.txt` - - -### v0.10.2 - *2011-07-26* - -* improves tree scrollbar - - -### v0.10.1 - *2011-07-24* - -* fixes problems with ' in links - - -### 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](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) - - -### v0.9 - *2011-07-18* - -* links hover states between crumb, extended view and tree -* 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](https://github.com/Nicosmos) -* adds `nl` translation by [Stefan de Konink](https://github.com/skinkie) -* adds `sv` translation by Oscar Carlsson - - -### v0.8 - *2011-07-08* - -* removes slashes from folder labels -* optionally rename parent folder entries to real folder names, see `options.js` -* long breadcrumbs (multiple rows) no longer hide content -* error folder icons are opaque now -* refactores js a lot (again...) - - -### v0.7 - *2011-07-07* - -* removes shadows -* smarter tree side bar - - -### v0.6 - *2011-07-05* - -* refactores js -* adds localization, see `options.js` - - -### v0.5.3 - *2011-07-04* - -* refactores js -* adds basic options support via `options.js` -* adds comments to `options.js` -* adds optional tree sidebar - - -### v0.5.2 - *2011-07-02* - -* details view adjusts to window width -* links icon for *.gz and *.bz2 - - -### v0.5.1 - *2011-07-01* - -* disables tree sidebar for now, since it had unwanted side effects - - -### v0.5 - *2011-07-01* - -* adds tree sidebar -* some refactorings - - -### v0.4 - *2011-06-27* - -* adds better fallback, in case JavaScript is disabled -* rewrites js, fixed middle-button click etc. problems -* refactors css -* sorts, adds and moves icons and images -* updates dot.access - - -### v0.3.2 - *2011-06-24* - -* removes lib versions from file names -* adds 'empty' indicator for icons view - - -### v0.3.1 - *2011-06-24* - -* refactores js -* adds `folderClick` and `fileClick` callback hooks -* fixes .emtpy style - - -### v0.3 - *2011-06-23* - -* includes build stuff, files previously found in the base directory are now located in folder `target` -* styles and scripts are now minified -* adds Modernizr 2.0.4 for future use -* updates jQuery to version 1.6.1 - - -### v0.2.3 - *2011-06-17* - -* more refactoring in main.js - - -### v0.2.2 - *2011-06-16* - -* refactores a lot, adds some comments -* includes fixes from [NumEricR](https://github.com/NumEricR) -* adds top/bottom message support, only basicly styled - - -### v0.2.1 - *2011-06-16* - -* fixes croped filenames -* fixes missing .png extension in header -* adds some color to the links -* adds changelog - - -### v0.2 - *2011-06-15* - -* adds icon view - diff --git a/makefile.js b/makefile.js index 194107b5..2d87ecd2 100644 --- a/makefile.js +++ b/makefile.js @@ -110,6 +110,10 @@ module.exports = function (make) { .handlebars(make.env) .WRITE(mapSrc); + $(src + ': _h5ai/client/css/fonts/**') + .newerThan(mapSrc) + .WRITE(mapSrc); + $(root + ': *.md') .newerThan(mapRoot) .WRITE(mapRoot); @@ -141,6 +145,10 @@ module.exports = function (make) { .handlebars(make.env) .WRITE(mapSrc); + $(src + ': _h5ai/client/css/fonts/**') + .newerThan(mapSrc) + .WRITE(mapSrc); + $(root + ': *.md') .newerThan(mapRoot) .WRITE(mapRoot); diff --git a/package.json b/package.json index 70451e75..dc99766c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "h5ai", - "version": "0.24.1", + "version": "0.25.0", "description": "a modern HTTP web server index", "url": "http://larsjung.de/h5ai/", "author": "Lars Jung", diff --git a/src/_h5ai/client/css/fonts/LICENCE.txt b/src/_h5ai/client/css/fonts/LICENCE.txt new file mode 100644 index 00000000..ae78a8f9 --- /dev/null +++ b/src/_h5ai/client/css/fonts/LICENCE.txt @@ -0,0 +1,96 @@ +------------------------------- +UBUNTU FONT LICENCE Version 1.0 +------------------------------- + +PREAMBLE +This licence allows the licensed fonts to be used, studied, modified and +redistributed freely. The fonts, including any derivative works, can be +bundled, embedded, and redistributed provided the terms of this licence +are met. The fonts and derivatives, however, cannot be released under +any other licence. The requirement for fonts to remain under this +licence does not require any document created using the fonts or their +derivatives to be published under this licence, as long as the primary +purpose of the document is not to be a vehicle for the distribution of +the fonts. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this licence and clearly marked as such. This may +include source files, build scripts and documentation. + +"Original Version" refers to the collection of Font Software components +as received under this licence. + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to +a new environment. + +"Copyright Holder(s)" refers to all individuals and companies who have a +copyright ownership of the Font Software. + +"Substantially Changed" refers to Modified Versions which can be easily +identified as dissimilar to the Font Software by users of the Font +Software comparing the Original Version with the Modified Version. + +To "Propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification and with or without charging +a redistribution fee), making available to the public, and in some +countries other activities as well. + +PERMISSION & CONDITIONS +This licence does not grant any rights under trademark law and all such +rights are reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to propagate the Font Software, subject to +the below conditions: + +1) Each copy of the Font Software must contain the above copyright +notice and this licence. These can be included either as stand-alone +text files, human-readable headers or in the appropriate machine- +readable metadata fields within text or binary files as long as those +fields can be easily viewed by the user. + +2) The font name complies with the following: +(a) The Original Version must retain its name, unmodified. +(b) Modified Versions which are Substantially Changed must be renamed to +avoid use of the name of the Original Version or similar names entirely. +(c) Modified Versions which are not Substantially Changed must be +renamed to both (i) retain the name of the Original Version and (ii) add +additional naming elements to distinguish the Modified Version from the +Original Version. The name of such Modified Versions must be the name of +the Original Version, with "derivative X" where X represents the name of +the new work, appended to that name. + +3) The name(s) of the Copyright Holder(s) and any contributor to the +Font Software shall not be used to promote, endorse or advertise any +Modified Version, except (i) as required by this licence, (ii) to +acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with +their explicit written permission. + +4) The Font Software, modified or unmodified, in part or in whole, must +be distributed entirely under this licence, and must not be distributed +under any other licence. The requirement for fonts to remain under this +licence does not affect any document created using the Font Software, +except any version of the Font Software extracted from a document +created using the Font Software may only be distributed under this +licence. + +TERMINATION +This licence becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER +DEALINGS IN THE FONT SOFTWARE. diff --git a/src/_h5ai/client/css/fonts/README.txt b/src/_h5ai/client/css/fonts/README.txt new file mode 100644 index 00000000..292d4ade --- /dev/null +++ b/src/_h5ai/client/css/fonts/README.txt @@ -0,0 +1,15 @@ + ---------------------- + Ubuntu Font Family + ====================== + +The Ubuntu Font Family are a set of matching new libre/open fonts in +development during 2010--2011. The development is being funded by +Canonical Ltd on behalf the wider Free Software community and the +Ubuntu project. The technical font design work and implementation is +being undertaken by Dalton Maag. + +Both the final font Truetype/OpenType files and the design files used +to produce the font family are distributed under an open licence and +you are expressly encouraged to experiment, modify, share and improve. + + http://font.ubuntu.com/ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-B.ttf b/src/_h5ai/client/css/fonts/Ubuntu-B.ttf new file mode 100644 index 00000000..c0142fea Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-B.ttf differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-B.woff b/src/_h5ai/client/css/fonts/Ubuntu-B.woff new file mode 100644 index 00000000..77abf734 Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-B.woff differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-BI.ttf b/src/_h5ai/client/css/fonts/Ubuntu-BI.ttf new file mode 100644 index 00000000..12e4c7df Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-BI.ttf differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-BI.woff b/src/_h5ai/client/css/fonts/Ubuntu-BI.woff new file mode 100644 index 00000000..275d7091 Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-BI.woff differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-L.ttf b/src/_h5ai/client/css/fonts/Ubuntu-L.ttf new file mode 100644 index 00000000..7b7ac7dd Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-L.ttf differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-L.woff b/src/_h5ai/client/css/fonts/Ubuntu-L.woff new file mode 100644 index 00000000..c27e714d Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-L.woff differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-LI.ttf b/src/_h5ai/client/css/fonts/Ubuntu-LI.ttf new file mode 100644 index 00000000..e36de452 Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-LI.ttf differ diff --git a/src/_h5ai/client/css/fonts/Ubuntu-LI.woff b/src/_h5ai/client/css/fonts/Ubuntu-LI.woff new file mode 100644 index 00000000..099c1430 Binary files /dev/null and b/src/_h5ai/client/css/fonts/Ubuntu-LI.woff differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-B.ttf b/src/_h5ai/client/css/fonts/UbuntuMono-B.ttf new file mode 100644 index 00000000..7bd66657 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-B.ttf differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-B.woff b/src/_h5ai/client/css/fonts/UbuntuMono-B.woff new file mode 100644 index 00000000..8ce9c0bb Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-B.woff differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-BI.ttf b/src/_h5ai/client/css/fonts/UbuntuMono-BI.ttf new file mode 100644 index 00000000..6c5b8ba0 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-BI.ttf differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-BI.woff b/src/_h5ai/client/css/fonts/UbuntuMono-BI.woff new file mode 100644 index 00000000..40f83c34 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-BI.woff differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-R.ttf b/src/_h5ai/client/css/fonts/UbuntuMono-R.ttf new file mode 100644 index 00000000..fdd309d7 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-R.ttf differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-R.woff b/src/_h5ai/client/css/fonts/UbuntuMono-R.woff new file mode 100644 index 00000000..16899314 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-R.woff differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-RI.ttf b/src/_h5ai/client/css/fonts/UbuntuMono-RI.ttf new file mode 100644 index 00000000..18f81a29 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-RI.ttf differ diff --git a/src/_h5ai/client/css/fonts/UbuntuMono-RI.woff b/src/_h5ai/client/css/fonts/UbuntuMono-RI.woff new file mode 100644 index 00000000..b073b037 Binary files /dev/null and b/src/_h5ai/client/css/fonts/UbuntuMono-RI.woff differ diff --git a/src/_h5ai/client/css/inc/content.less b/src/_h5ai/client/css/inc/content.less index ddda9b97..75abee3a 100644 --- a/src/_h5ai/client/css/inc/content.less +++ b/src/_h5ai/client/css/inc/content.less @@ -17,6 +17,10 @@ color: #555; } } + + pre, code { + font-family: @font-family-mono; + } } #content-header { diff --git a/src/_h5ai/client/css/inc/delete.less b/src/_h5ai/client/css/inc/delete.less deleted file mode 100644 index 1942ce80..00000000 --- a/src/_h5ai/client/css/inc/delete.less +++ /dev/null @@ -1,10 +0,0 @@ - -#delete { - display: none; - .topbar-right; - .transition(all 0.2s ease-in-out); - - &.failed { - background-color: rgba(255,0,0,0.5); - } -} diff --git a/src/_h5ai/client/css/inc/dropbox.less b/src/_h5ai/client/css/inc/dropbox.less deleted file mode 100644 index ed8dfefa..00000000 --- a/src/_h5ai/client/css/inc/dropbox.less +++ /dev/null @@ -1,89 +0,0 @@ - -#content { - border: 1px dashed #fff; - border-radius: 8px; - .transition(border-color 0.2s ease-in-out); - - &.hint { - border-color: #ddd; - } - &.match { - border-color: #999; - } -} - - -#uploads { - width: 450px; - margin: 12px auto; - padding: 0; - list-style: none; - - .upload { - color: #555; - font-size: 0.9em; - - .name { - display: inline-block; - white-space: nowrap; - overflow: hidden; - - &:before { - display: inline-block; - content: '•'; - color: #55c; - width: 1em; - text-align: center; - padding-right: 1em; - } - } - - .size { - display: none; - float: right; - white-space: nowrap; - - &:after { - content: ' bytes' - } - } - - .error { - float: right; - white-space: nowrap; - color: #c55; - } - - .finished { - float: right; - white-space: nowrap; - color: #008200; - } - - .progress { - display: inline-block; - margin: 4px 8px; - - width: 84px; - height: 8px; - background-color: #ddd; - overflow: hidden; - float: right; - - .bar { - width: 0%; - height: 100%; - background-color: #999; - } - } - - &.finished .name:before { - content: '✔'; - color: #008200; - } - &.error .name:before { - content: '✖'; - color: #c55; - } - } -} diff --git a/src/_h5ai/client/css/inc/fallback.less b/src/_h5ai/client/css/inc/fallback.less index b779222c..bb6f4e29 100644 --- a/src/_h5ai/client/css/inc/fallback.less +++ b/src/_h5ai/client/css/inc/fallback.less @@ -37,7 +37,7 @@ } } } - td:nth-child(1), th:nth-child(1) { + .fb-i { width: 24px; img { @@ -45,16 +45,16 @@ height: 24px; } } - td:nth-child(2), th:nth-child(2) { + .fb-n { width: 682px; max-width: 682px; } - td:nth-child(3), th:nth-child(3) { + .fb-d { text-align: right; width: 160px; min-width: 160px; } - td:nth-child(4), th:nth-child(4) { + .fb-s { text-align: right; width: 70px; min-width: 70px; diff --git a/src/_h5ai/client/css/inc/filter.less b/src/_h5ai/client/css/inc/filter.less index 9040dc23..ebc23619 100644 --- a/src/_h5ai/client/css/inc/filter.less +++ b/src/_h5ai/client/css/inc/filter.less @@ -8,6 +8,7 @@ color: @col; background-color: rgba(0,0,0,0); width: 30px; + outline: none; } &.current { diff --git a/src/_h5ai/client/css/inc/fonts.less b/src/_h5ai/client/css/inc/fonts.less new file mode 100644 index 00000000..3c978207 --- /dev/null +++ b/src/_h5ai/client/css/inc/fonts.less @@ -0,0 +1,56 @@ + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 300; + src: local('Ubuntu Light'), local('Ubuntu-Light'), url(fonts/Ubuntu-L.woff) format('woff'), url(fonts/Ubuntu-L.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 700; + src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(fonts/Ubuntu-B.woff) format('woff'), url(fonts/Ubuntu-B.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: 300; + src: local('Ubuntu Light Italic'), local('Ubuntu-LightItalic'), url(fonts/Ubuntu-LI.woff) format('woff'), url(fonts/Ubuntu-LI.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: 700; + src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(fonts/Ubuntu-BI.woff) format('woff'), url(fonts/Ubuntu-BI.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu Mono'; + font-style: normal; + font-weight: 400; + src: local('Ubuntu Mono'), local('UbuntuMono-Regular'), url(fonts/UbuntuMono-R.woff) format('woff'), url(fonts/UbuntuMono-R.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu Mono'; + font-style: normal; + font-weight: 700; + src: local('Ubuntu Mono Bold'), local('UbuntuMono-Bold'), url(fonts/UbuntuMono-B.woff) format('woff'), url(fonts/UbuntuMono-B.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu Mono'; + font-style: italic; + font-weight: 400; + src: local('Ubuntu Mono Italic'), local('UbuntuMono-Italic'), url(fonts/UbuntuMono-RI.woff) format('woff'), url(fonts/UbuntuMono-RI.ttf) format('ttf'); +} + +@font-face { + font-family: 'Ubuntu Mono'; + font-style: italic; + font-weight: 700; + src: local('Ubuntu Mono Bold Italic'), local('UbuntuMono-BoldItalic'), url(fonts/Ubuntu-BI.woff) format('woff'), url(fonts/Ubuntu-BI.ttf) format('ttf'); +} diff --git a/src/_h5ai/client/css/inc/general.less b/src/_h5ai/client/css/inc/general.less index 5b34da55..00a4e0a4 100644 --- a/src/_h5ai/client/css/inc/general.less +++ b/src/_h5ai/client/css/inc/general.less @@ -21,10 +21,13 @@ @col-sb-thumb: rgba(0,0,0,0.15); @col-sb-thumb-active: rgba(0,0,0,0.25); +@col-range-back: rgb(224,224,224); +@col-range-thumb: rgb(190,190,190); + @border-widget: 1px solid @col-border; @border-widget-sep: 1px solid @col-widget-sep; -@font-family: Ubuntu, sans-serif; +@font-family: Ubuntu, Helvetica, Arial, sans-serif; @font-weight: 300; @font-family-mono: "Ubuntu Mono", monospace; @@ -47,6 +50,7 @@ html { min-height: 100%; overflow: auto; + overflow-y: scroll; &.js .noJsMsg { display: none; diff --git a/src/_h5ai/client/css/inc/h5ai-info.less b/src/_h5ai/client/css/inc/h5ai-info.less index cafce35e..d33a2f9d 100644 --- a/src/_h5ai/client/css/inc/h5ai-info.less +++ b/src/_h5ai/client/css/inc/h5ai-info.less @@ -71,7 +71,7 @@ body#h5ai-info { .test { .label { display: inline-block; - width: 350px; + width: 370px; } .result { display: inline-block; @@ -91,7 +91,7 @@ body#h5ai-info { margin: 4px 0 12px 12px; font-size: 0.7em; color: #aaa; - width: 350px; + width: 370px; line-height: 1.2em; } } diff --git a/src/_h5ai/client/css/inc/l10n.less b/src/_h5ai/client/css/inc/l10n.less index 04c0c037..e69de29b 100644 --- a/src/_h5ai/client/css/inc/l10n.less +++ b/src/_h5ai/client/css/inc/l10n.less @@ -1,54 +0,0 @@ - -#langSelector { - position: relative; - cursor: pointer; - - .langOptions { - position: absolute; - z-index: 2; - overflow: auto; - display: none; - right: 0; - top: 0; - max-height: 200px; - background-color: @col-widget-back; - border: @border-widget; - - .sp-scrollbar { - margin: 0; - width: 6px; - background-color: @col-sb-back; - cursor: pointer; - - .sp-thumb { - background-color: @col-sb-thumb; - } - &.active .sp-thumb { - background-color: @col-sb-thumb-active; - } - } - - ul { - margin: 0; - padding: 0; - list-style: none; - text-align: left; - } - - li { - padding: 8px 24px 10px 24px; - white-space: nowrap; - border-top: @border-widget-sep; - .transition(all 0.2s ease-in-out); - - &.current { - color: #333; - background-color: @col-widget-back-sel; - } - &:hover { - color: @col-hover; - background-color: @col-widget-back-hover; - } - } - } -} diff --git a/src/_h5ai/client/css/inc/preview-aud.less b/src/_h5ai/client/css/inc/preview-aud.less new file mode 100644 index 00000000..223c2c62 --- /dev/null +++ b/src/_h5ai/client/css/inc/preview-aud.less @@ -0,0 +1,9 @@ + +#pv-aud-audio { + position: absolute; + + max-width: 100%; + max-height: 100%; + + box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.3); +} diff --git a/src/_h5ai/client/css/inc/preview-vid.less b/src/_h5ai/client/css/inc/preview-vid.less new file mode 100644 index 00000000..a0c292ce --- /dev/null +++ b/src/_h5ai/client/css/inc/preview-vid.less @@ -0,0 +1,14 @@ + +#pv-vid-video { + position: absolute; + + max-width: 100%; + max-height: 100%; + + box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.3); +} + +#pv-vid-video:-webkit-full-screen { + top: auto !important; + left: auto !important; +} diff --git a/src/_h5ai/client/css/inc/preview.less b/src/_h5ai/client/css/inc/preview.less index 49f03122..2a50b9de 100644 --- a/src/_h5ai/client/css/inc/preview.less +++ b/src/_h5ai/client/css/inc/preview.less @@ -32,55 +32,43 @@ } } -#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; + margin: -36px 0; + padding: 12px; opacity: 0.5; } &:hover, &.hover { img { + background-color: rgba(27,27,27,0.8); opacity: 1; } } } #pv-prev-area { - left: 8px; + left: 0; + img { + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; + padding-left: 48px; + } } #pv-next-area { - right: 8px; + right: 0; + img { + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; + padding-right: 48px; + } } #pv-buttons { diff --git a/src/_h5ai/client/css/inc/qrcode.less b/src/_h5ai/client/css/inc/qrcode.less index f12c94b4..616e087b 100644 --- a/src/_h5ai/client/css/inc/qrcode.less +++ b/src/_h5ai/client/css/inc/qrcode.less @@ -4,7 +4,7 @@ position: fixed; right: 16px; bottom: 50px; - z-index: 1; + z-index: 10; background-color: @col-widget-back; border: @border-widget; diff --git a/src/_h5ai/client/css/inc/responsive.less b/src/_h5ai/client/css/inc/responsive.less index d83d01d2..2855c6d5 100644 --- a/src/_h5ai/client/css/inc/responsive.less +++ b/src/_h5ai/client/css/inc/responsive.less @@ -7,9 +7,6 @@ .current { display: block; } - .view span { - display: none; - } } #view.view-details { .header .label, .item .label { @@ -21,7 +18,6 @@ } #view.view-icons { padding: 0; - border: none; } #bottombar { .center { @@ -54,7 +50,7 @@ a[href]:after { position: static; margin-top: 2em; } -#tree { +#tree, #sidebar { display: none !important; } } diff --git a/src/_h5ai/client/css/inc/sidebar.less b/src/_h5ai/client/css/inc/sidebar.less new file mode 100644 index 00000000..b8803dcd --- /dev/null +++ b/src/_h5ai/client/css/inc/sidebar.less @@ -0,0 +1,125 @@ + +#sidebar { + position: fixed; + right: -220px; + width: 200px; + top: 31px; + height: 100%; + z-index: 3; + overflow: auto; + padding: 8px; + background-color: @col-widget-back; + border-left: @border-widget; +} + +#settings { + + .block { + display: block; + margin: 12px 0; + } + + a, a:active, a:visited, span.element { + color: @col; + cursor: pointer; + text-decoration: none; + opacity: 0.7; + .transition(all 0.2s ease-in-out); + + display: block; + height: 30px; + line-height: 30px; + padding: 0 10px; + + &:hover, &.hover { + opacity: 1.0; + background: @col-widget-back-highlight; + } + } + + .current { + a, span.element { + opacity: 1.0; + background: @col-widget-back-highlight; + } + } + + img { + position: relative; + top: -2px; + width: 16px; + height: 16px; + } + + .view { + display: inline-block; + margin: 0 4px 0 0; + } + + .select { + background-color: @col-widget-back-highlight; + width: 175px; + overflow: hidden; + } + + input, select { + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + font-family: @font-family; + font-size: 13px; + font-weight: @font-weight; + color: @col; + background: @col-widget-back; + width: 100%; + height: 30px; + line-height: 30px; + border: 0 solid #000; + outline: none; + cursor: pointer; + } + + select { + width: 200px; + padding: 0 4px; + } + + input[type='range'] { + border-radius: 2px; + width: 64px; + margin: 0 0 4px 12px; + padding: 0 2px; + vertical-align: middle; + } + + .range-track() { + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + border-width: 0; + border-radius: 2px; + background: @col-range-back; + height: 2px; + } + + .range-thumb() { + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + border-width: 0; + border-radius: 2px; + background: @col-range-thumb; + width: 12px; + height: 12px; + } + + input[type='range']::-webkit-slider-runnable-track { .range-track; } + input[type='range']::-moz-range-track { .range-track; } + input[type='range']::-ms-track { .range-track; } + input[type='range']::-ms-fill-lower { .range-track; } + input[type='range']::-ms-fill-upper { .range-track; } + + input[type='range']::-webkit-slider-thumb { .range-thumb; margin-top: -5px; } + input[type='range']::-moz-range-thumb { .range-thumb; } + input[type='range']::-ms-thumb { .range-thumb; } +} diff --git a/src/_h5ai/client/css/inc/tree.less b/src/_h5ai/client/css/inc/tree.less index be456672..6508bf61 100644 --- a/src/_h5ai/client/css/inc/tree.less +++ b/src/_h5ai/client/css/inc/tree.less @@ -3,7 +3,7 @@ display: none; position: fixed; left: 0; - top: 31px; + top: 31px; height: 100%; z-index: 3; overflow: auto; diff --git a/src/_h5ai/client/css/inc/view-details.less b/src/_h5ai/client/css/inc/view-details.less index c4c636a3..2568d96c 100644 --- a/src/_h5ai/client/css/inc/view-details.less +++ b/src/_h5ai/client/css/inc/view-details.less @@ -1,68 +1,4 @@ -#view.view-details { - - li { - - &.header { - display: list-item; - } - - &.item { - - a, a:active, a:visited { - border-bottom: 1px solid @item-border-col-sep; - height: @icon-size + 6px; - - &: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.square { - display: inline-block; - position: absolute; - left: 0; - top: -4px; - width: @icon-size; - - img { - width: @icon-size; - height: @icon-size; - } - } - - .label { - margin: 0 230px 0 (@icon-size + 16px); - } - - .date { - position: absolute; - right: 100px; - top: 0; - } - - .size { - position: absolute; - right: 0; - top: 0; - } - - .selector { - margin-top: -1px; - } - } -} - - .view-details-sized(@size) { li { @@ -95,6 +31,55 @@ #view.view-details { + + li { + + &.header { + display: list-item; + } + + &.item { + + a, a:active, a:visited { + border-bottom: 1px solid @item-border-col-sep; + + &:hover, &.hover { + border-color: @item-border-col-hover; + } + } + + // needs to be here, to not conflict with header fields + .icon { + padding: 8px; + } + } + + .icon.square { + display: inline-block; + position: absolute; + left: 0; + top: -4px; + } + + .date { + position: absolute; + right: 100px; + top: 0; + } + + .size { + position: absolute; + right: 0; + top: 0; + } + + .selector { + margin-top: -1px; + } + } + + .view-details-sized(@icon-size); + &.size-16 { .view-details-sized(16px) } @@ -118,4 +103,20 @@ &.size-96 { .view-details-sized(96px) } + + &.size-128 { + .view-details-sized(128px) + } + + &.size-192 { + .view-details-sized(192px) + } + + &.size-256 { + .view-details-sized(256px) + } + + &.size-384 { + .view-details-sized(384px) + } } diff --git a/src/_h5ai/client/css/inc/view-grid.less b/src/_h5ai/client/css/inc/view-grid.less index 9cb71c0b..e4437cf0 100644 --- a/src/_h5ai/client/css/inc/view-grid.less +++ b/src/_h5ai/client/css/inc/view-grid.less @@ -1,56 +1,4 @@ -#view.view-grid { - - li { - - &.item { - float: left; - margin: 2px; - - a, a:active, a:visited { - 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.square { - display: inline-block; - position: absolute; - left: 0; - top: -4px; - width: @icon-size; - - img { - width: @icon-size; - height: @icon-size; - } - } - - .label { - display: block; - margin: 0 0 0 (@icon-size + 8px); - } - - .date, .size { - display: none; - } - } -} - - .view-grid-sized(@size) { li { @@ -84,6 +32,45 @@ #view.view-grid { + + li { + + &.item { + float: left; + margin: 2px; + + a, a:active, a:visited { + 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; + } + } + + .icon.square { + display: inline-block; + position: absolute; + left: 0; + top: -4px; + } + + .label { + display: block; + } + + .date, .size { + display: none; + } + } + + .view-grid-sized(@icon-size); + &.size-16 { .view-grid-sized(16px) } @@ -107,4 +94,20 @@ &.size-96 { .view-grid-sized(96px) } + + &.size-128 { + .view-grid-sized(128px) + } + + &.size-192 { + .view-grid-sized(192px) + } + + &.size-256 { + .view-grid-sized(256px) + } + + &.size-384 { + .view-grid-sized(384px) + } } diff --git a/src/_h5ai/client/css/inc/view-icons.less b/src/_h5ai/client/css/inc/view-icons.less index ecbab927..d01dda80 100644 --- a/src/_h5ai/client/css/inc/view-icons.less +++ b/src/_h5ai/client/css/inc/view-icons.less @@ -1,4 +1,34 @@ +.view-icons-sized(@size) { + + li { + + &.item { + + a, a:active, a:visited { + width: @size * 2; + height: @size + 72px; + } + } + + .icon.rational { + height: @size; + + img { + width: @size; + height: @size; + } + img.thumb { + width: auto; + height: auto; + max-width: @size * 2; + max-height: @size; + } + } + } +} + + #view.view-icons { li { @@ -11,8 +41,6 @@ a, a:active, a:visited { padding: 8px; min-width: 96px; - width: @icon-size * 2; - height: @icon-size + 72px; border: 1px solid rgba(0,0,0,0); &:hover, &.hover { @@ -23,13 +51,7 @@ .icon.rational { display: block; - height: @icon-size; margin-bottom: 6px; - - img { - max-width: @icon-size * 2; - max-height: @icon-size; - } } .label { @@ -48,55 +70,46 @@ padding: 16px; height: 120px; } -} + .view-icons-sized(@icon-size); -.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) + .view-icons-sized(16px); } &.size-24 { - .view-icons-sized(24px) + .view-icons-sized(24px); } &.size-32 { - .view-icons-sized(32px) + .view-icons-sized(32px); } &.size-48 { - .view-icons-sized(48px) + .view-icons-sized(48px); } &.size-64 { - .view-icons-sized(64px) + .view-icons-sized(64px); } &.size-96 { - .view-icons-sized(96px) + .view-icons-sized(96px); + } + + &.size-128 { + .view-icons-sized(128px); + } + + &.size-192 { + .view-icons-sized(192px); + } + + &.size-256 { + .view-icons-sized(256px); + } + + &.size-384 { + .view-icons-sized(384px); } } diff --git a/src/_h5ai/client/css/inc/view.less b/src/_h5ai/client/css/inc/view.less index 39edaa8a..8c84742e 100644 --- a/src/_h5ai/client/css/inc/view.less +++ b/src/_h5ai/client/css/inc/view.less @@ -115,23 +115,6 @@ } } - &.error { - - a, a:active, a:visited { - color: #aaa; - - &:hover, &.hover { - color: @col-hover; - } - } - - .label .hint { - padding: 0 6px; - font-size: 0.9em; - color: #c55; - } - } - &.folder-parent { .date, .size { @@ -145,9 +128,16 @@ img { vertical-align: top; + } - &.thumb { - box-shadow: 0 0 0 1px #ddd; + .thumb { + box-shadow: 0 0 0 1px rgba(0,0,0,0.12); + } + + &.rational { + .thumb { + padding: 2px; + border-radius: 3px; } } } diff --git a/src/_h5ai/client/css/lib/h5bp-main-header.less b/src/_h5ai/client/css/lib/h5bp-main-header.less index 8e4439ab..804835e0 100644 --- a/src/_h5ai/client/css/lib/h5bp-main-header.less +++ b/src/_h5ai/client/css/lib/h5bp-main-header.less @@ -1,6 +1,6 @@ +/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */ + /* - * HTML5 Boilerplate - * * What follows is the result of much research on cross-browser styling. * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, * Kroc Camen, and the H5BP dev community and team. @@ -53,10 +53,14 @@ hr { } /* - * Remove the gap between images and the bottom of their containers: h5bp.com/i/440 + * Remove the gap between images, videos, audio and canvas and the bottom of + * their containers: h5bp.com/i/440 */ -img { +audio, +canvas, +img, +video { vertical-align: middle; } @@ -78,17 +82,6 @@ textarea { resize: vertical; } -/* ========================================================================== - Chrome Frame prompt - ========================================================================== */ - -.chromeframe { - margin: 0.2em 0; - background: #ccc; - color: #000; - padding: 0.2em 0; -} - /* ========================================================================== Author's custom styles ========================================================================== */ diff --git a/src/_h5ai/client/css/lib/h5bp-normalize.less b/src/_h5ai/client/css/lib/h5bp-normalize.less index 8d57e3c9..42e24d68 100644 --- a/src/_h5ai/client/css/lib/h5bp-normalize.less +++ b/src/_h5ai/client/css/lib/h5bp-normalize.less @@ -1,4 +1,4 @@ -/*! normalize.css v1.1.1 | MIT License | git.io/normalize */ +/*! normalize.css v1.1.3 | MIT License | git.io/normalize */ /* ========================================================================== HTML5 display definitions @@ -59,22 +59,16 @@ audio:not([controls]) { ========================================================================== */ /** - * 1. Prevent system color scheme's background color being used in Firefox, IE, - * and Opera. - * 2. Prevent system color scheme's text color being used in Firefox, IE, and - * Opera. - * 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using + * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using * `em` units. - * 4. Prevent iOS text size adjust after orientation change, without disabling + * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ html { - background: #fff; /* 1 */ - color: #000; /* 2 */ - font-size: 100%; /* 3 */ - -webkit-text-size-adjust: 100%; /* 4 */ - -ms-text-size-adjust: 100%; /* 4 */ + font-size: 100%; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ } /** diff --git a/src/_h5ai/client/css/styles.less b/src/_h5ai/client/css/styles.less index b2fba482..16ddb183 100644 --- a/src/_h5ai/client/css/styles.less +++ b/src/_h5ai/client/css/styles.less @@ -2,18 +2,20 @@ @import "lib/h5bp-normalize"; @import "lib/h5bp-main-header"; +@import "inc/fonts"; @import "inc/general"; @import "inc/topbar"; @import "inc/bottombar"; +@import "inc/sidebar"; @import "inc/download"; -@import "inc/delete"; @import "inc/filter"; -@import "inc/l10n"; @import "inc/tree"; @import "inc/qrcode"; @import "inc/preview"; +@import "inc/preview-aud"; @import "inc/preview-img"; @import "inc/preview-txt"; +@import "inc/preview-vid"; @import "inc/notify"; @import "inc/content"; @@ -22,7 +24,6 @@ @import "inc/view-icons"; @import "inc/view-grid"; // @import "inc/context-menu"; -@import "inc/dropbox"; @import "inc/fallback"; @import "inc/responsive"; diff --git a/src/_h5ai/client/icons/96/blank.png b/src/_h5ai/client/icons/96/blank.png deleted file mode 100644 index 3418e3e2..00000000 Binary files a/src/_h5ai/client/icons/96/blank.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/cue.png b/src/_h5ai/client/icons/96/cue.png deleted file mode 100644 index e2aa2000..00000000 Binary files a/src/_h5ai/client/icons/96/cue.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/dia.png b/src/_h5ai/client/icons/96/dia.png deleted file mode 100644 index ea41ca8b..00000000 Binary files a/src/_h5ai/client/icons/96/dia.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/encrypted.png b/src/_h5ai/client/icons/96/encrypted.png deleted file mode 100644 index 7325b5d4..00000000 Binary files a/src/_h5ai/client/icons/96/encrypted.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/folder-page.png b/src/_h5ai/client/icons/96/folder-page.png deleted file mode 100644 index 5af90f7b..00000000 Binary files a/src/_h5ai/client/icons/96/folder-page.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/folder-parent.png b/src/_h5ai/client/icons/96/folder-parent.png deleted file mode 100644 index f47cc6e0..00000000 Binary files a/src/_h5ai/client/icons/96/folder-parent.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/glade.png b/src/_h5ai/client/icons/96/glade.png deleted file mode 100644 index b5f2467e..00000000 Binary files a/src/_h5ai/client/icons/96/glade.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/message.png b/src/_h5ai/client/icons/96/message.png deleted file mode 100644 index 5ee14d95..00000000 Binary files a/src/_h5ai/client/icons/96/message.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/package.png b/src/_h5ai/client/icons/96/package.png deleted file mode 100644 index d75909d3..00000000 Binary files a/src/_h5ai/client/icons/96/package.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/sql.png b/src/_h5ai/client/icons/96/sql.png deleted file mode 100644 index e897b242..00000000 Binary files a/src/_h5ai/client/icons/96/sql.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/tex-bib.png b/src/_h5ai/client/icons/96/tex-bib.png deleted file mode 100644 index 22ca5e7b..00000000 Binary files a/src/_h5ai/client/icons/96/tex-bib.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/theme.png b/src/_h5ai/client/icons/96/theme.png deleted file mode 100644 index dd0d6386..00000000 Binary files a/src/_h5ai/client/icons/96/theme.png and /dev/null differ diff --git a/src/_h5ai/client/icons/96/xhtml.png b/src/_h5ai/client/icons/96/xhtml.png deleted file mode 100644 index 27cc3369..00000000 Binary files a/src/_h5ai/client/icons/96/xhtml.png and /dev/null differ diff --git a/src/_h5ai/client/icons/scalable/folder-page.svg b/src/_h5ai/client/icons/scalable/folder-page.svg deleted file mode 100644 index 0381df9b..00000000 --- a/src/_h5ai/client/icons/scalable/folder-page.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - Gnome Symbolic Icon Theme - - diff --git a/src/_h5ai/client/icons/scalable/folder-parent.svg b/src/_h5ai/client/icons/scalable/folder-parent.svg deleted file mode 100644 index 06566450..00000000 --- a/src/_h5ai/client/icons/scalable/folder-parent.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - Gnome Symbolic Icon Theme - - diff --git a/src/_h5ai/client/icons/scalable/folder.svg b/src/_h5ai/client/icons/scalable/folder.svg deleted file mode 100644 index 3104365f..00000000 --- a/src/_h5ai/client/icons/scalable/folder.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - Gnome Symbolic Icon Theme - - diff --git a/src/_h5ai/client/images/app-114x114.png b/src/_h5ai/client/images/app-114x114.png deleted file mode 100644 index 6de58eaa..00000000 Binary files a/src/_h5ai/client/images/app-114x114.png and /dev/null differ diff --git a/src/_h5ai/client/images/app-144x144.png b/src/_h5ai/client/images/app-144x144.png deleted file mode 100644 index ecd9a74f..00000000 Binary files a/src/_h5ai/client/images/app-144x144.png and /dev/null differ diff --git a/src/_h5ai/client/images/app-16x16.ico b/src/_h5ai/client/images/app-16x16.ico deleted file mode 100644 index 63ead9eb..00000000 Binary files a/src/_h5ai/client/images/app-16x16.ico and /dev/null differ diff --git a/src/_h5ai/client/images/app-48x48.png b/src/_h5ai/client/images/app-48x48.png deleted file mode 100644 index bf477170..00000000 Binary files a/src/_h5ai/client/images/app-48x48.png and /dev/null differ diff --git a/src/_h5ai/client/images/app-57x57.png b/src/_h5ai/client/images/app-57x57.png deleted file mode 100644 index bd9fd698..00000000 Binary files a/src/_h5ai/client/images/app-57x57.png and /dev/null differ diff --git a/src/_h5ai/client/images/app-72x72.png b/src/_h5ai/client/images/app-72x72.png deleted file mode 100644 index 1e893f8b..00000000 Binary files a/src/_h5ai/client/images/app-72x72.png and /dev/null differ diff --git a/src/_h5ai/client/images/app.svg b/src/_h5ai/client/images/app.svg deleted file mode 100644 index f9f62db9..00000000 --- a/src/_h5ai/client/images/app.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - Gnome Symbolic Icon Theme - - diff --git a/src/_h5ai/client/images/ascending.svg b/src/_h5ai/client/images/ascending.svg index 472e31b6..eaae6376 100644 --- a/src/_h5ai/client/images/ascending.svg +++ b/src/_h5ai/client/images/ascending.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/blank.svg b/src/_h5ai/client/images/blank.svg deleted file mode 100644 index e0423172..00000000 --- a/src/_h5ai/client/images/blank.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - Gnome Symbolic Icon Theme - diff --git a/src/_h5ai/client/images/crumb.svg b/src/_h5ai/client/images/crumb.svg index 662db546..a6cdabde 100644 --- a/src/_h5ai/client/images/crumb.svg +++ b/src/_h5ai/client/images/crumb.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/delete.svg b/src/_h5ai/client/images/delete.svg deleted file mode 100644 index 4cc729ef..00000000 --- a/src/_h5ai/client/images/delete.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - Gnome Symbolic Icon Theme - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - diff --git a/src/_h5ai/client/images/descending.svg b/src/_h5ai/client/images/descending.svg index c99a358f..d4dbbda2 100644 --- a/src/_h5ai/client/images/descending.svg +++ b/src/_h5ai/client/images/descending.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/download.svg b/src/_h5ai/client/images/download.svg index 0db1eaac..ce60b12d 100644 --- a/src/_h5ai/client/images/download.svg +++ b/src/_h5ai/client/images/download.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/fallback/ar.svg b/src/_h5ai/client/images/fallback/ar.svg new file mode 100644 index 00000000..1e1d262b --- /dev/null +++ b/src/_h5ai/client/images/fallback/ar.svg @@ -0,0 +1,26 @@ + + + + + + + diff --git a/src/_h5ai/client/images/fallback/aud.svg b/src/_h5ai/client/images/fallback/aud.svg new file mode 100644 index 00000000..924543fe --- /dev/null +++ b/src/_h5ai/client/images/fallback/aud.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + diff --git a/src/_h5ai/client/images/fallback/bin.svg b/src/_h5ai/client/images/fallback/bin.svg new file mode 100644 index 00000000..9b9d296f --- /dev/null +++ b/src/_h5ai/client/images/fallback/bin.svg @@ -0,0 +1,26 @@ + + + + + + + diff --git a/src/_h5ai/client/images/fallback/file.png b/src/_h5ai/client/images/fallback/file.png new file mode 100644 index 00000000..f44acd91 Binary files /dev/null and b/src/_h5ai/client/images/fallback/file.png differ diff --git a/src/_h5ai/client/images/fallback/file.svg b/src/_h5ai/client/images/fallback/file.svg new file mode 100644 index 00000000..28e40305 --- /dev/null +++ b/src/_h5ai/client/images/fallback/file.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/src/_h5ai/client/images/fallback/folder-page.svg b/src/_h5ai/client/images/fallback/folder-page.svg new file mode 100644 index 00000000..9f88dc24 --- /dev/null +++ b/src/_h5ai/client/images/fallback/folder-page.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/src/_h5ai/client/images/fallback/folder-parent.png b/src/_h5ai/client/images/fallback/folder-parent.png new file mode 100644 index 00000000..dcc3e4dd Binary files /dev/null and b/src/_h5ai/client/images/fallback/folder-parent.png differ diff --git a/src/_h5ai/client/images/fallback/folder-parent.svg b/src/_h5ai/client/images/fallback/folder-parent.svg new file mode 100644 index 00000000..7af53831 --- /dev/null +++ b/src/_h5ai/client/images/fallback/folder-parent.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/_h5ai/client/icons/96/folder.png b/src/_h5ai/client/images/fallback/folder.png similarity index 100% rename from src/_h5ai/client/icons/96/folder.png rename to src/_h5ai/client/images/fallback/folder.png diff --git a/src/_h5ai/client/images/fallback/folder.svg b/src/_h5ai/client/images/fallback/folder.svg new file mode 100644 index 00000000..88a4d2c3 --- /dev/null +++ b/src/_h5ai/client/images/fallback/folder.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/src/_h5ai/client/images/fallback/img.svg b/src/_h5ai/client/images/fallback/img.svg new file mode 100644 index 00000000..daa80054 --- /dev/null +++ b/src/_h5ai/client/images/fallback/img.svg @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/src/_h5ai/client/images/fallback/txt.svg b/src/_h5ai/client/images/fallback/txt.svg new file mode 100644 index 00000000..cc6a3ed1 --- /dev/null +++ b/src/_h5ai/client/images/fallback/txt.svg @@ -0,0 +1,40 @@ + + + + + + + + + diff --git a/src/_h5ai/client/images/fallback/vid.svg b/src/_h5ai/client/images/fallback/vid.svg new file mode 100644 index 00000000..46d52476 --- /dev/null +++ b/src/_h5ai/client/images/fallback/vid.svg @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/_h5ai/client/images/favicon/favicon-152.png b/src/_h5ai/client/images/favicon/favicon-152.png new file mode 100644 index 00000000..3f8e9fa5 Binary files /dev/null and b/src/_h5ai/client/images/favicon/favicon-152.png differ diff --git a/src/_h5ai/client/images/favicon/favicon-16-32.ico b/src/_h5ai/client/images/favicon/favicon-16-32.ico new file mode 100644 index 00000000..5c6e9412 Binary files /dev/null and b/src/_h5ai/client/images/favicon/favicon-16-32.ico differ diff --git a/src/_h5ai/client/images/filter.svg b/src/_h5ai/client/images/filter.svg index 2f6ae6bb..f4f12a50 100644 --- a/src/_h5ai/client/images/filter.svg +++ b/src/_h5ai/client/images/filter.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/folder-open.svg b/src/_h5ai/client/images/folder-open.svg index 482e6d6b..136c3ebd 100644 --- a/src/_h5ai/client/images/folder-open.svg +++ b/src/_h5ai/client/images/folder-open.svg @@ -10,8 +10,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg7384" - height="16" - width="16" + height="16" width="16" viewBox="0 0 16 16" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="folder-open.svg"> diff --git a/src/_h5ai/client/images/folder-page.svg b/src/_h5ai/client/images/folder-page.svg index c5c41777..76fc109b 100644 --- a/src/_h5ai/client/images/folder-page.svg +++ b/src/_h5ai/client/images/folder-page.svg @@ -10,8 +10,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg7384" - height="16" - width="16" + height="16" width="16" viewBox="0 0 16 16" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="folder-page.svg"> diff --git a/src/_h5ai/client/images/folder.svg b/src/_h5ai/client/images/folder.svg index f9f62db9..bb2d14fa 100644 --- a/src/_h5ai/client/images/folder.svg +++ b/src/_h5ai/client/images/folder.svg @@ -10,8 +10,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg7384" - height="16" - width="16" + height="16" width="16" viewBox="0 0 16 16" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="folder.svg"> diff --git a/src/_h5ai/client/images/home.svg b/src/_h5ai/client/images/home.svg index 0ef4276a..55963b7f 100644 --- a/src/_h5ai/client/images/home.svg +++ b/src/_h5ai/client/images/home.svg @@ -10,8 +10,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg7384" - height="16" - width="16" + height="16" width="16" viewBox="0 0 16 16" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="home.svg"> diff --git a/src/_h5ai/client/images/loading.svg b/src/_h5ai/client/images/loading.svg index 50f18365..c8b53b38 100644 --- a/src/_h5ai/client/images/loading.svg +++ b/src/_h5ai/client/images/loading.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/page.svg b/src/_h5ai/client/images/page.svg index 20a2724f..bfabda4d 100644 --- a/src/_h5ai/client/images/page.svg +++ b/src/_h5ai/client/images/page.svg @@ -1,17 +1,19 @@ - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - Gnome Symbolic Icon Theme - - - + + + + diff --git a/src/_h5ai/client/images/preview/close.svg b/src/_h5ai/client/images/preview/close.svg index c73fcf93..0d27c9ad 100644 --- a/src/_h5ai/client/images/preview/close.svg +++ b/src/_h5ai/client/images/preview/close.svg @@ -1,6 +1,6 @@ - + Gnome Symbolic Icon Theme diff --git a/src/_h5ai/client/images/preview/fullscreen.svg b/src/_h5ai/client/images/preview/fullscreen.svg index 539c3f5e..1b03868c 100644 --- a/src/_h5ai/client/images/preview/fullscreen.svg +++ b/src/_h5ai/client/images/preview/fullscreen.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/preview/next.svg b/src/_h5ai/client/images/preview/next.svg index cb16e28f..1ad024fb 100644 --- a/src/_h5ai/client/images/preview/next.svg +++ b/src/_h5ai/client/images/preview/next.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/preview/no-fullscreen.svg b/src/_h5ai/client/images/preview/no-fullscreen.svg index 03b7e73d..d45e5e17 100644 --- a/src/_h5ai/client/images/preview/no-fullscreen.svg +++ b/src/_h5ai/client/images/preview/no-fullscreen.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/preview/prev.svg b/src/_h5ai/client/images/preview/prev.svg index 9d982b94..684268a8 100644 --- a/src/_h5ai/client/images/preview/prev.svg +++ b/src/_h5ai/client/images/preview/prev.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/preview/raw.svg b/src/_h5ai/client/images/preview/raw.svg index 22d5be55..ebaf9431 100644 --- a/src/_h5ai/client/images/preview/raw.svg +++ b/src/_h5ai/client/images/preview/raw.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/selected.svg b/src/_h5ai/client/images/selected.svg index 84a8c603..34a4c9b5 100644 --- a/src/_h5ai/client/images/selected.svg +++ b/src/_h5ai/client/images/selected.svg @@ -8,8 +8,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" - height="16" - width="16" + height="16" width="16" viewBox="0 0 16 16" id="svg2" inkscape:version="0.48.4 r9939" sodipodi:docname="select.svg"> diff --git a/src/_h5ai/client/images/settings.svg b/src/_h5ai/client/images/settings.svg index f606f30c..cbdeb2a9 100644 --- a/src/_h5ai/client/images/settings.svg +++ b/src/_h5ai/client/images/settings.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/size.svg b/src/_h5ai/client/images/size.svg index 4d2b849b..650588b6 100644 --- a/src/_h5ai/client/images/size.svg +++ b/src/_h5ai/client/images/size.svg @@ -10,11 +10,10 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" sodipodi:docname="size.svg" - height="16" + height="16" width="16" viewBox="0 0 16 16" id="svg7384" inkscape:version="0.48.4 r9939" - version="1.1" - width="16"> + version="1.1"> diff --git a/src/_h5ai/client/images/tree.svg b/src/_h5ai/client/images/tree.svg index 662db546..a6cdabde 100644 --- a/src/_h5ai/client/images/tree.svg +++ b/src/_h5ai/client/images/tree.svg @@ -1,6 +1,6 @@ - + diff --git a/src/_h5ai/client/images/view-details.svg b/src/_h5ai/client/images/view-details.svg index bd48a609..902c08eb 100644 --- a/src/_h5ai/client/images/view-details.svg +++ b/src/_h5ai/client/images/view-details.svg @@ -5,6 +5,7 @@ version="1.1" width="16" height="16" + viewBox="0 0 16 16" > diff --git a/src/_h5ai/client/images/view-grid.svg b/src/_h5ai/client/images/view-grid.svg index 0e5c11be..f3594479 100644 --- a/src/_h5ai/client/images/view-grid.svg +++ b/src/_h5ai/client/images/view-grid.svg @@ -5,6 +5,7 @@ version="1.1" width="16" height="16" + viewBox="0 0 16 16" > diff --git a/src/_h5ai/client/images/view-icons.svg b/src/_h5ai/client/images/view-icons.svg index dbea6106..ec0a71f9 100644 --- a/src/_h5ai/client/images/view-icons.svg +++ b/src/_h5ai/client/images/view-icons.svg @@ -5,6 +5,7 @@ version="1.1" width="16" height="16" + viewBox="0 0 16 16" > diff --git a/src/_h5ai/client/js/inc/core/location.js b/src/_h5ai/client/js/inc/core/location.js index 0a62f8c7..7dc133ed 100644 --- a/src/_h5ai/client/js/inc/core/location.js +++ b/src/_h5ai/client/js/inc/core/location.js @@ -3,7 +3,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event var settings = _.extend({ smartBrowsing: true, - extInNewWindow: true + unmanagedInNewWindow: true }, allsettings.view), doc = document, @@ -14,14 +14,26 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event return href .replace(/\/+/g, '/') + .replace(/ /g, '%20') + .replace(/!/g, '%21') + .replace(/#/g, '%23') + .replace(/\$/g, '%24') + .replace(/&/g, '%26') .replace(/'/g, '%27') - .replace(/\[/g, '%5B') - .replace(/\]/g, '%5D') .replace(/\(/g, '%28') .replace(/\)/g, '%29') + .replace(/\*/g, '%2A') .replace(/\+/g, '%2B') - .replace(/\=/g, '%3D'); + .replace(/\,/g, '%2C') + // .replace(/\//g, '%2F') + .replace(/:/g, '%3A') + .replace(/;/g, '%3B') + .replace(/=/g, '%3D') + .replace(/\?/g, '%3F') + .replace(/@/g, '%40') + .replace(/\[/g, '%5B') + .replace(/\]/g, '%5D'); }, reUriToPathname = /^.*:\/\/[^\/]*|[^\/]*$/g, @@ -85,7 +97,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event _.each(json.items, function (jsonItem) { - var e = Item.get(jsonItem.absHref, jsonItem.time, jsonItem.size, jsonItem.status, jsonItem.content); + var e = Item.get(jsonItem.absHref, jsonItem.time, jsonItem.size, jsonItem.is_managed, jsonItem.content, jsonItem.md5, jsonItem.sha1); found[e.absHref] = true; }); @@ -155,7 +167,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event $el.attr('href', item.absHref); - if (history && item.isFolder() && item.status === '=h5ai=') { + if (history && item.isFolder() && item.isManaged) { $el.on('click', function () { setLocation(item.absHref); @@ -163,7 +175,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event }); } - if (settings.extInNewWindow && item.status !== '=h5ai=') { + if (settings.unmanagedInNewWindow && !item.isManaged) { $el.attr('target', '_blank'); } }; diff --git a/src/_h5ai/client/js/inc/core/resource.js b/src/_h5ai/client/js/inc/core/resource.js index 152dc6de..68d1b1f5 100644 --- a/src/_h5ai/client/js/inc/core/resource.js +++ b/src/_h5ai/client/js/inc/core/resource.js @@ -1,18 +1,68 @@ -modulejs.define('core/resource', ['core/settings'], function (settings) { +modulejs.define('core/resource', ['_', '$', 'config', 'core/settings'], function (_, $, config, settings) { - var image = function (id) { + var win = window, + appHref = settings.appHref, + imagesHref = appHref + 'client/images/', + fallbackHref = appHref + 'client/images/fallback/', + themesHref = appHref + 'client/themes/', + scriptsHref = appHref + 'client/js/', + fallbacks = ['file', 'folder', 'folder-page', 'folder-parent', 'ar', 'aud', 'bin', 'img', 'txt', 'vid'], - return settings.h5aiAbsHref + 'client/images/' + id + '.svg'; + image = function (id) { + + return imagesHref + id + '.svg'; }, icon = function (id) { - return settings.h5aiAbsHref + 'client/icons/96/' + id + '.png'; + var baseId = id.split('-')[0], + href = config.theme[id] || config.theme[baseId]; + + if (href) { + return themesHref + href; + } + + if (_.indexOf(fallbacks, id) >= 0) { + return fallbackHref + id + '.svg'; + } + + if (_.indexOf(fallbacks, baseId) >= 0) { + return fallbackHref + baseId + '.svg'; + } + + return fallbackHref + 'file.svg'; + }, + + loadScript = function (filename, callback) { + + $.ajax({ + url: scriptsHref + filename, + dataType: 'script' + }).done(function () { + + callback(); + }); + }, + + loadScriptGlob = function (filename, globalId, callback) { + + if (win[globalId]) { + callback(win[globalId]); + } else { + loadScript(filename, function () { callback(win[globalId]); }); + } + }, + + ensureSH = function (callback) { + + loadScriptGlob('syntaxhighlighter.js', 'SyntaxHighlighter', callback); }; + return { image: image, - icon: icon + icon: icon, + ensureSH: ensureSH }; }); diff --git a/src/_h5ai/client/js/inc/core/server.js b/src/_h5ai/client/js/inc/core/server.js index 528c943c..becc9b96 100644 --- a/src/_h5ai/client/js/inc/core/server.js +++ b/src/_h5ai/client/js/inc/core/server.js @@ -1,46 +1,53 @@ modulejs.define('core/server', ['$', '_', 'config', 'core/location'], function ($, _, config, location) { - var server = _.extend({}, config.server, { + var server = { - request: function (data, callback) { + backend: config.setup.BACKEND, + api: config.setup.API === true, + name: config.setup.SERVER_NAME, + version: config.setup.SERVER_VERSION, - if (server.api) { - $.ajax({ - url: location.getAbsHref(), - data: data, - type: 'POST', - dataType: 'json', - success: function (json) { + request: function (data, callback) { - callback(json); - }, - error: function () { + if (server.api) { + $.ajax({ + url: location.getAbsHref(), + data: data, + type: 'POST', + dataType: 'json' + }) + .done(function (json) { - callback(); - } - }); - } else { - callback(); + callback(json); + }) + .fail(function () { + + callback(); + }); + } else { + callback(); + } + }, + + formRequest: function (data) { + + if (server.api) { + var $form = $('
') + .attr('action', location.getAbsHref()); + + _.each(data, function (val, key) { + + $('') + .attr('name', key) + .attr('value', val) + .appendTo($form); + }); + + $form.appendTo('body').submit().remove(); + } } - }, - - formRequest: function (data) { - - var $form = $('
') - .attr('action', location.getAbsHref()); - - _.each(data, function (val, key) { - - $('') - .attr('name', key) - .attr('value', val) - .appendTo($form); - }); - - $form.appendTo('body').submit().remove(); - } - }); + }; return server; }); diff --git a/src/_h5ai/client/js/inc/core/settings.js b/src/_h5ai/client/js/inc/core/settings.js index 03112e74..59b9f4b1 100644 --- a/src/_h5ai/client/js/inc/core/settings.js +++ b/src/_h5ai/client/js/inc/core/settings.js @@ -1,17 +1,9 @@ -modulejs.define('core/settings', ['config', '_', '$'], function (config, _, $) { +modulejs.define('core/settings', ['config', '_'], function (config, _) { - var filename = 'client/js/scripts.js', - src = $('script[src$="' + filename + '"]').attr('src'), - appHref = src.substr(0, src.length - filename.length), - - h5aiAbsHref = src.substr(0, src.length - filename.length).replace(/\/*$/, '/'), - rootAbsHref = /^(.*\/)[^\/]+\/?$/.exec(h5aiAbsHref)[1], - - settings = _.extend({}, config.options, { - h5aiAbsHref: h5aiAbsHref, - rootAbsHref: rootAbsHref - }); - - return settings; + return _.extend({}, config.options, { + appHref: config.setup.APP_HREF, + rootHref: config.setup.ROOT_HREF, + currentHref: config.setup.CURRENT_HREF + }); }); diff --git a/src/_h5ai/client/js/inc/core/types.js b/src/_h5ai/client/js/inc/core/types.js index f02f9dae..b4d765e7 100644 --- a/src/_h5ai/client/js/inc/core/types.js +++ b/src/_h5ai/client/js/inc/core/types.js @@ -2,25 +2,20 @@ modulejs.define('core/types', ['config', '_'], function (config, _) { var reEndsWithSlash = /\/$/, - reStartsWithDot = /^\./, + regexps = {}, - fileExts = {}, - fileNames = {}, + escapeRegExp = function (sequence) { + + return sequence.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$]/g, "\\$&"); + // return sequence.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, parse = function (types) { - _.each(types, function (matches, type) { + _.each(types, function (patterns, type) { - _.each(matches, function (match) { - - match = match.toLowerCase(); - - if (reStartsWithDot.test(match)) { - fileExts[match] = type; - } else { - fileNames[match] = type; - } - }); + var pattern = '^' + _.map(patterns, function (p) { return escapeRegExp(p).replace(/\*/g, '.*'); }).join('|') + '$'; + regexps[type] = new RegExp(pattern, 'i'); }); }, @@ -30,14 +25,18 @@ modulejs.define('core/types', ['config', '_'], function (config, _) { return 'folder'; } - sequence = sequence.toLowerCase(); - var slashidx = sequence.lastIndexOf('/'), - name = slashidx >= 0 ? sequence.substr(slashidx + 1) : sequence, - dotidx = sequence.lastIndexOf('.'), - ext = dotidx >= 0 ? sequence.substr(dotidx) : sequence; + name = slashidx >= 0 ? sequence.substr(slashidx + 1) : sequence; - return fileNames[name] || fileExts[ext] || 'unknown'; + for (var type in regexps) { + if (regexps.hasOwnProperty(type)) { + if (regexps[type].test(name)) { + return type; + } + } + } + + return 'file'; }; parse(_.extend({}, config.types)); diff --git a/src/_h5ai/client/js/inc/ext/crumb.js b/src/_h5ai/client/js/inc/ext/crumb.js index 028a799b..86f0ef5a 100644 --- a/src/_h5ai/client/js/inc/ext/crumb.js +++ b/src/_h5ai/client/js/inc/ext/crumb.js @@ -44,12 +44,8 @@ modulejs.define('ext/crumb', ['_', '$', 'core/settings', 'core/resource', 'core/ $html.addClass('current'); } - if (_.isNumber(item.status)) { - if (item.status === 200) { - $a.append($(pageHintTemplate)); - } else { - $a.append($(statusHintTemplate).text('(' + item.status + ')')); - } + if (!item.isManaged) { + $a.append($(pageHintTemplate)); } if (item.$crumb) { diff --git a/src/_h5ai/client/js/inc/ext/custom.js b/src/_h5ai/client/js/inc/ext/custom.js index e2cc27a2..c4f60dc2 100644 --- a/src/_h5ai/client/js/inc/ext/custom.js +++ b/src/_h5ai/client/js/inc/ext/custom.js @@ -1,30 +1,46 @@ -modulejs.define('ext/custom', ['_', '$', 'core/settings', 'core/server', 'core/event'], function (_, $, allsettings, server, event) { +modulejs.define('ext/custom', ['_', '$', 'markdown', 'core/settings', 'core/server', 'core/event', 'core/resource'], function (_, $, markdown, allsettings, server, event, resource) { var settings = _.extend({ enabled: false }, allsettings.custom), - onLocationChanged = function () { + $header, $footer, + duration = 200, - server.request({action: 'get', custom: true}, function (response) { + onLocationChanged = function (item) { + + server.request({action: 'get', custom: true, customHref: item.absHref}, function (response) { + + var has_header, has_footer, data, content; - var h, f; if (response) { - if (response.custom.header) { - $('#content-header').html(response.custom.header).stop().slideDown(200); - h = true; + data = response.custom; + + if (data.header) { + content = data.header; + if (data.header_type === 'md') { + content = markdown.toHTML(content); + } + $header.html(content).stop().slideDown(duration); + has_header = true; } - if (response.custom.footer) { - $('#content-footer').html(response.custom.footer).stop().slideDown(200); - f = true; + + if (data.footer) { + content = data.footer; + if (data.footer_type === 'md') { + content = markdown.toHTML(content); + } + $footer.html(content).stop().slideDown(duration); + has_footer = true; } } - if (!h) { - $('#content-header').stop().slideUp(200); + + if (!has_header) { + $header.stop().slideUp(duration); } - if (!f) { - $('#content-footer').stop().slideUp(200); + if (!has_footer) { + $footer.stop().slideUp(duration); } }); }, @@ -35,8 +51,8 @@ modulejs.define('ext/custom', ['_', '$', 'core/settings', 'core/server', 'core/e return; } - $('
').hide().prependTo('#content'); - $('