diff --git a/README.md b/README.md index 05b54482..f1e8fe96 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h ### v0.18 - *2012-02-??* * updates year in `LICENSE.TXT` +* updates es translation ### v0.17 - *2011-11-28* diff --git a/build.xml b/build.xml index 00c3ef52..7b6b1313 100644 --- a/build.xml +++ b/build.xml @@ -1,75 +1,75 @@ - + - - - - - - - Build: ${build.label} - + + + + + + + Build: ${build.label} + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - JSLint "${tool.jsxint.file}" - - - - + + JSLint "${tool.jsxint.file}" + + + + - - JSHint "${tool.jsxint.file}" - - - - + + JSHint "${tool.jsxint.file}" + + + + - - + + diff --git a/src/_h5ai/.htaccess b/src/_h5ai/.htaccess index 467dfb32..ec4f2924 100644 --- a/src/_h5ai/.htaccess +++ b/src/_h5ai/.htaccess @@ -19,17 +19,17 @@ AddType text/html .php # cache images, css and js for 52 weeks - - Header set Cache-Control "max-age=31449600, public" - - - Header set Cache-Control "max-age=31449600, public" - - - Header set Cache-Control "max-age=31449600, public" - - - Header set Cache-Control "max-age=31449600, public" - + + Header set Cache-Control "max-age=31449600, public" + + + Header set Cache-Control "max-age=31449600, public" + + + Header set Cache-Control "max-age=31449600, public" + + + Header set Cache-Control "max-age=31449600, public" + diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js index daf52f25..b95f9d8f 100644 --- a/src/_h5ai/config.js +++ b/src/_h5ai/config.js @@ -7,405 +7,405 @@ var H5AI_CONFIG = { - "options": { + "options": { - /* - * The absolute links to webroot and h5ai. - * Do not change this unless you know what you are doing. - */ - "rootAbsHref": "/", - "h5aiAbsHref": "/_h5ai/", + /* + * The absolute links to webroot and h5ai. + * Do not change this unless you know what you are doing. + */ + "rootAbsHref": "/", + "h5aiAbsHref": "/_h5ai/", - /* - * Filenames of customized header and footer files to look for - * in each folder. - */ - "customHeader": "_h5ai.header.html", - "customFooter": "_h5ai.footer.html", + /* + * Filenames of customized header and footer files to look for + * in each folder. + */ + "customHeader": "_h5ai.header.html", + "customFooter": "_h5ai.footer.html", - /* - * An array of view modes the user may choose from. Currently there - * are two possible values: "details" and "icons". The first value - * indicates the default view mode. If only one value is given the - * view mode is fixed and the selector buttons are hidden. - * The user selected view mode is also stored local in modern browsers - * so that it will be persistent. - */ - "viewmodes": ["details", "icons"], + /* + * An array of view modes the user may choose from. Currently there + * are two possible values: "details" and "icons". The first value + * indicates the default view mode. If only one value is given the + * view mode is fixed and the selector buttons are hidden. + * The user selected view mode is also stored local in modern browsers + * so that it will be persistent. + */ + "viewmodes": ["details", "icons"], - /* - * Default sort order is a two letter code. The first letter specifies - * the column: "n" for "Name", "d" for "Date" or "s" for "Size". The - * second letter specifies the sort order: "a" for "ascending" or "d" - * for "descending". - */ - "sortorder": "na", + /* + * Default sort order is a two letter code. The first letter specifies + * the column: "n" for "Name", "d" for "Date" or "s" for "Size". The + * second letter specifies the sort order: "a" for "ascending" or "d" + * for "descending". + */ + "sortorder": "na", - /* - * Show a folder tree, boolean. - * Note that this tree might have side effects as it sends HEAD requests - * to the folders, and therefore will invoke index.php scripts. Use - * folderStatus below to avoid such requests. - * It might also affect performance significantly. - */ - "showTree": true, + /* + * Show a folder tree, boolean. + * Note that this tree might have side effects as it sends HEAD requests + * to the folders, and therefore will invoke index.php scripts. Use + * folderStatus below to avoid such requests. + * It might also affect performance significantly. + */ + "showTree": true, - /* - * Slide tree bar into viewport if there is enough space, boolean. - */ - "slideTree": true, + /* + * Slide tree bar into viewport if there is enough space, boolean. + */ + "slideTree": true, - /* - * Associative array of folders and their HTTP status codes to - * avoid HEAD requests to that folders. The key (folder) must start - * and end with a slash (/). - * For example: - * "/some/folder/": 200 - * will always return HTTP status 200 (OK), which will be interpreted - * as a non auto indexed folder, that means a folder containing an - * appropriate default index file. - */ - "folderStatus": {}, + /* + * Associative array of folders and their HTTP status codes to + * avoid HEAD requests to that folders. The key (folder) must start + * and end with a slash (/). + * For example: + * "/some/folder/": 200 + * will always return HTTP status 200 (OK), which will be interpreted + * as a non auto indexed folder, that means a folder containing an + * appropriate default index file. + */ + "folderStatus": {}, - /* - * Localization, for example "en", "de" etc. - see h5aiLangs below for - * possible values. Adjust it to your needs. If lang is not found in - * h5aiLangs it defaults to "en". - */ - "lang": "en", + /* + * Localization, for example "en", "de" etc. - see h5aiLangs below for + * possible values. Adjust it to your needs. If lang is not found in + * h5aiLangs it defaults to "en". + */ + "lang": "en", - /* - * Try to use browser language, falls back to previous specified lang. - */ - "useBrowserLang": true, + /* + * Try to use browser language, falls back to previous specified lang. + */ + "useBrowserLang": true, - /* - * Set parent folder labels to real folder names. - */ - "setParentFolderLabels": true, + /* + * Set parent folder labels to real folder names. + */ + "setParentFolderLabels": true, - /* - * Link the hover effects between crumb, extended view and tree. - */ - "linkHoverStates": true, + /* + * Link the hover effects between crumb, extended view and tree. + */ + "linkHoverStates": true, - /* - * Date format in detailed view, for example: "yyyy-MM-dd HH:mm:ss" - * Syntax as specified by date.js - * http://code.google.com/p/datejs/wiki/FormatSpecifiers - */ - "dateFormat": "yyyy-MM-dd HH:mm", + /* + * Date format in detailed view, for example: "yyyy-MM-dd HH:mm:ss" + * Syntax as specified by date.js + * http://code.google.com/p/datejs/wiki/FormatSpecifiers + */ + "dateFormat": "yyyy-MM-dd HH:mm", - /* - * Requires PHP on the server. - * Show thumbnails for image files. - */ - "showThumbs": false, + /* + * Requires PHP on the server. + * Show thumbnails for image files. + */ + "showThumbs": false, - /* - * Requires PHP on the server. - * Enable zipped download of selected entries. - */ - "zippedDownload": false - }, + /* + * Requires PHP on the server. + * Enable zipped download of selected entries. + */ + "zippedDownload": false + }, - /* - * File types mapped to file extensions. - */ - "types": { - "archive": [".tar.bz2", ".tar.gz", ".tgz"], - "audio": [".aif", ".m4a", ".mid", ".mp3", ".mpa", ".ra", ".ogg", ".wav", ".wma"], - "authors": ["authors"], - "bin": [".class", ".o", ".so"], - "blank": [], - "bmp": [".bmp"], - "c": [".c"], - "calc": [".ods", ".ots", ".xlr", ".xls", ".xlsx"], - "cd": [".cue", ".iso"], - "copying": ["copying", "license"], - "cpp": [".cpp"], - "css": [".css", ".less"], - "deb": [".deb"], - "default": [], - "doc": [".doc", ".docx", ".odm", ".odt", ".ott"], - "draw": [".drw"], - "eps": [".eps"], - "exe": [".exe"], - "folder": [], - "folder-home": [], - "folder-open": [], - "folder-page": [], - "folder-parent": [], - "gif": [".gif"], - "gzip": [".gz"], - "h": [".h"], - "hpp": [".hpp"], - "html": [".htm", ".html", ".shtml"], - "ico": [".ico"], - "image": [".xpm"], - "install": ["install"], - "java": [".java"], - "jpg": [".jpg", ".jpeg"], - "js": [".js", ".json"], - "log": [".log", "changelog"], - "makefile": [".pom", "build.xml", "pom.xml"], - "package": [], - "pdf": [".pdf"], - "php": [".php"], - "playlist": [".m3u"], - "png": [".png"], - "pres": [".odp", ".otp", ".pps", ".ppt", ".pptx"], - "psd": [".psd"], - "py": [".py"], - "rar": [".rar"], - "rb": [".rb"], - "readme": ["readme"], - "rpm": [".rpm"], - "rss": [".rss"], - "rtf": [".rtf"], - "script": [".conf", ".csh", ".ini", ".ksh", ".sh", ".shar", ".tcl"], - "source": [], - "sql": [], - "tar": [".tar"], - "tex": [".tex"], - "text": [".markdown", ".md", ".text", ".txt"], - "tiff": [".tiff"], - "unknown": [], - "vcal": [".vcal"], - "video": [".avi", ".flv", ".mov", ".mp4", ".mpg", ".rm", ".swf", ".vob", ".wmv"], - "xml": [".xml"], - "zip": [".bz2", ".jar", ".war", ".z", ".Z", ".zip"] - }, + /* + * File types mapped to file extensions. + */ + "types": { + "archive": [".tar.bz2", ".tar.gz", ".tgz"], + "audio": [".aif", ".m4a", ".mid", ".mp3", ".mpa", ".ra", ".ogg", ".wav", ".wma"], + "authors": ["authors"], + "bin": [".class", ".o", ".so"], + "blank": [], + "bmp": [".bmp"], + "c": [".c"], + "calc": [".ods", ".ots", ".xlr", ".xls", ".xlsx"], + "cd": [".cue", ".iso"], + "copying": ["copying", "license"], + "cpp": [".cpp"], + "css": [".css", ".less"], + "deb": [".deb"], + "default": [], + "doc": [".doc", ".docx", ".odm", ".odt", ".ott"], + "draw": [".drw"], + "eps": [".eps"], + "exe": [".exe"], + "folder": [], + "folder-home": [], + "folder-open": [], + "folder-page": [], + "folder-parent": [], + "gif": [".gif"], + "gzip": [".gz"], + "h": [".h"], + "hpp": [".hpp"], + "html": [".htm", ".html", ".shtml"], + "ico": [".ico"], + "image": [".xpm"], + "install": ["install"], + "java": [".java"], + "jpg": [".jpg", ".jpeg"], + "js": [".js", ".json"], + "log": [".log", "changelog"], + "makefile": [".pom", "build.xml", "pom.xml"], + "package": [], + "pdf": [".pdf"], + "php": [".php"], + "playlist": [".m3u"], + "png": [".png"], + "pres": [".odp", ".otp", ".pps", ".ppt", ".pptx"], + "psd": [".psd"], + "py": [".py"], + "rar": [".rar"], + "rb": [".rb"], + "readme": ["readme"], + "rpm": [".rpm"], + "rss": [".rss"], + "rtf": [".rtf"], + "script": [".conf", ".csh", ".ini", ".ksh", ".sh", ".shar", ".tcl"], + "source": [], + "sql": [], + "tar": [".tar"], + "tex": [".tex"], + "text": [".markdown", ".md", ".text", ".txt"], + "tiff": [".tiff"], + "unknown": [], + "vcal": [".vcal"], + "video": [".avi", ".flv", ".mov", ".mp4", ".mpg", ".rm", ".swf", ".vob", ".wmv"], + "xml": [".xml"], + "zip": [".bz2", ".jar", ".war", ".z", ".Z", ".zip"] + }, - /* - * Available translations. - */ - "langs": { + /* + * Available translations. + */ + "langs": { - "en": { - "lang": "english", - "details": "details", - "icons": "icons", - "name": "Name", - "lastModified": "Last modified", - "size": "Size", - "parentDirectory": "Parent Directory", - "empty": "empty", - "folders": "folders", - "files": "files", - "download": "download" - }, + "en": { + "lang": "english", + "details": "details", + "icons": "icons", + "name": "Name", + "lastModified": "Last modified", + "size": "Size", + "parentDirectory": "Parent Directory", + "empty": "empty", + "folders": "folders", + "files": "files", + "download": "download" + }, - "bg": { - "lang": "български", - "details": "детайли", - "icons": "икони", - "name": "Име", - "lastModified": "Последна промяна", - "size": "Размер", - "parentDirectory": "Предходна директория", - "empty": "празно", - "folders": "папки", - "files": "файлове", - "download": "download" - }, + "bg": { + "lang": "български", + "details": "детайли", + "icons": "икони", + "name": "Име", + "lastModified": "Последна промяна", + "size": "Размер", + "parentDirectory": "Предходна директория", + "empty": "празно", + "folders": "папки", + "files": "файлове", + "download": "download" + }, - "cs": { - "lang": "čeština", - "details": "podrobnosti", - "icons": "ikony", - "name": "Název", - "lastModified": "Upraveno", - "size": "Velikost", - "parentDirectory": "Nadřazený adresář", - "empty": "prázdný", - "folders": "složek", - "files": "souborů", - "download": "download" - }, + "cs": { + "lang": "čeština", + "details": "podrobnosti", + "icons": "ikony", + "name": "Název", + "lastModified": "Upraveno", + "size": "Velikost", + "parentDirectory": "Nadřazený adresář", + "empty": "prázdný", + "folders": "složek", + "files": "souborů", + "download": "download" + }, - "de": { - "lang": "deutsch", - "details": "Details", - "icons": "Icons", - "name": "Name", - "lastModified": "Geändert", - "size": "Größe", - "parentDirectory": "Übergeordnetes Verzeichnis", - "empty": "leer", - "folders": "Ordner", - "files": "Dateien", - "download": "Download" - }, + "de": { + "lang": "deutsch", + "details": "Details", + "icons": "Icons", + "name": "Name", + "lastModified": "Geändert", + "size": "Größe", + "parentDirectory": "Übergeordnetes Verzeichnis", + "empty": "leer", + "folders": "Ordner", + "files": "Dateien", + "download": "Download" + }, - "es": { - "lang": "español", - "details": "Detalles", - "icons": "Íconos", - "name": "Nombre", - "lastModified": "Última modificación", - "size": "Tamaño", - "parentDirectory": "Directorio superior", - "empty": "vacío", - "folders": "Directorios", - "files": "Archivos", - "download": "Descargar" - }, + "es": { + "lang": "español", + "details": "Detalles", + "icons": "Íconos", + "name": "Nombre", + "lastModified": "Última modificación", + "size": "Tamaño", + "parentDirectory": "Directorio superior", + "empty": "vacío", + "folders": "Directorios", + "files": "Archivos", + "download": "Descargar" + }, - "fr": { - "lang": "français", - "details": "détails", - "icons": "icônes", - "name": "Nom", - "lastModified": "Dernière modification", - "size": "Taille", - "parentDirectory": "Dossier parent", - "empty": "vide", - "folders": "Répertoires", - "files": "Fichiers", - "download": "télécharger" - }, + "fr": { + "lang": "français", + "details": "détails", + "icons": "icônes", + "name": "Nom", + "lastModified": "Dernière modification", + "size": "Taille", + "parentDirectory": "Dossier parent", + "empty": "vide", + "folders": "Répertoires", + "files": "Fichiers", + "download": "télécharger" + }, - "it": { - "lang": "italiano", - "details": "dettagli", - "icons": "icone", - "name": "Nome", - "lastModified": "Ultima modifica", - "size": "Dimensione", - "parentDirectory": "Cartella Superiore", - "empty": "vuota", - "folders": "cartelle", - "files": "file", - "download": "download" - }, + "it": { + "lang": "italiano", + "details": "dettagli", + "icons": "icone", + "name": "Nome", + "lastModified": "Ultima modifica", + "size": "Dimensione", + "parentDirectory": "Cartella Superiore", + "empty": "vuota", + "folders": "cartelle", + "files": "file", + "download": "download" + }, - "lv": { - "lang": "latviešu", - "details": "detaļas", - "icons": "ikonas", - "name": "Nosaukums", - "lastModified": "Pēdējoreiz modificēts", - "size": "Izmērs", - "parentDirectory": "Vecākdirektorijs", - "empty": "tukšs", - "folders": "mapes", - "files": "faili", - "download": "lejupielādēt" - }, + "lv": { + "lang": "latviešu", + "details": "detaļas", + "icons": "ikonas", + "name": "Nosaukums", + "lastModified": "Pēdējoreiz modificēts", + "size": "Izmērs", + "parentDirectory": "Vecākdirektorijs", + "empty": "tukšs", + "folders": "mapes", + "files": "faili", + "download": "lejupielādēt" + }, - "nl": { - "lang": "nederlands", - "details": "details", - "icons": "iconen", - "name": "Naam", - "lastModified": "Laatste wijziging", - "size": "Grootte", - "parentDirectory": "Bovenliggende map", - "empty": "lege", - "folders": "folders", - "files": "files", - "download": "download" - }, + "nl": { + "lang": "nederlands", + "details": "details", + "icons": "iconen", + "name": "Naam", + "lastModified": "Laatste wijziging", + "size": "Grootte", + "parentDirectory": "Bovenliggende map", + "empty": "lege", + "folders": "folders", + "files": "files", + "download": "download" + }, - "pl": { - "lang": "polski", - "details": "szczegóły", - "icons": "ikony", - "name": "Nazwa", - "lastModified": "Ostatnia modyfikacja", - "size": "Rozmiar", - "parentDirectory": "Katalog nadrzędny", - "empty": "pusty", - "folders": "foldery", - "files": "pliki", - "download": "download" - }, + "pl": { + "lang": "polski", + "details": "szczegóły", + "icons": "ikony", + "name": "Nazwa", + "lastModified": "Ostatnia modyfikacja", + "size": "Rozmiar", + "parentDirectory": "Katalog nadrzędny", + "empty": "pusty", + "folders": "foldery", + "files": "pliki", + "download": "download" + }, - "pt": { - "lang": "português", - "details": "detalhes", - "icons": "ícones", - "name": "Nome", - "lastModified": "Última modificação", - "size": "Tamanho", - "parentDirectory": "Diretório superior", - "empty": "vazio", - "folders": "pastas", - "files": "arquivos", - "download": "download" - }, + "pt": { + "lang": "português", + "details": "detalhes", + "icons": "ícones", + "name": "Nome", + "lastModified": "Última modificação", + "size": "Tamanho", + "parentDirectory": "Diretório superior", + "empty": "vazio", + "folders": "pastas", + "files": "arquivos", + "download": "download" + }, - "ru": { - "lang": "русский", - "details": "детали", - "icons": "иконки", - "name": "Имя", - "lastModified": "Последние изменения", - "size": "Размер", - "parentDirectory": "Главная директория", - "empty": "пусто", - "folders": "папки", - "files": "файлы", - "download": "download" - }, + "ru": { + "lang": "русский", + "details": "детали", + "icons": "иконки", + "name": "Имя", + "lastModified": "Последние изменения", + "size": "Размер", + "parentDirectory": "Главная директория", + "empty": "пусто", + "folders": "папки", + "files": "файлы", + "download": "download" + }, - "sk": { - "lang": "slovenčina", - "details": "podrobnosti", - "icons": "ikony", - "name": "Názov", - "lastModified": "Upravené", - "size": "Velkosť", - "parentDirectory": "Nadriadený priečinok", - "empty": "prázdny", - "folders": "priečinkov", - "files": "súborov", - "download": "download" - }, + "sk": { + "lang": "slovenčina", + "details": "podrobnosti", + "icons": "ikony", + "name": "Názov", + "lastModified": "Upravené", + "size": "Velkosť", + "parentDirectory": "Nadriadený priečinok", + "empty": "prázdny", + "folders": "priečinkov", + "files": "súborov", + "download": "download" + }, - "sv": { - "lang": "svenska", - "details": "detaljerad", - "icons": "ikoner", - "name": "Filnamn", - "lastModified": "Senast ändrad", - "size": "Filstorlek", - "parentDirectory": "Till överordnad mapp", - "empty": "tom", - "folders": "folders", - "files": "files", - "download": "download" - }, + "sv": { + "lang": "svenska", + "details": "detaljerad", + "icons": "ikoner", + "name": "Filnamn", + "lastModified": "Senast ändrad", + "size": "Filstorlek", + "parentDirectory": "Till överordnad mapp", + "empty": "tom", + "folders": "folders", + "files": "files", + "download": "download" + }, - "tr": { - "lang": "türkçe", - "details": "detaylar", - "icons": "ikonlar", - "name": "İsim", - "lastModified": "Son Düzenleme", - "size": "Boyut", - "parentDirectory": "Üst Dizin", - "empty": "boş", - "folders": "klasörler", - "files": "dosyalar", - "download": "indir" - }, + "tr": { + "lang": "türkçe", + "details": "detaylar", + "icons": "ikonlar", + "name": "İsim", + "lastModified": "Son Düzenleme", + "size": "Boyut", + "parentDirectory": "Üst Dizin", + "empty": "boş", + "folders": "klasörler", + "files": "dosyalar", + "download": "indir" + }, - "zh-cn": { - "lang": "简体中文", - "details": "详情", - "icons": "图标", - "name": "文件名", - "lastModified": "上次修改", - "size": "大小", - "parentDirectory": "上层文件夹", - "empty": "空文件夹", - "folders": "文件夹", - "files": "文件", - "download": "download" - } - } + "zh-cn": { + "lang": "简体中文", + "details": "详情", + "icons": "图标", + "name": "文件名", + "lastModified": "上次修改", + "size": "大小", + "parentDirectory": "上层文件夹", + "empty": "空文件夹", + "folders": "文件夹", + "files": "文件", + "download": "download" + } + } }; diff --git a/src/_h5ai/css/inc/extended.less b/src/_h5ai/css/inc/extended.less index 7eaa140d..733360a6 100644 --- a/src/_h5ai/css/inc/extended.less +++ b/src/_h5ai/css/inc/extended.less @@ -1,280 +1,280 @@ #extended.details-view { - display: none; + display: none; - ul { - margin: 0; - padding: 0; - list-style: none; + ul { + margin: 0; + padding: 0; + list-style: none; - li { - position: relative; - white-space: nowrap; - clear: both; + li { + position: relative; + white-space: nowrap; + clear: both; - &.header { - a, a:active, a:visited { - padding-bottom: 18px; - color: #555; - text-decoration: none; - opacity: 0.4; - cursor: pointer; - .transition(all 0.2s ease-in-out); + &.header { + a, a:active, a:visited { + padding-bottom: 18px; + color: #555; + text-decoration: none; + opacity: 0.4; + cursor: pointer; + .transition(all 0.2s ease-in-out); - img.ascending, img.descending { - position: relative; - top: -2px; - display: none; - width: 12px; - height: 12px; - padding: 0 8px; - } - &:hover { - color: #555; - opacity: 0.9; - } - &.ascending img.ascending { - display: inline; - } - &.descending img.descending { - display: inline; - } - } - } - &.entry { + img.ascending, img.descending { + position: relative; + top: -2px; + display: none; + width: 12px; + height: 12px; + padding: 0 8px; + } + &:hover { + color: #555; + opacity: 0.9; + } + &.ascending img.ascending { + display: inline; + } + &.descending img.descending { + display: inline; + } + } + } + &.entry { - a, a:active, a:visited { - display: block; - color: #555; - text-decoration: none; - cursor: pointer; - border-bottom: 1px solid #ddd; + a, a:active, a:visited { + display: block; + color: #555; + text-decoration: none; + cursor: pointer; + border-bottom: 1px solid #ddd; - &:hover, &.hover { - background-color: #f6f6f6; - color: #e80; - } - &.selected:not(.selecting), &.selecting:not(.selected) { - border-color: rgba(240,100,0,0.2); - background-color: rgba(240,100,0,0.2); - } - } - &.error { - a, a:active, a:visited { - color: #aaa; + &:hover, &.hover { + background-color: #f6f6f6; + color: #e80; + } + &.selected:not(.selecting), &.selecting:not(.selected) { + border-color: rgba(240,100,0,0.2); + background-color: rgba(240,100,0,0.2); + } + } + &.error { + a, a:active, a:visited { + color: #aaa; - .label { - .hint { - margin-left: 12px; - font-size: 0.9em; - color: #c55; - } - } - &:hover, &.hover { - opacity: 1; - background-color: #f6f6f6; - color: #e80; - } - } - } - &.folder-parent { - .date, .size { - display: none; - } - } - &.folder { - .size { - display: none; - } - } - } - .icon, .label, .date, .size { - padding: 6px; - } - .icon { - display: inline-block; - position: absolute; - left: 0; - top: -2px; - width: 16px; + .label { + .hint { + margin-left: 12px; + font-size: 0.9em; + color: #c55; + } + } + &:hover, &.hover { + opacity: 1; + background-color: #f6f6f6; + color: #e80; + } + } + } + &.folder-parent { + .date, .size { + display: none; + } + } + &.folder { + .size { + display: none; + } + } + } + .icon, .label, .date, .size { + padding: 6px; + } + .icon { + display: inline-block; + position: absolute; + left: 0; + top: -2px; + width: 16px; - img { - width: 16px; - height: 16px; - &.thumb { - border: 1px solid #eee; - } - } - } - .icon.big { - display: none; - } - .label { - display: block; - margin: 0 270px 0 24px; - overflow: hidden; - white-space: nowrap; - text-align: left; - } - .date { - position: absolute; - right: 100px; - top: 0; - text-align: right; - width: 160px; - white-space: nowrap; - } - .size { - position: absolute; - right: 0; - top: 0; - text-align: right; - width: 80px; - white-space: nowrap; - } - &.entry.thumb .icon.small { - overflow: hidden; - padding: 5px; + img { + width: 16px; + height: 16px; + &.thumb { + border: 1px solid #eee; + } + } + } + .icon.big { + display: none; + } + .label { + display: block; + margin: 0 270px 0 24px; + overflow: hidden; + white-space: nowrap; + text-align: left; + } + .date { + position: absolute; + right: 100px; + top: 0; + text-align: right; + width: 160px; + white-space: nowrap; + } + .size { + position: absolute; + right: 0; + top: 0; + text-align: right; + width: 80px; + white-space: nowrap; + } + &.entry.thumb .icon.small { + overflow: hidden; + padding: 5px; - img { - background-color: #eee; - width: 16px; - height: 16px; - border: 1px solid #ddd; - overflow: hidden; - } - } - } - } - .empty { - text-align: center; - margin: 50px 0; - color: #ddd; - font-size: 5em; - font-weight: bold; - } + img { + background-color: #eee; + width: 16px; + height: 16px; + border: 1px solid #ddd; + overflow: hidden; + } + } + } + } + .empty { + text-align: center; + margin: 50px 0; + color: #ddd; + font-size: 5em; + font-weight: bold; + } } #selection-rect { - display: none; - position: absolute; - left: 0; - top: 0; - z-index: 2; - border: 1px dashed rgba(240,100,0,0.5); - background-color: rgba(240,100,0,0.2); + display: none; + position: absolute; + left: 0; + top: 0; + z-index: 2; + border: 1px dashed rgba(240,100,0,0.5); + background-color: rgba(240,100,0,0.2); } #extended.icons-view { - display: none; - padding: 3px; - border: 1px solid #eee; - border-radius: 15px; + display: none; + padding: 3px; + border: 1px solid #eee; + border-radius: 15px; - ul { - margin: 0; - padding: 0; - list-style: none; + ul { + margin: 0; + padding: 0; + list-style: none; - li { - &.header { - display: none; - } - &.entry { - float: left; + li { + &.header { + display: none; + } + &.entry { + float: left; - a, a:active, a:visited { - display: block; - margin: 8px; - padding: 8px; - width: 100px; - height: 120px; - float: left; - text-align: center; - text-decoration: none; - overflow: hidden; - border-radius: 5px; - color: #555; - cursor: pointer; - border: 2px solid rgba(0,0,0,0); + a, a:active, a:visited { + display: block; + margin: 8px; + padding: 8px; + width: 100px; + height: 120px; + float: left; + text-align: center; + text-decoration: none; + overflow: hidden; + border-radius: 5px; + color: #555; + cursor: pointer; + border: 2px solid rgba(0,0,0,0); - &:hover, &.hover { - color: #e80; - border-color: #eee; - background-color: #f6f6f6; - } - &.selected:not(.selecting), &.selecting:not(.selected) { - border-color: rgba(240,100,0,0.2); - background-color: rgba(240,100,0,0.2); - } - .icon { - display: block; + &:hover, &.hover { + color: #e80; + border-color: #eee; + background-color: #f6f6f6; + } + &.selected:not(.selecting), &.selecting:not(.selected) { + border-color: rgba(240,100,0,0.2); + background-color: rgba(240,100,0,0.2); + } + .icon { + display: block; - img { - min-width: 48px; - min-height: 48px; - margin-bottom: 8px; - &.thumb { - border: 1px solid #eee; - } - } - } - .icon.small { - display: none; - } - .label { - display: block; - word-wrap: break-word; - } - .date, .size { - display: none; - } - } - &.error { - a, a:active, a:visited { - color: #aaa; - text-decoration: none; + img { + min-width: 48px; + min-height: 48px; + margin-bottom: 8px; + &.thumb { + border: 1px solid #eee; + } + } + } + .icon.small { + display: none; + } + .label { + display: block; + word-wrap: break-word; + } + .date, .size { + display: none; + } + } + &.error { + a, a:active, a:visited { + color: #aaa; + text-decoration: none; - .label { - .hint { - padding: 0 6px; - font-size: 0.9em; - color: #c55; - } - } - &:hover, &.hover { - color: #e80; - border-color: #eee; - background-color: #f6f6f6; - } - } - } - } - &.entry.thumb .icon.big { - width: 100px; - height: 58px; - overflow: hidden; + .label { + .hint { + padding: 0 6px; + font-size: 0.9em; + color: #c55; + } + } + &:hover, &.hover { + color: #e80; + border-color: #eee; + background-color: #f6f6f6; + } + } + } + } + &.entry.thumb .icon.big { + width: 100px; + height: 58px; + overflow: hidden; - img { - background-color: #eee; - min-width: 46px; - min-height: 46px; - min-width: 12px; - min-height: 12px; - border: 1px solid #ddd; - overflow: hidden; - } - } - } - } - .empty { - padding: 16px; - height: 120px; - text-align: center; - color: #ddd; - font-size: 5em; - font-weight: bold; - } + img { + background-color: #eee; + min-width: 46px; + min-height: 46px; + min-width: 12px; + min-height: 12px; + border: 1px solid #ddd; + overflow: hidden; + } + } + } + } + .empty { + padding: 16px; + height: 120px; + text-align: center; + color: #ddd; + font-size: 5em; + font-weight: bold; + } } diff --git a/src/_h5ai/css/inc/main.less b/src/_h5ai/css/inc/main.less index d1228985..b1df578f 100644 --- a/src/_h5ai/css/inc/main.less +++ b/src/_h5ai/css/inc/main.less @@ -4,116 +4,116 @@ html.js { - .hideOnJs { - display: none; - } + .hideOnJs { + display: none; + } } html.no-js { - .hideOnNoJs { - display: none; - } + .hideOnNoJs { + display: none; + } } body { - font-family: Ubuntu, sans-serif; - font-size: 16px; - color: #555; - background-color: #fff; - margin: 80px 30px; + font-family: Ubuntu, sans-serif; + font-size: 16px; + color: #555; + background-color: #fff; + margin: 80px 30px; } body > nav { - position: fixed; - z-index: 1; - width: 100%; - left: 0; - top: 0; - font-size: 0.85em; - background-color: rgb(241,241,241); - border-bottom: 2px solid rgb(210,210,210); + position: fixed; + z-index: 1; + width: 100%; + left: 0; + top: 0; + font-size: 0.85em; + background-color: rgb(241,241,241); + border-bottom: 2px solid rgb(210,210,210); - span.jsDisabledFallback { - display: block; - height: 30px; - line-height: 30px; - padding: 0 10px; - color: #999; - } - a, a:active, a:visited { - color: #555; - cursor: pointer; - text-decoration: none; - opacity: 0.7; - .transition(all 0.2s ease-in-out); + span.jsDisabledFallback { + display: block; + height: 30px; + line-height: 30px; + padding: 0 10px; + color: #999; + } + a, a:active, a:visited { + color: #555; + 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; + display: block; + height: 30px; + line-height: 30px; + padding: 0 10px; - &:hover, &.hover { - color: #e80; - background-color: rgba(255,255,255,0.5); - opacity: 1.0; - } - } - .current a { - background-color: rgba(255,255,255,0.5); - opacity: 1.0; - } - img { - position: relative; - top: -2px; - width: 16px; - height: 16px; - } - img + span { - margin-left: 6px; - } - .crumb { - float: left; - border-right: 1px solid rgb(231,231,231); - .hint { - margin-left: 8px; - font-style: italic; - color: #999; - } - img.hint { - width: 10px; - height: 10px; - } - } - .view { - float: right; - border-left: 1px solid rgb(231,231,231); - } - #download { - display: none; - float: right; - border-left: 1px solid rgb(231,231,231); - } + &:hover, &.hover { + color: #e80; + background-color: rgba(255,255,255,0.5); + opacity: 1.0; + } + } + .current a { + background-color: rgba(255,255,255,0.5); + opacity: 1.0; + } + img { + position: relative; + top: -2px; + width: 16px; + height: 16px; + } + img + span { + margin-left: 6px; + } + .crumb { + float: left; + border-right: 1px solid rgb(231,231,231); + .hint { + margin-left: 8px; + font-style: italic; + color: #999; + } + img.hint { + width: 10px; + height: 10px; + } + } + .view { + float: right; + border-left: 1px solid rgb(231,231,231); + } + #download { + display: none; + float: right; + border-left: 1px solid rgb(231,231,231); + } } #content { - max-width: 960px; - margin: 0 auto; + max-width: 960px; + margin: 0 auto; - > header { - display: none; - padding-bottom: 10px; - margin-bottom: 80px; - border-bottom: 2px dashed #ddd; - } - > footer { - display: none; - padding-top: 10px; - margin-top: 80px; - border-top: 2px dashed #ddd; - } + > header { + display: none; + padding-bottom: 10px; + margin-bottom: 80px; + border-bottom: 2px dashed #ddd; + } + > footer { + display: none; + padding-top: 10px; + margin-top: 80px; + border-top: 2px dashed #ddd; + } } @@ -123,114 +123,114 @@ body > nav { body > footer { - position: fixed; - z-index: 1; - width: 100%; - left: 0; - bottom: 0; - padding: 6px 0 8px 0; - background-color: rgb(241,241,241); - border-top: 2px solid rgb(210,210,210); + position: fixed; + z-index: 1; + width: 100%; + left: 0; + bottom: 0; + padding: 6px 0 8px 0; + background-color: rgb(241,241,241); + border-top: 2px solid rgb(210,210,210); - color: #999; - font-size: 0.85em; - text-align: center; + color: #999; + font-size: 0.85em; + text-align: center; - a, a:active, a:visited { - color: #555; - text-decoration: none; - .transition(all 0.2s ease-in-out); - opacity: 0.7; + a, a:active, a:visited { + color: #555; + text-decoration: none; + .transition(all 0.2s ease-in-out); + opacity: 0.7; - &:hover { - color: #e80; - opacity: 1; - } - } - .left { - display: block; - padding: 0 8px; - float: left - } - .center { - display: block; - margin: 0 100px; - } - .right { - display: block; - padding: 0 8px; - float: right - } - .noJsMsg { - color: #c33; - margin-left: 16px; - } - .status { - .sep { - display: inline-block; - padding: 0 6px; - } - &.default { - } - &.dynamic { - display: none; - } - } - #langSelector { - position: relative; - cursor: pointer; + &:hover { + color: #e80; + opacity: 1; + } + } + .left { + display: block; + padding: 0 8px; + float: left + } + .center { + display: block; + margin: 0 100px; + } + .right { + display: block; + padding: 0 8px; + float: right + } + .noJsMsg { + color: #c33; + margin-left: 16px; + } + .status { + .sep { + display: inline-block; + padding: 0 6px; + } + &.default { + } + &.dynamic { + display: none; + } + } + #langSelector { + position: relative; + cursor: pointer; - .langOptions { - position: absolute; - z-index: 2; - overflow: auto; - display: none; - right: 0; - top: 0; - max-height: 200px; - background-color: rgb(241,241,241); - border: 1px solid rgb(210,210,210); + .langOptions { + position: absolute; + z-index: 2; + overflow: auto; + display: none; + right: 0; + top: 0; + max-height: 200px; + background-color: rgb(241,241,241); + border: 1px solid rgb(210,210,210); - > .scrollbar { - margin: 0; - width: 6px; - background-color: rgb(210,210,210); + > .scrollbar { + margin: 0; + width: 6px; + background-color: rgb(210,210,210); - .drag { - background-color: rgb(180,180,180); - } - &.dragOn .drag { - background-color: rgb(150,150,150); - } - } + .drag { + background-color: rgb(180,180,180); + } + &.dragOn .drag { + background-color: rgb(150,150,150); + } + } - ul { - margin: 0; - padding: 0; - list-style: none; - text-align: left; + ul { + margin: 0; + padding: 0; + list-style: none; + text-align: left; - li { - padding: 8px 24px 10px 24px; - white-space: nowrap; - border-top: 1px solid rgb(231,231,231); - .transition(all 0.2s ease-in-out); + li { + padding: 8px 24px 10px 24px; + white-space: nowrap; + border-top: 1px solid rgb(231,231,231); + .transition(all 0.2s ease-in-out); - &.current { - color: #333; - background-color: rgba(255,255,255,0.8); - } - &:hover { - color: #e80; - background-color: rgba(255,255,255,0.8); - } - } - li:nth-child(3n+1) { + &.current { + color: #333; + background-color: rgba(255,255,255,0.8); + } + &:hover { + color: #e80; + background-color: rgba(255,255,255,0.8); + } + } + li:nth-child(3n+1) { - } - } - } - } + } + } + } + } } @import "responsive"; diff --git a/src/_h5ai/css/inc/mixins.less b/src/_h5ai/css/inc/mixins.less index 7bc06916..4e2f8847 100644 --- a/src/_h5ai/css/inc/mixins.less +++ b/src/_h5ai/css/inc/mixins.less @@ -1,38 +1,38 @@ .border-radius (@radius) { - -moz-border-radius: @radius; - -webkit-border-radius: @radius; - border-radius: @radius; + -moz-border-radius: @radius; + -webkit-border-radius: @radius; + border-radius: @radius; } .box-shadow (@shadow) { - -moz-box-shadow: @shadow; - -webkit-box-shadow: @shadow; - box-shadow: @shadow; + -moz-box-shadow: @shadow; + -webkit-box-shadow: @shadow; + box-shadow: @shadow; } .transition (@transition) { - -moz-transition: @transition; - -ms-transition: @transition; - -o-transition: @transition; - -webkit-transition: @transition; - transition: @transition; + -moz-transition: @transition; + -ms-transition: @transition; + -o-transition: @transition; + -webkit-transition: @transition; + transition: @transition; } .transform (@transform) { - -moz-transform: @transform; - -o-transform: @transform; - -webkit-transform: @transform; - transform: @transform; + -moz-transform: @transform; + -o-transform: @transform; + -webkit-transform: @transform; + transform: @transform; } .background-size (@size) { - -moz-background-size: @size; - -webkit-background-size: @size; - background-size: @size; + -moz-background-size: @size; + -webkit-background-size: @size; + background-size: @size; } diff --git a/src/_h5ai/css/inc/responsive.less b/src/_h5ai/css/inc/responsive.less index 7b38e320..ffe47861 100644 --- a/src/_h5ai/css/inc/responsive.less +++ b/src/_h5ai/css/inc/responsive.less @@ -1,36 +1,36 @@ @media only screen and (max-width: 500px) { body > nav { - .view span { - display: none; - } + .view span { + display: none; + } } #extended.icons-view { - padding: 0; - border: none; - margin: 0 -14px; + padding: 0; + border: none; + margin: 0 -14px; } } @media only screen and (max-width: 350px) { body > nav { - .crumb { - display: none; - } - .current { - display: block; - } + .crumb { + display: none; + } + .current { + display: block; + } } #extended.details-view { - .header .label, .entry .label { - margin-right: 110px; - } - .header .date, .entry .date { - display: none; - } + .header .label, .entry .label { + margin-right: 110px; + } + .header .date, .entry .date { + display: none; + } } body > footer { - .center { - display: none; - } + .center { + display: none; + } } } diff --git a/src/_h5ai/css/inc/table.less b/src/_h5ai/css/inc/table.less index 22881893..cfd5241b 100644 --- a/src/_h5ai/css/inc/table.less +++ b/src/_h5ai/css/inc/table.less @@ -1,68 +1,68 @@ #table { - table { - display: block; - width: 100%; - border-collapse: collapse; + table { + display: block; + width: 100%; + border-collapse: collapse; - th, td { - padding: 3px 6px; - text-align: left; - border: none; - } - th { - padding-bottom: 18px; - opacity: 0.4; - .transition(all 0.2s ease-in-out); + th, td { + padding: 3px 6px; + text-align: left; + border: none; + } + th { + padding-bottom: 18px; + opacity: 0.4; + .transition(all 0.2s ease-in-out); - &:hover, &:hover a { - color: #555; - cursor: pointer; - opacity: 0.9; - } - a, a:visited { - color: #555; - font-weight: normal; + &:hover, &:hover a { + color: #555; + cursor: pointer; + opacity: 0.9; + } + a, a:visited { + color: #555; + font-weight: normal; - img { - width: 12px; - height: 12px; - padding: 0 8px; - } - } - } - td { - border: 1px solid #ddd; - border-left: none; - border-right: none; - } - td:nth-child(1), th:nth-child(1) { - text-align: center; - width: 16px; + img { + width: 12px; + height: 12px; + padding: 0 8px; + } + } + } + td { + border: 1px solid #ddd; + border-left: none; + border-right: none; + } + td:nth-child(1), th:nth-child(1) { + text-align: center; + width: 16px; - img { - width: 16px; - height: 16px; - padding-top: 2px; - } - } - td:nth-child(2), th:nth-child(2) { - width: 682px; - max-width: 682px; - overflow: hidden; - white-space: nowrap; - } - td:nth-child(3), th:nth-child(3) { - text-align: right; - width: 160px; - min-width: 160px; - white-space: nowrap; - } - td:nth-child(4), th:nth-child(4) { - text-align: right; - width: 70px; - min-width: 70px; - white-space: nowrap; - } - } + img { + width: 16px; + height: 16px; + padding-top: 2px; + } + } + td:nth-child(2), th:nth-child(2) { + width: 682px; + max-width: 682px; + overflow: hidden; + white-space: nowrap; + } + td:nth-child(3), th:nth-child(3) { + text-align: right; + width: 160px; + min-width: 160px; + white-space: nowrap; + } + td:nth-child(4), th:nth-child(4) { + text-align: right; + width: 70px; + min-width: 70px; + white-space: nowrap; + } + } } diff --git a/src/_h5ai/css/inc/tree.less b/src/_h5ai/css/inc/tree.less index b35b488f..0862cef0 100644 --- a/src/_h5ai/css/inc/tree.less +++ b/src/_h5ai/css/inc/tree.less @@ -1,130 +1,130 @@ #tree { - display: none; - position: fixed; - left: 0; - top: 82px; - z-index: 1; - overflow: auto; - font-size: 0.85em; - padding: 8px; - background-color: rgb(241,241,241); - border: 1px solid rgb(210,210,210); - border-left: none; - .border-radius(0 10px 10px 0); + display: none; + position: fixed; + left: 0; + top: 82px; + z-index: 1; + overflow: auto; + font-size: 0.85em; + padding: 8px; + background-color: rgb(241,241,241); + border: 1px solid rgb(210,210,210); + border-left: none; + .border-radius(0 10px 10px 0); - > .scrollbar { - margin: 8px 8px 8px 0; - width: 6px; - background-color: rgb(210,210,210); - .border-radius(3px); + > .scrollbar { + margin: 8px 8px 8px 0; + width: 6px; + background-color: rgb(210,210,210); + .border-radius(3px); - .drag { - background-color: rgb(180,180,180); - .border-radius(3px); - } - &.dragOn .drag { - background-color: rgb(150,150,150); - } - } + .drag { + background-color: rgb(180,180,180); + .border-radius(3px); + } + &.dragOn .drag { + background-color: rgb(150,150,150); + } + } - .entry { - .blank, .indicator { - display: inline-block; - width: 16px; - height: 25px; - float: left; - } - .indicator { - opacity: 0.7; - .transition(all 0.2s ease-in-out); - cursor: pointer; + .entry { + .blank, .indicator { + display: inline-block; + width: 16px; + height: 25px; + float: left; + } + .indicator { + opacity: 0.7; + .transition(all 0.2s ease-in-out); + cursor: pointer; - &:hover { - opacity: 1; - } - img { - position: relative; - left: 0; - top: 3px; - width: 12px; - height: 12px; - vertical-align: bottom; - .transition(all 0.2s ease-in-out); - } - &.open { - img { - .transform(rotate(90deg)); - } - } - &.unknown { - opacity: 0.3; - } - } - > a, > a:active, > a.visited { - margin-left: 16px; - padding: 4px 6px; - border: 1px solid rgba(0,0,0,0); - .border-radius(5px); - display: block; - color: #555; - text-decoration: none; - opacity: 0.7; + &:hover { + opacity: 1; + } + img { + position: relative; + left: 0; + top: 3px; + width: 12px; + height: 12px; + vertical-align: bottom; + .transition(all 0.2s ease-in-out); + } + &.open { + img { + .transform(rotate(90deg)); + } + } + &.unknown { + opacity: 0.3; + } + } + > a, > a:active, > a.visited { + margin-left: 16px; + padding: 4px 6px; + border: 1px solid rgba(0,0,0,0); + .border-radius(5px); + display: block; + color: #555; + text-decoration: none; + opacity: 0.7; - &:hover, &.hover { - color: #e80; - background-color: rgba(255,255,255,0.5); - opacity: 1; - } - .label { - display: inline-block; - } - .icon { - display: inline-block; - width: 20px; - img { - width: 16px; - height: 16px; - vertical-align: bottom; - } - } - .hint { - display: inline-block; - margin-left: 12px; - font-size: 0.9em; - color: #ccc; - img { - width: 10px; - height: 10px; - vertical-align: baseline; - } - } - } - &.file { - display: none; - } - &.current { - > a, > a:active, > a:visited { - border: 1px solid rgb(221,221,221); - background-color: rgba(255,255,255,0.5); - opacity: 1; - } - } - &.error { - > a, > a:active, > a:visited { - color: #999; - &:hover, &.hover { - color: #e80; - } - } - .hint { - color: #c55; - } - } - .content, ul.content { - list-style: none; - margin: 0; - padding: 0 0 0 24px; - } - } + &:hover, &.hover { + color: #e80; + background-color: rgba(255,255,255,0.5); + opacity: 1; + } + .label { + display: inline-block; + } + .icon { + display: inline-block; + width: 20px; + img { + width: 16px; + height: 16px; + vertical-align: bottom; + } + } + .hint { + display: inline-block; + margin-left: 12px; + font-size: 0.9em; + color: #ccc; + img { + width: 10px; + height: 10px; + vertical-align: baseline; + } + } + } + &.file { + display: none; + } + &.current { + > a, > a:active, > a:visited { + border: 1px solid rgb(221,221,221); + background-color: rgba(255,255,255,0.5); + opacity: 1; + } + } + &.error { + > a, > a:active, > a:visited { + color: #999; + &:hover, &.hover { + color: #e80; + } + } + .hint { + color: #c55; + } + } + .content, ul.content { + list-style: none; + margin: 0; + padding: 0 0 0 24px; + } + } } diff --git a/src/_h5ai/css/main-js.less b/src/_h5ai/css/main-js.less index fee495b4..f72967ff 100644 --- a/src/_h5ai/css/main-js.less +++ b/src/_h5ai/css/main-js.less @@ -1,3 +1,2 @@ @import "inc/main"; - diff --git a/src/_h5ai/css/main-php.less b/src/_h5ai/css/main-php.less index c6f9e34e..5efa7731 100644 --- a/src/_h5ai/css/main-php.less +++ b/src/_h5ai/css/main-php.less @@ -3,15 +3,15 @@ #table { - display: none; + display: none; } #tree, #content > header, #content > footer { - display: block; + display: block; } html.no-js { - #extended.details-view, #extended.icons-view { - display: block; - } + #extended.details-view, #extended.icons-view { + display: block; + } } diff --git a/src/_h5ai/footer.html b/src/_h5ai/footer.html index 2a2a0e40..3f67a409 100644 --- a/src/_h5ai/footer.html +++ b/src/_h5ai/footer.html @@ -1,34 +1,34 @@ - - -
- - -
- - - - + + +
+ + +
+ + + + \ No newline at end of file diff --git a/src/_h5ai/footer.php b/src/_h5ai/footer.php index f1ee8cc3..ee6c2b75 100644 --- a/src/_h5ai/footer.php +++ b/src/_h5ai/footer.php @@ -1,4 +1,4 @@ - - + + diff --git a/src/_h5ai/header.html b/src/_h5ai/header.html index 70aa9621..ab84245f 100644 --- a/src/_h5ai/header.html +++ b/src/_h5ai/header.html @@ -4,28 +4,28 @@ - - - Directory index · styled with h5ai - - - - - - - - + + + Directory index · styled with h5ai + + + + + + + + -
- -
-
-
- +
+ +
+
+
+ diff --git a/src/_h5ai/header.php b/src/_h5ai/header.php index 03ad2cc7..c3c2ef59 100644 --- a/src/_h5ai/header.php +++ b/src/_h5ai/header.php @@ -5,56 +5,56 @@ - - - <?php echo $h5ai->getTitle(); ?> - - - - - - - - + + + <?php echo $h5ai->getTitle(); ?> + + + + + + + + -
- - toHtml(); ?> -
- getHeader(); ?> - toHtml(); ?> - getFooter(); ?> -
-
- - h5ai %BUILD_VERSION% (php) - ⚡ JavaScript is disabled! ⚡ - - - - en - english - - - - - - - folders - · - files - - - - - -
- - - -
- +
+ + toHtml(); ?> +
+ getHeader(); ?> + toHtml(); ?> + getFooter(); ?> +
+
+ + h5ai %BUILD_VERSION% (php) + ⚡ JavaScript is disabled! ⚡ + + + + en - english + + + + + + + folders + · + files + + + + + +
+ + + +
+ diff --git a/src/_h5ai/js/inc/Connector.js b/src/_h5ai/js/inc/Connector.js index 8d0b1d40..ceaa0619 100644 --- a/src/_h5ai/js/inc/Connector.js +++ b/src/_h5ai/js/inc/Connector.js @@ -1,115 +1,115 @@ (function ($, H5AI) { - H5AI.connector = (function () { + H5AI.connector = (function () { - var cache = {}, - pathnameStatusCache = {}, - contentTypeRegEx = /^text\/html;h5ai=/, - getPath = function (folder, tableRow) { + var cache = {}, + pathnameStatusCache = {}, + contentTypeRegEx = /^text\/html;h5ai=/, + getPath = function (folder, tableRow) { - var absHref = H5AI.util.getAbsHref(folder, tableRow), - path = cache[absHref]; + var absHref = H5AI.util.getAbsHref(folder, tableRow), + path = cache[absHref]; - if (!path) { - path = H5AI.Path(folder, tableRow); - if (!path.isParentFolder) { - cache[path.absHref] = path; - } - } + if (!path) { + path = H5AI.Path(folder, tableRow); + if (!path.isParentFolder) { + cache[path.absHref] = path; + } + } - return path; - }, - fetchStatus = function (pathname, callback) { + return path; + }, + fetchStatus = function (pathname, callback) { - if (H5AI.core.settings.folderStatus[pathname]) { - callback(H5AI.core.settings.folderStatus[pathname]); - return; - } else if (pathnameStatusCache[pathname]) { - callback(pathnameStatusCache[pathname]); - return; - } + if (H5AI.core.settings.folderStatus[pathname]) { + callback(H5AI.core.settings.folderStatus[pathname]); + return; + } else if (pathnameStatusCache[pathname]) { + callback(pathnameStatusCache[pathname]); + return; + } - $.ajax({ - url: pathname, - type: "HEAD", - complete: function (xhr) { + $.ajax({ + url: pathname, + type: "HEAD", + complete: function (xhr) { - var status = xhr.status; + var status = xhr.status; - if (status === 200 && contentTypeRegEx.test(xhr.getResponseHeader("Content-Type"))) { - status = "h5ai"; - } - pathnameStatusCache[pathname] = status; - callback(status); - } - }); - }, - updatePath = function (path) { + if (status === 200 && contentTypeRegEx.test(xhr.getResponseHeader("Content-Type"))) { + status = "h5ai"; + } + pathnameStatusCache[pathname] = status; + callback(status); + } + }); + }, + updatePath = function (path) { - if (path.isFolder && !path.isParentFolder && path.status === undefined) { - fetchStatus(path.absHref, function (status) { + if (path.isFolder && !path.isParentFolder && path.status === undefined) { + fetchStatus(path.absHref, function (status) { - if (status !== "h5ai") { - path.status = status; - } - H5AI.html.updateHtml(path); - H5AI.core.linkHoverStates(); - }); - } - }, - updatePaths = function () { + if (status !== "h5ai") { + path.status = status; + } + H5AI.html.updateHtml(path); + H5AI.core.linkHoverStates(); + }); + } + }, + updatePaths = function () { - $.each(cache, function (ref, cached) { - updatePath(cached); - }); - }, - fetchStatusAndContent = function (pathname, includeParent, callback) { + $.each(cache, function (ref, cached) { + updatePath(cached); + }); + }, + fetchStatusAndContent = function (pathname, includeParent, callback) { - fetchStatus(pathname, function (status) { + fetchStatus(pathname, function (status) { - if (status !== "h5ai") { - callback(status, {}); - return; - } + if (status !== "h5ai") { + callback(status, {}); + return; + } - $.ajax({ - url: pathname, - type: "GET", - dataType: "html", - error: function (xhr) { + $.ajax({ + url: pathname, + type: "GET", + dataType: "html", + error: function (xhr) { - callback(xhr.status, {}); // since it was checked before this should never happen - }, - success: function (html, status, xhr) { + callback(xhr.status, {}); // since it was checked before this should never happen + }, + success: function (html, status, xhr) { - var content = {}; + var content = {}; - if (!contentTypeRegEx.test(xhr.getResponseHeader("Content-Type"))) { - callback(xhr.status, {}); // since it was checked before this should never happen - return; - } + if (!contentTypeRegEx.test(xhr.getResponseHeader("Content-Type"))) { + callback(xhr.status, {}); // since it was checked before this should never happen + return; + } - $(html).find("#table td").closest("tr").each(function () { + $(html).find("#table td").closest("tr").each(function () { - var path = getPath(pathname, this); + var path = getPath(pathname, this); - if (path.isFolder && (!path.isParentFolder || includeParent)) { - content[path.absHref] = path; - updatePath(path); - } - }); - callback("h5ai", content); - } - }); - }); - }; + if (path.isFolder && (!path.isParentFolder || includeParent)) { + content[path.absHref] = path; + updatePath(path); + } + }); + callback("h5ai", content); + } + }); + }); + }; - return { - getPath: getPath, - updatePaths: updatePaths, - fetchStatusAndContent: fetchStatusAndContent - }; - }()); + return { + getPath: getPath, + updatePaths: updatePaths, + fetchStatusAndContent: fetchStatusAndContent + }; + }()); }(jQuery, H5AI)); diff --git a/src/_h5ai/js/inc/Core.js b/src/_h5ai/js/inc/Core.js index ed979da3..3790e899 100644 --- a/src/_h5ai/js/inc/Core.js +++ b/src/_h5ai/js/inc/Core.js @@ -1,399 +1,399 @@ (function (window, $, H5AI, config) { - H5AI.core = (function () { + H5AI.core = (function () { - var $window = $(window), - defaults = { - store: { - viewmode: "h5ai.pref.viewmode", - lang: "h5ai.pref.lang" - }, - callbacks: { - pathClick: [] - }, + var $window = $(window), + defaults = { + store: { + viewmode: "h5ai.pref.viewmode", + lang: "h5ai.pref.lang" + }, + callbacks: { + pathClick: [] + }, - rootAbsHref: "/", - h5aiAbsHref: "/_h5ai/", - customHeader: "_h5ai.header.html", - customFooter: "_h5ai.footer.html", + rootAbsHref: "/", + h5aiAbsHref: "/_h5ai/", + customHeader: "_h5ai.header.html", + customFooter: "_h5ai.footer.html", - viewmodes: ["details", "icons"], - sortorder: "na", - showTree: true, - slideTree: true, - folderStatus: {}, - lang: null, - useBrowserLang: true, - setParentFolderLabels: true, - linkHoverStates: true, - dateFormat: "yyyy-MM-dd HH:mm", - showThumbs: false, - zippedDownload: false - }, - settings = $.extend({}, defaults, config.options), - currentDateFormat = settings.dateFormat, - extToFileType = (function (types) { - var map = {}; - $.each(types, function (type, exts) { - $.each(exts, function (idx, ext) { - map[ext] = type; - }); - }); - return map; - }(config.types)), - api = function () { + viewmodes: ["details", "icons"], + sortorder: "na", + showTree: true, + slideTree: true, + folderStatus: {}, + lang: null, + useBrowserLang: true, + setParentFolderLabels: true, + linkHoverStates: true, + dateFormat: "yyyy-MM-dd HH:mm", + showThumbs: false, + zippedDownload: false + }, + settings = $.extend({}, defaults, config.options), + currentDateFormat = settings.dateFormat, + extToFileType = (function (types) { + var map = {}; + $.each(types, function (type, exts) { + $.each(exts, function (idx, ext) { + map[ext] = type; + }); + }); + return map; + }(config.types)), + api = function () { - return settings.h5aiAbsHref + "php/api.php"; - }, - image = function (id) { + return settings.h5aiAbsHref + "php/api.php"; + }, + image = function (id) { - return settings.h5aiAbsHref + "images/" + id + ".png"; - }, - icon = function (id, big) { + return settings.h5aiAbsHref + "images/" + id + ".png"; + }, + icon = function (id, big) { - return settings.h5aiAbsHref + "icons/" + (big ? "48x48" : "16x16") + "/" + id + ".png"; - }, - viewmode = function (viewmode) { + return settings.h5aiAbsHref + "icons/" + (big ? "48x48" : "16x16") + "/" + id + ".png"; + }, + viewmode = function (viewmode) { - var $viewDetails = $("#viewdetails"), - $viewIcons = $("#viewicons"), - $extended = $("#extended"); + var $viewDetails = $("#viewdetails"), + $viewIcons = $("#viewicons"), + $extended = $("#extended"); - if (viewmode) { - amplify.store(settings.store.viewmode, viewmode); - } else { - viewmode = amplify.store(settings.store.viewmode); - } - viewmode = $.inArray(viewmode, settings.viewmodes) >= 0 ? viewmode : settings.viewmodes[0]; + if (viewmode) { + amplify.store(settings.store.viewmode, viewmode); + } else { + viewmode = amplify.store(settings.store.viewmode); + } + viewmode = $.inArray(viewmode, settings.viewmodes) >= 0 ? viewmode : settings.viewmodes[0]; - $viewDetails.add($viewIcons).removeClass("current"); - if (viewmode === "details") { - $viewDetails.addClass("current"); - $extended.addClass("details-view").removeClass("icons-view").show(); - } else if (viewmode === "icons") { - $viewIcons.addClass("current"); - $extended.removeClass("details-view").addClass("icons-view").show(); - } else { - $extended.hide(); - } - }, - initTopSpace = function () { + $viewDetails.add($viewIcons).removeClass("current"); + if (viewmode === "details") { + $viewDetails.addClass("current"); + $extended.addClass("details-view").removeClass("icons-view").show(); + } else if (viewmode === "icons") { + $viewIcons.addClass("current"); + $extended.removeClass("details-view").addClass("icons-view").show(); + } else { + $extended.hide(); + } + }, + initTopSpace = function () { - var $body = $("body"), - $tree = $("#tree"), - adjustTopSpace = function () { + var $body = $("body"), + $tree = $("#tree"), + adjustTopSpace = function () { - var winHeight = $window.height(), - navHeight = $("body > nav").outerHeight(), - footerHeight = $("body > footer").outerHeight(), - contentSpacing = 50, - treeSpacing = 30; + var winHeight = $window.height(), + navHeight = $("body > nav").outerHeight(), + footerHeight = $("body > footer").outerHeight(), + contentSpacing = 50, + treeSpacing = 30; - $body.css({ - "margin-top": navHeight + contentSpacing, - "margin-bottom": footerHeight + contentSpacing - }); + $body.css({ + "margin-top": navHeight + contentSpacing, + "margin-bottom": footerHeight + contentSpacing + }); - $tree.css({ - top: navHeight + treeSpacing, - height: winHeight - navHeight - footerHeight - 18 - 2 * treeSpacing - }); + $tree.css({ + top: navHeight + treeSpacing, + height: winHeight - navHeight - footerHeight - 18 - 2 * treeSpacing + }); - try { - $tree.get(0).updateScrollbar(); - } catch (err) {} - }; + try { + $tree.get(0).updateScrollbar(); + } catch (err) {} + }; - $window.resize(function () { - adjustTopSpace(); - }); - adjustTopSpace(); - }, - initViews = function () { + $window.resize(function () { + adjustTopSpace(); + }); + adjustTopSpace(); + }, + initViews = function () { - var $navbar = $("#navbar"), - $extended = $("#extended"); + var $navbar = $("#navbar"), + $extended = $("#extended"); - $("#table").remove(); + $("#table").remove(); - if (settings.viewmodes.length > 1) { - if ($.inArray("icons", settings.viewmodes) >= 0) { - $("
  • view-iconsicons
  • ") - .find("img").attr("src", image("view-icons")).end() - .click(function () { viewmode("icons"); }) - .appendTo($navbar); - } - if ($.inArray("details", settings.viewmodes) >= 0) { - $("
  • view-detailsdetails
  • ") - .find("img").attr("src", image("view-details")).end() - .click(function () { viewmode("details"); }) - .appendTo($navbar); - } - } + if (settings.viewmodes.length > 1) { + if ($.inArray("icons", settings.viewmodes) >= 0) { + $("
  • view-iconsicons
  • ") + .find("img").attr("src", image("view-icons")).end() + .click(function () { viewmode("icons"); }) + .appendTo($navbar); + } + if ($.inArray("details", settings.viewmodes) >= 0) { + $("
  • view-detailsdetails
  • ") + .find("img").attr("src", image("view-details")).end() + .click(function () { viewmode("details"); }) + .appendTo($navbar); + } + } - // status update - $extended.find(".entry a").hover( - function () { - if ($extended.hasClass("icons-view")) { - var $this = $(this); - $(".status.default").hide(); - $(".status.dynamic") - .empty() - .append($this.find(".label").clone()) - .append($("·")) - .append($this.find(".date").clone()) - .show(); + // status update + $extended.find(".entry a").hover( + function () { + if ($extended.hasClass("icons-view")) { + var $this = $(this); + $(".status.default").hide(); + $(".status.dynamic") + .empty() + .append($this.find(".label").clone()) + .append($("·")) + .append($this.find(".date").clone()) + .show(); - if (!$this.closest(".entry").hasClass("folder")) { - $(".status.dynamic") - .append($("·")) - .append($this.find(".size").clone()); - } - } - }, - function () { - $(".status.default").show(); - $(".status.dynamic").empty().hide(); - } - ); - }, - shiftTree = function (forceVisible, dontAnimate) { + if (!$this.closest(".entry").hasClass("folder")) { + $(".status.dynamic") + .append($("·")) + .append($this.find(".size").clone()); + } + } + }, + function () { + $(".status.default").show(); + $(".status.dynamic").empty().hide(); + } + ); + }, + shiftTree = function (forceVisible, dontAnimate) { - var $tree = $("#tree"), - $extended = $("#extended"); + var $tree = $("#tree"), + $extended = $("#extended"); - if ((settings.slideTree && $tree.outerWidth() < $extended.offset().left) || forceVisible) { - if (dontAnimate) { - $tree.stop().css({ left: 0 }); - } else { - $tree.stop().animate({ left: 0 }); - } - } else { - if (dontAnimate) { - $tree.stop().css({ left: 18 - $tree.outerWidth() }); - } else { - $tree.stop().animate({ left: 18 - $tree.outerWidth() }); - } - } - }, - initTree = function () { + if ((settings.slideTree && $tree.outerWidth() < $extended.offset().left) || forceVisible) { + if (dontAnimate) { + $tree.stop().css({ left: 0 }); + } else { + $tree.stop().animate({ left: 0 }); + } + } else { + if (dontAnimate) { + $tree.stop().css({ left: 18 - $tree.outerWidth() }); + } else { + $tree.stop().animate({ left: 18 - $tree.outerWidth() }); + } + } + }, + initTree = function () { - $("#tree").hover( - function () { shiftTree(true); }, - function () { shiftTree(); } - ); - $window.resize(function () { shiftTree(); }); - shiftTree(false, true); - }, - selectLinks = function (href) { + $("#tree").hover( + function () { shiftTree(true); }, + function () { shiftTree(); } + ); + $window.resize(function () { shiftTree(); }); + shiftTree(false, true); + }, + selectLinks = function (href) { - var elements = []; - $("a[href^='/']").each(function () { + var elements = []; + $("a[href^='/']").each(function () { - if ($(this).attr("href") === href) { - elements.push(this); - } - }); - return $(elements); - }, - linkHoverStates = function () { + if ($(this).attr("href") === href) { + elements.push(this); + } + }); + return $(elements); + }, + linkHoverStates = function () { - if (settings.linkHoverStates) { - $("a[href^='/']:not(.linkedHoverStates)").each(function () { + if (settings.linkHoverStates) { + $("a[href^='/']:not(.linkedHoverStates)").each(function () { - var $a = $(this).addClass("linkedHoverStates"), - href = $a.attr("href"); + var $a = $(this).addClass("linkedHoverStates"), + href = $a.attr("href"); - $a.hover( - function () { selectLinks(href).addClass("hover"); }, - function () { selectLinks(href).removeClass("hover"); } - ); - }); - } - }, - formatDates = function (dateFormat) { + $a.hover( + function () { selectLinks(href).addClass("hover"); }, + function () { selectLinks(href).removeClass("hover"); } + ); + }); + } + }, + formatDates = function (dateFormat) { - if (dateFormat) { - currentDateFormat = dateFormat; - } + if (dateFormat) { + currentDateFormat = dateFormat; + } - $("#extended .entry .date").each(function () { + $("#extended .entry .date").each(function () { - var $this = $(this), - time = $this.data("time"), - formattedDate = time ? new Date(time).toString(currentDateFormat) : ""; + var $this = $(this), + time = $this.data("time"), + formattedDate = time ? new Date(time).toString(currentDateFormat) : ""; - $this.text(formattedDate); - }); - }, - localize = function (langs, lang, useBrowserLang) { + $this.text(formattedDate); + }); + }, + localize = function (langs, lang, useBrowserLang) { - var storedLang = amplify.store(settings.store.lang), - browserLang, selected, key; + var storedLang = amplify.store(settings.store.lang), + browserLang, selected, key; - if (langs[storedLang]) { - lang = storedLang; - } else if (useBrowserLang) { - browserLang = navigator.language; - if (langs[browserLang]) { - lang = browserLang; - } else if (browserLang.length > 2 && langs[browserLang.substr(0, 2)]) { - lang = browserLang.substr(0, 2); - } - } + if (langs[storedLang]) { + lang = storedLang; + } else if (useBrowserLang) { + browserLang = navigator.language; + if (langs[browserLang]) { + lang = browserLang; + } else if (browserLang.length > 2 && langs[browserLang.substr(0, 2)]) { + lang = browserLang.substr(0, 2); + } + } - if (!langs[lang]) { - lang = "en"; - } + if (!langs[lang]) { + lang = "en"; + } - selected = langs[lang]; - if (selected) { - $.each(selected, function (key, value) { - $(".l10n-" + key).text(value); - }); - $(".lang").text(lang); - $(".langOption").removeClass("current"); - $(".langOption." + lang).addClass("current"); - } + selected = langs[lang]; + if (selected) { + $.each(selected, function (key, value) { + $(".l10n-" + key).text(value); + }); + $(".lang").text(lang); + $(".langOption").removeClass("current"); + $(".langOption." + lang).addClass("current"); + } - formatDates(selected.dateFormat || settings.dateFormat); - }, - initLangSelector = function (langs) { + formatDates(selected.dateFormat || settings.dateFormat); + }, + initLangSelector = function (langs) { - var $langOptions = $("#langSelector .langOptions"), - sortedLangsKeys = [], - $ul; + var $langOptions = $("#langSelector .langOptions"), + sortedLangsKeys = [], + $ul; - $.each(langs, function (lang) { - sortedLangsKeys.push(lang); - }); - sortedLangsKeys.sort(); + $.each(langs, function (lang) { + sortedLangsKeys.push(lang); + }); + sortedLangsKeys.sort(); - $ul = $("