Merge branch 'develop'

This commit is contained in:
Lars Jung 2012-08-06 19:24:04 +02:00
commit bc945895cf
127 changed files with 8568 additions and 2987 deletions

18
.gitignore vendored
View File

@ -1,20 +1,6 @@
# Build folders to ignore
build
build.local.*
release
# Sublime
local
*.sublime-*
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache
test

238
README.md
View File

@ -2,33 +2,67 @@
Please don't use files from the `src` folder for installation.
They need to be preprocessed to work correctly. You'll find a preprocessed
package on the [project page](http://larsjung.de/h5ai).
package on the [project page](http://larsjung.de/h5ai/).
To report a bug or make a feature request
please create [a new issue](http://github.com/lrsjng/h5ai/issues/new).
* Website with download, docs and demo: <http://larsjung.de/h5ai>
* Sources: <http://github.com/lrsjng/h5ai>
* to report a bug or make a feature request please create [a new issue](http://github.com/lrsjng/h5ai/issues/new) on GitHub
* website with download, docs and demo: <http://larsjung.de/h5ai>
* sources: <http://github.com/lrsjng/h5ai>
h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h5ai/blob/master/LICENSE.txt).
It profits from these great projects:
[AmplifyJS](http://amplifyjs.com)&nbsp;(MIT/GPL),
[Faenza icon set](http://tiheum.deviantart.com/art/Faenza-Icons-173323228)&nbsp;(GPL),
[HTML5 ★ Boilerplate](http://html5boilerplate.com),
[jQuery](http://jquery.com)&nbsp;(MIT/GPL),
[jQuery.fracs](http://larsjung.de/fracs/)&nbsp;(MIT),
[jQuery.mousewheel](http://github.com/brandonaaron/jquery-mousewheel)&nbsp;(MIT),
[jQuery.qrcode](http://larsjung.de/qrcode/)&nbsp;(MIT),
[jQuery.scrollpanel](http://larsjung.de/scrollpanel/)&nbsp;(MIT),
[markdown-js](http://github.com/evilstreak/markdown-js)&nbsp;(MIT),
[Modernizr](http://www.modernizr.com)&nbsp;(MIT/BSD),
[modulejs](http://larsjung.de/modulejs/)&nbsp;(MIT),
[Moment.js](http://momentjs.com)&nbsp;(MIT),
[SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/)&nbsp;(MIT/GPL),
[Underscore.js](http://underscorejs.org)&nbsp;(MIT)
## h5ai profits from these great projects
## Build
A prebuilt package can be found on the [project page](http://larsjung.de/h5ai/). If you want to build
h5ai yourself you need to install [fQuery](http://larsjung.de/fquery/) first:
> npm install -g fquery
To build the project run the following command inside the project's root directory
> makejs
Run `makejs -t` to list all possible targets.
* [AmplifyJS](http://amplifyjs.com) (MIT/GPL)
* [Faenza icon set](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) (GPL)
* [HTML5 ★ Boilerplate](http://html5boilerplate.com)
* [jQuery](http://jquery.com) (MIT/GPL)
* [jQuery.fracs](http://larsjung.de/fracs) (MIT)
* [jQuery.mousewheel](http://github.com/brandonaaron/jquery-mousewheel) (MIT)
* [modernizr](http://www.modernizr.com) (MIT/BSD)
* [Moment.js](http://momentjs.com) (MIT)
* [qrcode](http://www.d-project.com/qrcode/index.html) (MIT)
* [underscore.js](http://underscorejs.org) (MIT)
## Changelog
### v0.21 - *2012-08-??*
* 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](http://github.com/evilstreak/markdown-js)
* adds new type `markdown`
* changes language code `gr` to `el`
* adds localization for filter placeholder
* adds `hu` translation by [Rodolffo](http://github.com/Rodolffo)
* 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*
@ -60,12 +94,12 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h
* switches from [Datejs](http://www.datejs.com) to [Moment.js](http://momentjs.com)
* adds [underscore.js](http://underscorejs.org)
* fixes mousewheel problems, updates [jQuery.mousewheel](http://github.com/brandonaaron/jquery-mousewheel) to 3.0.6
* updates lv translation
* adds ro translation by [Jakob Cosoroabă](http://github.com/midday)
* adds ja translation by [metasta](http://github.com/metasta)
* adds nb translation by [Sindre Sorhus](http://github.com/sindresorhus)
* adds sr translation by [vBm](http://github.com/vBm)
* adds gr translation by [xhmikosr](http://github.com/xhmikosr)
* updates `lv` translation
* adds `ro` translation by [Jakob Cosoroabă](http://github.com/midday)
* adds `ja` translation by [metasta](http://github.com/metasta)
* adds `nb` translation by [Sindre Sorhus](http://github.com/sindresorhus)
* adds `sr` translation by [vBm](http://github.com/vBm)
* adds `gr` translation by [xhmikosr](http://github.com/xhmikosr)
### v0.18 - *2012-02-24*
@ -85,8 +119,8 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h
* improves url hashes
* updates year in `LICENSE.TXT`
* updates es translation
* adds zh-tw translation by [Yao Wei](http://github.com/medicalwei)
* updates zh-cn translation
* adds `zh-tw` translation by [Yao Wei](http://github.com/medicalwei)
* updates `zh-cn` translation
### v0.17 - *2011-11-28*
@ -121,33 +155,33 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h
### v0.15.2 - *2011-09-18*
* added it translation by [Salvo Gentile](http://github.com/SalvoGentile) and [Marco Patriarca](http://github.com/Fexys)
* switched build process from scripp to wepp
* adds `it` translation by [Salvo Gentile](http://github.com/SalvoGentile) and [Marco Patriarca](http://github.com/Fexys)
* switches build process from scripp to wepp
### v0.15.1 - *2011-09-06*
* fixed security issues with the zipped download feature
* made zipped download optional (but enabled by default)
* fixes security issues with the zipped download feature
* makes zipped download optional (but enabled by default)
### v0.15 - *2011-09-04*
* added zipped download for selected files
* cleaned and refactored
* adds zipped download for selected files
* cleans and refactores
### v0.14.1 - *2011-09-01*
* display meta information in bottom bar (icon view)
* added zh-cn translation by [Dongsheng Cai](http://github.com/dongsheng)
* added pl translation by Radosław Zając
* added ru translation by Богдан Илюхин
* adds `zh-cn` translation by [Dongsheng Cai](http://github.com/dongsheng)
* adds `pl` translation by Radosław Zając
* adds `ru` translation by Богдан Илюхин
### v0.14 - *2011-08-16*
* added image thumbnails for PHP version
* adds image thumbnails for PHP version
* new option `slideTree` to turn off auto slide in
@ -158,180 +192,178 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h
### v0.13.1 - *2011-08-12*
* ~~hopefully fixed that PHP doesn't get interpreted~~ :/
* fixed initial tree display
* added sort order option
* added/fixed some translations
* added lv translation by Sandis Veinbergs
* fixes initial tree display
* adds sort order option
* adds/fixes some translations
* adds `lv` translation by Sandis Veinbergs
### v0.13 - *2011-08-06*
* added PHP implementation! (should work with PHP 5.2+)
* added new options
* changed layout of the bottom bar to display status information
* added language selector to the bottom bar
* quoted keys in `options.js` to make it valid json
* changed value of option `lang` from `undefined` to `null`
* added some new keys to `h5aiLangs`
* added browser caching rules for css and js
* added pt translation by [Jonnathan](http://github.com/jonnsl)
* added bg translation by George Andonov
* 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](http://github.com/jonnsl)
* adds `bg` translation by George Andonov
### v0.12.3 - *2011-07-30*
* added tr translation by [Batuhan Icoz](http://github.com/batuhanicoz)
* adds `tr` translation by [Batuhan Icoz](http://github.com/batuhanicoz)
### v0.12.2 - *2011-07-30*
* added es translation by Jose David Calderon Serrano
* adds `es` translation by Jose David Calderon Serrano
### v0.12.1 - *2011-07-29*
* fixed unchecked use of console.log
* fixes unchecked use of console.log
### v0.12 - *2011-07-28*
* improved performance
* improves performance
### v0.11 - *2011-07-27*
* changed license to MIT license, see `LICENSE.txt`
* changes license to MIT license, see `LICENSE.txt`
### v0.10.2 - *2011-07-26*
* improved tree scrollbar
* improves tree scrollbar
### v0.10.1 - *2011-07-24*
* fixed problems with ' in links
* fixes problems with ' in links
### v0.10 - *2011-07-24*
* fixed problems with XAMPP on Windows (see `dot.htaccess` comments for instructions)
* fixed tree fade-in-fade-out effect for small displays ([issue #6](http://github.com/lrsjng/h5ai/issues/6))
* added custom scrollbar to tree ([issue #6](http://github.com/lrsjng/h5ai/issues/6))
* fixed broken links caused by URI encoding/decoding ([issue #9](http://github.com/lrsjng/h5ai/issues/9))
* added "empty" to localization (hope Google Translate did a good job here)
* fixes problems with XAMPP on Windows (see `dot.htaccess` comments for instructions)
* fixes tree fade-in-fade-out effect for small displays ([issue #6](http://github.com/lrsjng/h5ai/issues/6))
* adds custom scrollbar to tree ([issue #6](http://github.com/lrsjng/h5ai/issues/6))
* fixes broken links caused by URI encoding/decoding ([issue #9](http://github.com/lrsjng/h5ai/issues/9))
* adds "empty" to localization (hope Google Translate did a good job here)
### v0.9 - *2011-07-18*
* linked hover states between crumb, extended view and tree
* fixed size of tree view (now there's a ugly scrollbar, hopefully will be fixed)
* refactored js to improve performance and cleaned code
* added caching for folder status codes and content
* added fr translation by [Nicolas](http://github.com/Nicosmos)
* added nl translation by [Stefan de Konink](http://github.com/skinkie)
* added sv translation by Oscar Carlsson
* 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](http://github.com/Nicosmos)
* adds `nl` translation by [Stefan de Konink](http://github.com/skinkie)
* adds `sv` translation by Oscar Carlsson
### v0.8 - *2011-07-08*
* removed slashes from folder labels
* 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
* refactored js a lot (again...)
* refactores js a lot (again...)
### v0.7 - *2011-07-07*
* removed shadows
* removes shadows
* smarter tree side bar
### v0.6 - *2011-07-05*
* refactored js
* added localization, see `options.js`
* refactores js
* adds localization, see `options.js`
### v0.5.3 - *2011-07-04*
* refactored js
* added basic options support via `options.js`
* commented `options.js`
* optional tree sidebar
* 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
* linked icon for *.gz and *.bz2
* links icon for *.gz and *.bz2
### v0.5.1 - *2011-07-01*
* disabled tree sidebar for now, since it had unwanted side effects
* disables tree sidebar for now, since it had unwanted side effects
### v0.5 - *2011-07-01*
* added tree sidebar
* adds tree sidebar
* some refactorings
### v0.4 - *2011-06-27*
* added better fallback, in case JavaScript is disabled
* rewrote js, fixed middle-button click etc. problems
* refactored css
* sorted, added and moved icons and images
* updated dot.access
* 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*
* removed lib versions from file names
* added 'empty' indicator for icons view
* removes lib versions from file names
* adds 'empty' indicator for icons view
### v0.3.1 - *2011-06-24*
* refactored js
* added `folderClick` and `fileClick` callback hooks
* fixed .emtpy style
* refactores js
* adds `folderClick` and `fileClick` callback hooks
* fixes .emtpy style
### v0.3 - *2011-06-23*
* included build stuff, files previously found in the base directory are now located in folder `target`
* includes build stuff, files previously found in the base directory are now located in folder `target`
* styles and scripts are now minified
* added Modernizr 2.0.4 for future use
* updated jQuery to version 1.6.1
* 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
* ~~added custom js support, and global includes~~ *removed, only custom top and bottom sections supported*
### v0.2.2 - *2011-06-16*
* refactored a lot, added some comments
* included fixes from [NumEricR](http://github.com/NumEricR)
* added top/bottom message support, only basicly styled
* refactores a lot, adds some comments
* includes fixes from [NumEricR](http://github.com/NumEricR)
* adds top/bottom message support, only basicly styled
### v0.2.1 - *2011-06-16*
* fixed croped filenames
* fixed missing .png extension in header
* added some color to the links
* added changelog
* fixes croped filenames
* fixes missing .png extension in header
* adds some color to the links
* adds changelog
### v0.2 - *2011-06-15*
* added icon view
* adds icon view

View File

@ -1,15 +0,0 @@
# project
project.name = h5ai
project.version = 0.20
# src
src.dir = src
# build
build.dir = build
release.dir = release
# tools
tool.wepp = wepp
tool.jshint = jshint

114
build.xml
View File

@ -1,114 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<project
name="h5ai"
basedir="."
default="release"
>
<target name="init">
<property file="build.properties" />
<tstamp>
<format property="build.stamp" pattern="yyyy-MM-dd-HHmmss" />
</tstamp>
<property name="build.label" value="${project.name} ${project.version} b${build.stamp}" />
<echo>Build: ${build.label}</echo>
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<delete dir="${release.dir}" />
</target>
<target name="build-prepare" depends="clean">
<mkdir dir="${build.dir}" />
<copy todir="${build.dir}">
<fileset dir="${src.dir}" />
<fileset file="LICENSE.txt" />
<fileset file="README.md" />
</copy>
<replace dir="${build.dir}">
<replacefilter token="%BUILD%" value="${build.label}" />
<replacefilter token="%BUILD_NAME%" value="${project.name}" />
<replacefilter token="%BUILD_VERSION%" value="${project.version}" />
<replacefilter token="%BUILD_STAMP%" value="${build.stamp}" />
</replace>
</target>
<target name="build" depends="build-prepare">
<wepp-dir-min dir="${build.dir}/_h5ai/css" todir="${build.dir}/_h5ai/css" />
<wepp-dir-min dir="${build.dir}/_h5ai/js" todir="${build.dir}/_h5ai/js" />
</target>
<target name="build-uncompressed" depends="build-prepare">
<wepp-dir dir="${build.dir}/_h5ai/css" todir="${build.dir}/_h5ai/css" />
<wepp-dir dir="${build.dir}/_h5ai/js" todir="${build.dir}/_h5ai/js" />
</target>
<target name="release" depends="build">
<mkdir dir="${release.dir}" />
<zip destfile="${release.dir}/${project.name}-${project.version}.zip" basedir="${build.dir}" />
</target>
<target name="jshint" depends="init">
<apply executable="${tool.jshint}" verbose="true" parallel="true">
<srcfile />
<arg line="--config jshint.json" />
<arg line="--show-non-errors" />
<fileset dir="${src.dir}/_h5ai/js/inc">
<patternset>
<include name="**/*.js" />
<exclude name="lib/**/*" />
</patternset>
</fileset>
</apply>
</target>
<macrodef name="wepp-args">
<attribute name="args" default="" />
<sequential>
<exec executable="${tool.wepp}" failonerror="true">
<arg line="@{args}" />
</exec>
</sequential>
</macrodef>
<macrodef name="wepp">
<attribute name="file" />
<attribute name="tofile" />
<sequential>
<wepp-args args="--nc --inFile '@{file}' --outFile '@{toFile}'" />
</sequential>
</macrodef>
<macrodef name="wepp-min">
<attribute name="file" />
<attribute name="tofile" />
<sequential>
<wepp-args args="--inFile '@{file}' --outFile '@{toFile}'" />
</sequential>
</macrodef>
<macrodef name="wepp-dir">
<attribute name="dir" />
<attribute name="todir" />
<sequential>
<wepp-args args="--nc --inDir '@{dir}' --outDir '@{todir}'" />
<delete dir="@{todir}/inc" >
<fileset dir="." includes="@{todir}/**/*.less" />
</delete>
</sequential>
</macrodef>
<macrodef name="wepp-dir-min">
<attribute name="dir" />
<attribute name="todir" />
<sequential>
<wepp-args args="--inDir '@{dir}' --outDir '@{todir}'" />
<delete dir="@{todir}/inc" >
<fileset dir="." includes="@{todir}/**/*.less" />
</delete>
</sequential>
</macrodef>
</project>

View File

@ -1,28 +0,0 @@
{
// Enforcing Options
"bitwise": true,
"curly": true,
"eqeqeq": true,
"forin": true,
"latedef": true,
"newcap": true,
"noempty": true,
"plusplus": true,
"trailing": true,
"undef": true,
// Environments
"browser": true,
// Globals
"predef": [
"amplify",
"Base64",
"H5AI_CONFIG",
"jQuery",
"Modernizr",
"module",
"moment",
"_"
]
}

185
makefile.js Normal file
View File

@ -0,0 +1,185 @@
/*jshint node: true */
'use strict';
var path = require('path'),
child_process = require('child_process');
var version = '0.21-dev-46',
root = path.resolve(__dirname),
src = path.join(root, 'src'),
build = path.join(root, 'build'),
jshint = {
// Enforcing Options
bitwise: true,
curly: true,
eqeqeq: true,
forin: true,
latedef: true,
newcap: true,
noempty: true,
plusplus: true,
trailing: true,
undef: true,
// Environments
browser: true,
// Globals
predef: [
'modulejs'
]
},
mapper = function (blob) {
return blob.source.replace(src, build).replace(/\.less$/, '.css');
},
mapperRoot = function (blob) {
return blob.source.replace(root, build + '/_h5ai');
};
module.exports = function (make) {
var Event = make.Event,
$ = make.fQuery,
moment = make.moment,
stamp, replacements;
make.defaults('build');
make.before(function () {
stamp = moment();
replacements = {
version: version,
stamp: stamp.format('YYYY-MM-DD HH:mm:ss')
};
Event.info({ method: 'before', message: version + ' ' + replacements.stamp });
});
make.target('inc', [], 'increase build number, if any')
.sync(function () {
var re = /-(\d+)$/;
var match = version.match(re);
if (match) {
var number = parseInt(match[1], 10) + 1;
var newVersion = version.replace(re, '-' + number);
$('makefile.js').replace([[version, newVersion]]).write($.OVERWRITE, 'makefile.js');
version = newVersion;
replacements.version = version;
Event.ok({ method: 'inc', message: 'version is now ' + version });
}
});
make.target('clean', [], 'delete build folder')
.sync(function () {
$.rmfr($.I_AM_SURE, build);
});
make.target('lint', [], 'lint all JavaScript files with JSHint')
.sync(function () {
$(src + '/_h5ai/js: **/*.js, ! *.min.js, ! inc/lib/**')
.jshint(jshint);
});
make.target('build', [], 'build all updated files')
.sync(function () {
$(src + ': _h5ai/js/*.js')
.modified(mapper, $(src + ': _h5ai/js/**'))
.includify()
.uglifyjs()
.write($.OVERWRITE, mapper);
$(src + ': _h5ai/css/*.less')
.modified(mapper, $(src + ': _h5ai/css/**'))
.less()
.cssmin()
.write($.OVERWRITE, mapper);
$(src + ': **, ! _h5ai/js/**, ! _h5ai/css/**')
.modified(mapper)
.mustache(replacements)
.write($.OVERWRITE, mapper);
$(root + ': README*, LICENSE*')
.modified(mapperRoot)
.write($.OVERWRITE, mapperRoot);
});
make.target('build-uncompressed', [], 'build all updated files without compression')
.sync(function () {
$(src + ': _h5ai/js/*.js')
.modified(mapper, $(src + ': _h5ai/js/**'))
.includify()
// .uglifyjs()
.write($.OVERWRITE, mapper);
$(src + ': _h5ai/css/*.less')
.modified(mapper, $(src + ': _h5ai/css/**'))
.less()
// .cssmin()
.write($.OVERWRITE, mapper);
$(src + ': **, ! _h5ai/js/**, ! _h5ai/css/**')
.modified(mapper)
.mustache(replacements)
.write($.OVERWRITE, mapper);
$(root + ': README*, LICENSE*')
.modified(mapperRoot)
.write($.OVERWRITE, mapperRoot);
});
make.target('release', ['inc', 'clean', 'build'], 'create a zipball')
.async(function (done, fail) {
var target = path.join(build, 'h5ai-' + version + '.zip'),
cmd = 'zip',
args = ['-ro', target, '_h5ai'],
options = { cwd: build },
proc = child_process.spawn(cmd, args, options);
Event.info({ method: 'exec', message: cmd + ' ' + args.join(' ') });
// proc.stdout.on('data', function (data) {
// process.stdout.write(data);
// });
proc.stderr.on('data', function (data) {
process.stderr.write(data);
});
proc.on('exit', function (code) {
if (code) {
Event.error({ method: 'exec', message: cmd + ' exit code ' + code });
fail();
} else {
Event.ok({ method: 'exec', message: 'created zipball ' + target });
done();
}
});
});
};

View File

@ -1,5 +1,5 @@
################################
# h5ai %BUILD_VERSION%
# h5ai {{version}}
# customized .htaccess
################################
@ -19,5 +19,5 @@ IndexOptions NameWidth=*
IndexOptions SuppressDescription
IndexOptions SuppressHTMLPreamble
IndexOptions SuppressRules
IndexOptions Type=text/html;h5ai=%BUILD_VERSION%
IndexOptions Type=text/html;h5ai={{version}}
IndexOptions XHTML

View File

@ -1,4 +1,6 @@
<!-- generated code ends here -->
</div>
<script src="/_h5ai/config.js"></script>
<script src="/_h5ai/js/scripts.js"></script>
</body>
</html>

View File

@ -8,12 +8,12 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Directory index · styled with h5ai</title>
<meta name="description" content="Directory index styled with h5ai (http://larsjung.de/h5ai)">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" type="image/png" href="/_h5ai/images/h5ai-16x16.png">
<link rel="apple-touch-icon" type="image/png" href="/_h5ai/images/h5ai-48x48.png">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic,700italic|Ubuntu:400,700,400italic,700italic">
<link rel="stylesheet" href="/_h5ai/css/styles.css">
<script src="/_h5ai/js/modernizr-2.5.3.min.js"></script>
<script src="/_h5ai/js/modernizr.js"></script>
</head>
<body id="h5ai-main">
<div id="topbar" class="clearfix">
@ -24,17 +24,13 @@
</div>
<div id="bottombar" class="clearfix">
<span class="left">
<a id="h5ai-reference" href="http://larsjung.de/h5ai" title="h5ai project page">h5ai %BUILD_VERSION%</a>
<a id="h5ai-reference" href="http://larsjung.de/h5ai" title="h5ai project page">h5ai {{version}}</a>
<span class="hideOnJs noJsMsg"> ⚡ JavaScript is disabled! ⚡ </span>
<span class="oldBrowser"> ⚡ Some features disabled! Works best in <a href="http://browsehappy.com">modern browsers</a>. ⚡ </span>
</span>
<span class="right"></span>
<span class="center"></span>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/_h5ai/js/jquery-1.7.2.min.js"><\/script>')</script>
<script src="/_h5ai/config.js"></script>
<script src="/_h5ai/js/scripts.js"></script>
<div id="data-apache-autoindex" class="hideOnJs">
<!--
The following code was generated by Apache's autoindex module. It is not valid HTML5, but gets

View File

@ -1,5 +1,5 @@
/*
* h5ai %BUILD_VERSION%
* h5ai {{version}}
*
* Configuration
* options, types and localization
@ -63,7 +63,7 @@ var H5AI_CONFIG = {
* in each folder.
*/
"custom": {
"enabled": false,
"enabled": true,
"header": "_h5ai.header.html",
"footer": "_h5ai.footer.html"
},
@ -84,7 +84,11 @@ var H5AI_CONFIG = {
/*
* Allow filtering the displayed files and folders.
* Note: filters will be treated as JavaScript regular expressions
* Will check entries for right order of characters, i.e.
* "ab" matches "ab", "axb", "xaxbx" but not "ba".
* Space separated sequences get OR-ed.
*
* Filters will be treated as JavaScript regular expressions
* if you prefix them with "re:".
*/
"filter": {
@ -97,7 +101,7 @@ var H5AI_CONFIG = {
* Depends on du.
*/
"foldersize": {
"enabled": false
"enabled": true
},
/*
@ -111,10 +115,28 @@ var H5AI_CONFIG = {
* appropriate default index file.
*/
"folderstatus": {
"enabled": false,
"enabled": true,
"folders": {}
},
/*
* Adds Google Analytics asynchronous tracking code.
*
* for example:
* "gaq": [
* ["_setAccount", "UA-xxxxxx-x"],
* ["_setDomainName", ".your-domain.tld"],
* ["_trackPageview"],
* ["_trackPageLoadTime"]
* ]
*
* see: http://support.google.com/googleanalytics/bin/topic.py?hl=en&topic=27612
*/
"google-analytics": {
"enabled": true,
"gaq": []
},
/*
* Localization, for example "en", "de" etc. - see "langs" below for
* possible values. Adjust it to your needs. If lang is not found in
@ -156,11 +178,45 @@ var H5AI_CONFIG = {
"types": ["bmp", "gif", "ico", "image", "jpg", "png", "tiff"]
},
/*
* Show text file preview on click.
* "types" maps file types to SyntaxHighligher brushes. Special case: "markdown" will
* be rendered as HTML.
*
* For available brushes see http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/
*/
"preview-txt": {
"enabled": true,
"types": {
"authors": "plain",
"copying": "plain",
"c": "c",
"cpp": "cpp",
"css": "css",
"h": "c",
"hpp": "cpp",
"install": "plain",
"log": "plain",
"java": "java",
"makefile": "xml",
"markdown": "plain",
"php": "php",
"python": "python",
"readme": "plain",
"rb": "ruby",
"rtf": "plain",
"script": "shell",
"text": "plain",
"js": "js",
"xml": "xml"
}
},
/*
* Show QRCodes on hovering files.
*/
"qrcode": {
"enabled": false,
"enabled": true,
"size": 150
},
@ -198,11 +254,11 @@ var H5AI_CONFIG = {
* - doc thumbnails depend on convert
*/
"thumbnails": {
"enabled": false,
"enabled": true,
"img": ["bmp", "gif", "ico", "image", "jpg", "png", "tiff"],
"mov": ["video"],
"doc": ["pdf", "ps"],
"delay": 1000
"delay": 1
},
/*
@ -268,6 +324,7 @@ var H5AI_CONFIG = {
"js": [".js", ".json"],
"log": [".log", "changelog"],
"makefile": [".pom", "build.xml", "pom.xml"],
"markdown": [".markdown", ".md"],
"package": [],
"pdf": [".pdf"],
"php": [".php"],
@ -288,7 +345,7 @@ var H5AI_CONFIG = {
"sql": [],
"tar": [".tar"],
"tex": [".tex"],
"text": [".diff", ".markdown", ".md", ".patch", ".text", ".txt"],
"text": [".diff", ".patch", ".text", ".txt"],
"tiff": [".tiff"],
"unknown": [],
"vcal": [".vcal"],
@ -319,7 +376,8 @@ var H5AI_CONFIG = {
"files": "files",
"download": "download",
"noMatch": "no match",
"dateFormat": "YYYY-MM-DD HH:mm"
"dateFormat": "YYYY-MM-DD HH:mm",
"filter": "filter"
},
"bg": {
@ -361,7 +419,24 @@ var H5AI_CONFIG = {
"files": "Dateien",
"download": "Download",
"noMatch": "keine Treffer",
"dateFormat": "DD.MM.YYYY HH:mm"
"dateFormat": "DD.MM.YYYY HH:mm",
"filter": "Filter"
},
"el": {
"lang": "ελληνικά",
"details": "λεπτομέρειες",
"icons": "εικονίδια",
"name": "Όνομα",
"lastModified": "Τελευταία τροποποίηση",
"size": "Μέγεθος",
"parentDirectory": "Προηγούμενος Κατάλογος",
"empty": "κενό",
"folders": "φάκελοι",
"files": "αρχεία",
"download": "μεταμόρφωση",
"noMatch": "κανένα αποτέλεσμα",
"dateFormat": "DD/MM/YYYY HH:mm"
},
"es": {
@ -390,22 +465,24 @@ var H5AI_CONFIG = {
"folders": "Répertoires",
"files": "Fichiers",
"download": "télécharger",
"noMatch": "rien trouvé"
"noMatch": "rien trouvé",
"dateFormat": "DD/MM/YYYY HH:mm"
},
"gr": {
"lang": "ελληνικά",
"details": "Λεπτομέρειες",
"icons": "Εικονίδια",
"name": "Όνομα",
"lastModified": "Τελευταία Τροποποίηση",
"size": "Μέγεθος",
"parentDirectory": "Προηγούμενος Κατάλογος",
"empty": "κενό",
"folders": "Φάκελοι",
"files": "Αρχεία",
"download": "Μεταμόρφωση",
"noMatch": "Κανένα Ταίριασμα"
"hu": {
"lang": "magyar",
"details": "részletek",
"icons": "ikonok",
"name": "Név",
"lastModified": "Utoljára módosítva",
"size": "Méret",
"parentDirectory": "Szülő könyvtár",
"empty": "üres",
"folders": "mappák",
"files": "fájlok",
"download": "letöltés",
"noMatch": "nincs találat",
"dateFormat": "YYYY-MM-DD HH:mm"
},
"it": {

View File

@ -1,6 +1,6 @@
<?php
/*
* h5ai %BUILD_VERSION%
* h5ai {{version}}
*
* PHP Configuration
* filesystem paths and file ignore rules

View File

@ -1,5 +1,5 @@
#data-apache-autoindex {
#data-apache-autoindex, #data-php-no-js-fallback {
max-width: 960px;
margin: 0 auto;
@ -29,6 +29,11 @@
opacity: 0.9;
}
}
span {
color: #555;
font-weight: normal;
opacity: 0.4;
}
}
td {
border: 1px solid #ddd;

View File

@ -1,16 +1,12 @@
body#h5ai-info {
font-family: Ubuntu, Arial, sans;
margin: 0 auto;
margin: 2em auto 4em auto;
font-size: 20px;
color: #555;
max-width: 600px;
text-align: center;
.h5ai {
font-family: 'Miltonian Tattoo';
font-weight: normal;
}
.build-version {
display: block;
// font-size: 0.9em;
@ -24,7 +20,7 @@ body#h5ai-info {
}
h1 {
font-size: 3.6em;
margin: 0.9em 0 0 0;
margin: 0;
}
h2 {
font-size: 1.15em;

View File

@ -14,15 +14,16 @@
background-color: rgb(241,241,241);
border: 1px solid rgb(210,210,210);
> .scrollbar {
.sp-scrollbar {
margin: 0;
width: 6px;
background-color: rgb(210,210,210);
cursor: pointer;
.drag {
.sp-thumb {
background-color: rgb(180,180,180);
}
&.dragOn .drag {
&.active .sp-thumb {
background-color: rgb(150,150,150);
}
}

View File

@ -1,5 +1,5 @@
#preview-overlay {
#pv-img-overlay {
display: none;
position: fixed;
left: 0;
@ -8,43 +8,50 @@
bottom: 0;
z-index: 100;
background-color: #111;
background-color: rgba(0,0,0,0.5);
text-align: center;
}
#preview-content {
#pv-img-content {
position: fixed;
#preview-img {
max-width: 100%;
max-height: 100%;
}
#preview-mov {
max-width: 100%;
max-height: 100%;
}
#pv-img-image {
max-width: 100%;
max-height: 100%;
border: 2px solid #fff;
.border-radius(4px);
}
#pv-img-overlay.fullscreen {
background-color: #111;
#pv-img-image {
border: 0;
.border-radius(0);
}
}
#preview-close {
#pv-img-close {
position: fixed;
width: 100%;
height: 100%;
cursor: pointer;
}
#preview-prev {
#pv-img-prev {
position: fixed;
cursor: pointer;
}
#preview-next {
#pv-img-next {
position: fixed;
cursor: pointer;
}
#preview-buttons, #preview-topbuttons {
#pv-img-buttons, #pv-img-topbuttons {
list-style: none;
list-style-image: none;
margin: 0;
@ -101,9 +108,7 @@
}
}
#preview-topbar {
#pv-img-topbar {
position: fixed;
z-index: 5;
width: 100%;
@ -113,8 +118,7 @@
border-bottom: 1px solid rgb(27,27,27);
}
#preview-bottombar {
#pv-img-bottombar {
position: fixed;
z-index: 5;
width: 100%;

View File

@ -0,0 +1,154 @@
#pv-txt-overlay {
display: none;
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 100;
background-color: rgba(0,0,0,0.5);
text-align: center;
}
#pv-txt-content {
max-width: 960px;
margin: 0 auto;
padding: 10px;
background-color: #fff;
border: 2px solid #fff;
.border-radius(4px);
text-align: left;
overflow: auto;
position: relative;
}
#pv-txt-text {
.syntaxhighlighter {
overflow: visible !important;
.gutter .line {
border-right: none !important;
}
}
&.markdown {
font-size: 16px;
padding: 8px 24px;
a, a:active, a:visited {
color: #2080FF;
text-decoration: none;
cursor: pointer;
&:hover {
color: #68A9FF;
}
}
pre, code {
font-family: "Ubuntu Mono", monospace;
}
code {
color: #008200;
}
}
}
#pv-txt-close {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
cursor: pointer;
}
#pv-txt-prev {
position: fixed;
cursor: pointer;
}
#pv-txt-next {
position: fixed;
cursor: pointer;
}
#pv-txt-buttons, #pv-txt-topbuttons {
list-style: none;
list-style-image: none;
margin: 0;
padding: 0;
img {
position: relative;
top: -2px;
width: 16px;
height: 16px;
}
img + span, img + input {
margin-left: 6px;
}
input {
background-color: rgba(255,255,255,0.1);
border: none;
color: #ccc;
}
.bar-label {
display: block;
color: #ccc;
height: 30px;
line-height: 30px;
padding: 0 10px;
opacity: 0.7;
.transition(all 0.2s ease-in-out);
}
.bar-highlight {
background-color: rgba(255,255,255,0.1);
opacity: 1.0;
}
@bar-sep-border: 1px solid rgba(255,255,255,0.05);
.bar-button {
.bar-label;
cursor: pointer;
&:hover, &.hover {
.bar-highlight;
}
}
.bar-left {
float: left;
border-right: @bar-sep-border;
}
.bar-right {
float: right;
border-left: @bar-sep-border;
}
}
#pv-txt-topbar {
position: fixed;
z-index: 5;
width: 100%;
left: 0;
top: 0;
.vert-gradient(rgb(37,37,37), rgb(24,24,24));
border-bottom: 1px solid rgb(27,27,27);
}
#pv-txt-bottombar {
position: fixed;
z-index: 5;
width: 100%;
left: 0;
bottom: 0;
.vert-gradient(rgb(27,27,27), rgb(14,14,14));
border-top: 1px solid rgb(45,45,45);
}

View File

@ -11,17 +11,18 @@
background-color: rgb(241,241,241);
border-right: 2px solid rgb(221,221,221);
> .scrollbar {
.sp-scrollbar {
margin: 8px 8px 8px 0;
width: 6px;
background-color: rgb(210,210,210);
.border-radius(3px);
cursor: pointer;
.drag {
.sp-thumb {
background-color: rgb(180,180,180);
.border-radius(3px);
}
&.dragOn .drag {
&.active .sp-thumb {
background-color: rgb(150,150,150);
}
}

View File

@ -31,8 +31,7 @@ audio:not([controls]) { display: none; }
* 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
*/
//html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body { margin: 0; font-size: 13px; line-height: 1.231; }

View File

@ -0,0 +1,228 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter a,
.syntaxhighlighter div,
.syntaxhighlighter code,
.syntaxhighlighter table,
.syntaxhighlighter table td,
.syntaxhighlighter table tr,
.syntaxhighlighter table tbody,
.syntaxhighlighter table thead,
.syntaxhighlighter table caption,
.syntaxhighlighter textarea {
-moz-border-radius: 0 0 0 0 !important;
-webkit-border-radius: 0 0 0 0 !important;
background: none !important;
border: 0 !important;
bottom: auto !important;
float: none !important;
height: auto !important;
left: auto !important;
line-height: 1.1em !important;
margin: 0 !important;
outline: 0 !important;
overflow: visible !important;
padding: 0 !important;
position: static !important;
right: auto !important;
text-align: left !important;
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
// font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-family: "Ubuntu Mono", "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
// font-size: 1em !important;
font-size: 16px !important;
min-height: inherit !important;
min-height: auto !important;
}
.syntaxhighlighter {
width: 100% !important;
margin: 1em 0 1em 0 !important;
position: relative !important;
overflow: auto !important;
font-size: 1em !important;
}
.syntaxhighlighter.source {
overflow: hidden !important;
}
.syntaxhighlighter .bold {
font-weight: bold !important;
}
.syntaxhighlighter .italic {
font-style: italic !important;
}
.syntaxhighlighter .line {
white-space: pre !important;
}
.syntaxhighlighter table {
width: 100% !important;
}
.syntaxhighlighter table caption {
text-align: left !important;
padding: .5em 0 0.5em 1em !important;
}
.syntaxhighlighter table td.code {
width: 100% !important;
}
.syntaxhighlighter table td.code .container {
position: relative !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
overflow: hidden !important;
white-space: pre !important;
}
.syntaxhighlighter table td.gutter .line {
text-align: right !important;
padding: 0 0.5em 0 1em !important;
}
.syntaxhighlighter table td.code .line {
padding: 0 1em !important;
}
.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
padding-left: 0em !important;
}
.syntaxhighlighter.show {
display: block !important;
}
.syntaxhighlighter.collapsed table {
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar {
padding: 0.1em 0.8em 0em 0.8em !important;
font-size: 1em !important;
position: static !important;
width: auto !important;
height: auto !important;
}
.syntaxhighlighter.collapsed .toolbar span {
display: inline !important;
margin-right: 1em !important;
}
.syntaxhighlighter.collapsed .toolbar span a {
padding: 0 !important;
display: none !important;
}
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important;
}
.syntaxhighlighter .toolbar {
position: absolute !important;
right: 1px !important;
top: 1px !important;
width: 11px !important;
height: 11px !important;
font-size: 10px !important;
z-index: 10 !important;
}
.syntaxhighlighter .toolbar span.title {
display: inline !important;
}
.syntaxhighlighter .toolbar a {
display: block !important;
text-align: center !important;
text-decoration: none !important;
padding-top: 1px !important;
}
.syntaxhighlighter .toolbar a.expandSource {
display: none !important;
}
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important;
}
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important;
}
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important;
}
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
.syntaxhighlighter.printing .line.highlighted.alt2 .content {
background: none !important;
}
.syntaxhighlighter.printing .line .number {
color: #bbbbbb !important;
}
.syntaxhighlighter.printing .line .content {
color: black !important;
}
.syntaxhighlighter.printing .toolbar {
display: none !important;
}
.syntaxhighlighter.printing a {
text-decoration: none !important;
}
.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
color: black !important;
}
.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
color: #008200 !important;
}
.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
color: blue !important;
}
.syntaxhighlighter.printing .keyword {
color: #006699 !important;
font-weight: bold !important;
}
.syntaxhighlighter.printing .preprocessor {
color: gray !important;
}
.syntaxhighlighter.printing .variable {
color: #aa7700 !important;
}
.syntaxhighlighter.printing .value {
color: #009900 !important;
}
.syntaxhighlighter.printing .functions {
color: #ff1493 !important;
}
.syntaxhighlighter.printing .constants {
color: #0066cc !important;
}
.syntaxhighlighter.printing .script {
font-weight: bold !important;
}
.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
color: gray !important;
}
.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
color: #ff1493 !important;
}
.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
color: red !important;
}
.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
color: black !important;
}

View File

@ -0,0 +1,117 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: white !important;
}
.syntaxhighlighter .line.alt1 {
background-color: white !important;
}
.syntaxhighlighter .line.alt2 {
background-color: white !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #e0e0e0 !important;
}
.syntaxhighlighter .line.highlighted.number {
color: black !important;
}
.syntaxhighlighter table caption {
color: black !important;
}
.syntaxhighlighter .gutter {
color: #afafaf !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #6ce26c !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #6ce26c !important;
color: white !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: blue !important;
background: white !important;
border: 1px solid #6ce26c !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: blue !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: red !important;
}
.syntaxhighlighter .toolbar {
color: white !important;
background: #6ce26c !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: white !important;
}
.syntaxhighlighter .toolbar a:hover {
color: black !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: black !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #008200 !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: blue !important;
}
.syntaxhighlighter .keyword {
color: #006699 !important;
}
.syntaxhighlighter .preprocessor {
color: gray !important;
}
.syntaxhighlighter .variable {
color: #aa7700 !important;
}
.syntaxhighlighter .value {
color: #009900 !important;
}
.syntaxhighlighter .functions {
color: #ff1493 !important;
}
.syntaxhighlighter .constants {
color: #0066cc !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #006699 !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: gray !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: #ff1493 !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: red !important;
}
.syntaxhighlighter .keyword {
font-weight: bold !important;
}

View File

@ -0,0 +1,120 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: #0a2b1d !important;
}
.syntaxhighlighter .line.alt1 {
background-color: #0a2b1d !important;
}
.syntaxhighlighter .line.alt2 {
background-color: #0a2b1d !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #233729 !important;
}
.syntaxhighlighter .line.highlighted.number {
color: white !important;
}
.syntaxhighlighter table caption {
color: #f8f8f8 !important;
}
.syntaxhighlighter .gutter {
color: #497958 !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #41a83e !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #41a83e !important;
color: #0a2b1d !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #96dd3b !important;
background: black !important;
border: 1px solid #41a83e !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #96dd3b !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: white !important;
}
.syntaxhighlighter .toolbar {
color: white !important;
background: #41a83e !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: white !important;
}
.syntaxhighlighter .toolbar a:hover {
color: #ffe862 !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: #f8f8f8 !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #336442 !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: #9df39f !important;
}
.syntaxhighlighter .keyword {
color: #96dd3b !important;
}
.syntaxhighlighter .preprocessor {
color: #91bb9e !important;
}
.syntaxhighlighter .variable {
color: #ffaa3e !important;
}
.syntaxhighlighter .value {
color: #f7e741 !important;
}
.syntaxhighlighter .functions {
color: #ffaa3e !important;
}
.syntaxhighlighter .constants {
color: #e0e8ff !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #96dd3b !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: #eb939a !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: #91bb9e !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #edef7d !important;
}
.syntaxhighlighter .comments {
font-style: italic !important;
}
.syntaxhighlighter .keyword {
font-weight: bold !important;
}

View File

@ -0,0 +1,128 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: white !important;
}
.syntaxhighlighter .line.alt1 {
background-color: white !important;
}
.syntaxhighlighter .line.alt2 {
background-color: white !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #c3defe !important;
}
.syntaxhighlighter .line.highlighted.number {
color: white !important;
}
.syntaxhighlighter table caption {
color: black !important;
}
.syntaxhighlighter .gutter {
color: #787878 !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #d4d0c8 !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #d4d0c8 !important;
color: white !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #3f5fbf !important;
background: white !important;
border: 1px solid #d4d0c8 !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #3f5fbf !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: #aa7700 !important;
}
.syntaxhighlighter .toolbar {
color: #a0a0a0 !important;
background: #d4d0c8 !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: #a0a0a0 !important;
}
.syntaxhighlighter .toolbar a:hover {
color: red !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: black !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #3f5fbf !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: #2a00ff !important;
}
.syntaxhighlighter .keyword {
color: #7f0055 !important;
}
.syntaxhighlighter .preprocessor {
color: #646464 !important;
}
.syntaxhighlighter .variable {
color: #aa7700 !important;
}
.syntaxhighlighter .value {
color: #009900 !important;
}
.syntaxhighlighter .functions {
color: #ff1493 !important;
}
.syntaxhighlighter .constants {
color: #0066cc !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #7f0055 !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: gray !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: #ff1493 !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: red !important;
}
.syntaxhighlighter .keyword {
font-weight: bold !important;
}
.syntaxhighlighter .xml .keyword {
color: #3f7f7f !important;
font-weight: normal !important;
}
.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a {
color: #7f007f !important;
}
.syntaxhighlighter .xml .string {
font-style: italic !important;
color: #2a00ff !important;
}

View File

@ -0,0 +1,113 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: black !important;
}
.syntaxhighlighter .line.alt1 {
background-color: black !important;
}
.syntaxhighlighter .line.alt2 {
background-color: black !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #2a3133 !important;
}
.syntaxhighlighter .line.highlighted.number {
color: white !important;
}
.syntaxhighlighter table caption {
color: #d3d3d3 !important;
}
.syntaxhighlighter .gutter {
color: #d3d3d3 !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #990000 !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #990000 !important;
color: black !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #ebdb8d !important;
background: black !important;
border: 1px solid #990000 !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #ebdb8d !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: #ff7d27 !important;
}
.syntaxhighlighter .toolbar {
color: white !important;
background: #990000 !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: white !important;
}
.syntaxhighlighter .toolbar a:hover {
color: #9ccff4 !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: #d3d3d3 !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #ff7d27 !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: #ff9e7b !important;
}
.syntaxhighlighter .keyword {
color: aqua !important;
}
.syntaxhighlighter .preprocessor {
color: #aec4de !important;
}
.syntaxhighlighter .variable {
color: #ffaa3e !important;
}
.syntaxhighlighter .value {
color: #009900 !important;
}
.syntaxhighlighter .functions {
color: #81cef9 !important;
}
.syntaxhighlighter .constants {
color: #ff9e7b !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: aqua !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: #ebdb8d !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: #ff7d27 !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #aec4de !important;
}

View File

@ -0,0 +1,117 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: #121212 !important;
}
.syntaxhighlighter .line.alt1 {
background-color: #121212 !important;
}
.syntaxhighlighter .line.alt2 {
background-color: #121212 !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #2c2c29 !important;
}
.syntaxhighlighter .line.highlighted.number {
color: white !important;
}
.syntaxhighlighter table caption {
color: white !important;
}
.syntaxhighlighter .gutter {
color: #afafaf !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #3185b9 !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #3185b9 !important;
color: #121212 !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #3185b9 !important;
background: black !important;
border: 1px solid #3185b9 !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #3185b9 !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: #d01d33 !important;
}
.syntaxhighlighter .toolbar {
color: white !important;
background: #3185b9 !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: white !important;
}
.syntaxhighlighter .toolbar a:hover {
color: #96daff !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: white !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #696854 !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: #e3e658 !important;
}
.syntaxhighlighter .keyword {
color: #d01d33 !important;
}
.syntaxhighlighter .preprocessor {
color: #435a5f !important;
}
.syntaxhighlighter .variable {
color: #898989 !important;
}
.syntaxhighlighter .value {
color: #009900 !important;
}
.syntaxhighlighter .functions {
color: #aaaaaa !important;
}
.syntaxhighlighter .constants {
color: #96daff !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #d01d33 !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: #ffc074 !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: #4a8cdb !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #96daff !important;
}
.syntaxhighlighter .functions {
font-weight: bold !important;
}

View File

@ -0,0 +1,113 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: #222222 !important;
}
.syntaxhighlighter .line.alt1 {
background-color: #222222 !important;
}
.syntaxhighlighter .line.alt2 {
background-color: #222222 !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #253e5a !important;
}
.syntaxhighlighter .line.highlighted.number {
color: white !important;
}
.syntaxhighlighter table caption {
color: lime !important;
}
.syntaxhighlighter .gutter {
color: #38566f !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #435a5f !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #435a5f !important;
color: #222222 !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #428bdd !important;
background: black !important;
border: 1px solid #435a5f !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #428bdd !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: lime !important;
}
.syntaxhighlighter .toolbar {
color: #aaaaff !important;
background: #435a5f !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: #aaaaff !important;
}
.syntaxhighlighter .toolbar a:hover {
color: #9ccff4 !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: lime !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #428bdd !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: lime !important;
}
.syntaxhighlighter .keyword {
color: #aaaaff !important;
}
.syntaxhighlighter .preprocessor {
color: #8aa6c1 !important;
}
.syntaxhighlighter .variable {
color: aqua !important;
}
.syntaxhighlighter .value {
color: #f7e741 !important;
}
.syntaxhighlighter .functions {
color: #ff8000 !important;
}
.syntaxhighlighter .constants {
color: yellow !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #aaaaff !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: red !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: yellow !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #ffaa3e !important;
}

View File

@ -0,0 +1,113 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: #0f192a !important;
}
.syntaxhighlighter .line.alt1 {
background-color: #0f192a !important;
}
.syntaxhighlighter .line.alt2 {
background-color: #0f192a !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #253e5a !important;
}
.syntaxhighlighter .line.highlighted.number {
color: #38566f !important;
}
.syntaxhighlighter table caption {
color: #d1edff !important;
}
.syntaxhighlighter .gutter {
color: #afafaf !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #435a5f !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #435a5f !important;
color: #0f192a !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #428bdd !important;
background: black !important;
border: 1px solid #435a5f !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #428bdd !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: #1dc116 !important;
}
.syntaxhighlighter .toolbar {
color: #d1edff !important;
background: #435a5f !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: #d1edff !important;
}
.syntaxhighlighter .toolbar a:hover {
color: #8aa6c1 !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: #d1edff !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #428bdd !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: #1dc116 !important;
}
.syntaxhighlighter .keyword {
color: #b43d3d !important;
}
.syntaxhighlighter .preprocessor {
color: #8aa6c1 !important;
}
.syntaxhighlighter .variable {
color: #ffaa3e !important;
}
.syntaxhighlighter .value {
color: #f7e741 !important;
}
.syntaxhighlighter .functions {
color: #ffaa3e !important;
}
.syntaxhighlighter .constants {
color: #e0e8ff !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #b43d3d !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: #f8bb00 !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: white !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #ffaa3e !important;
}

View File

@ -0,0 +1,113 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
.syntaxhighlighter {
background-color: #1b2426 !important;
}
.syntaxhighlighter .line.alt1 {
background-color: #1b2426 !important;
}
.syntaxhighlighter .line.alt2 {
background-color: #1b2426 !important;
}
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #323e41 !important;
}
.syntaxhighlighter .line.highlighted.number {
color: #b9bdb6 !important;
}
.syntaxhighlighter table caption {
color: #b9bdb6 !important;
}
.syntaxhighlighter .gutter {
color: #afafaf !important;
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #435a5f !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #435a5f !important;
color: #1b2426 !important;
}
.syntaxhighlighter.printing .line .content {
border: none !important;
}
.syntaxhighlighter.collapsed {
overflow: visible !important;
}
.syntaxhighlighter.collapsed .toolbar {
color: #5ba1cf !important;
background: black !important;
border: 1px solid #435a5f !important;
}
.syntaxhighlighter.collapsed .toolbar a {
color: #5ba1cf !important;
}
.syntaxhighlighter.collapsed .toolbar a:hover {
color: #5ce638 !important;
}
.syntaxhighlighter .toolbar {
color: white !important;
background: #435a5f !important;
border: none !important;
}
.syntaxhighlighter .toolbar a {
color: white !important;
}
.syntaxhighlighter .toolbar a:hover {
color: #e0e8ff !important;
}
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: #b9bdb6 !important;
}
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #878a85 !important;
}
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: #5ce638 !important;
}
.syntaxhighlighter .keyword {
color: #5ba1cf !important;
}
.syntaxhighlighter .preprocessor {
color: #435a5f !important;
}
.syntaxhighlighter .variable {
color: #ffaa3e !important;
}
.syntaxhighlighter .value {
color: #009900 !important;
}
.syntaxhighlighter .functions {
color: #ffaa3e !important;
}
.syntaxhighlighter .constants {
color: #e0e8ff !important;
}
.syntaxhighlighter .script {
font-weight: bold !important;
color: #5ba1cf !important;
background-color: none !important;
}
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: #e0e8ff !important;
}
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: white !important;
}
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: #ffaa3e !important;
}

View File

@ -1,7 +1,10 @@
@import "inc/h5bp-norm";
@import "inc/mixins";
@import "lib/h5bp-norm";
@import "lib/mixins";
@import "lib/sh/shCore";
@import "lib/sh/shThemeDefault";
html { overflow-y: auto; }
::-moz-selection { background: #68A9FF; color: #fff; text-shadow: none; }
::selection { background: #68A9FF; color: #fff; text-shadow: none; }
@ -28,7 +31,8 @@ body {
@import "inc/context";
@import "inc/apache-autoindex-table";
@import "inc/preview";
@import "inc/preview-img";
@import "inc/preview-txt";
@import "inc/responsive";

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

View File

@ -6,20 +6,19 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>h5ai %BUILD_VERSION% server details</title>
<title>h5ai {{version}} server details</title>
<meta name="description" content="h5ai server details">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" type="image/png" href="/_h5ai/images/h5ai-16x16.png">
<link rel="apple-touch-icon" type="image/png" href="/_h5ai/images/h5ai-48x48.png">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Miltonian+Tattoo:regular">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic,700italic|Ubuntu:400,700,400italic,700italic">
<link rel="stylesheet" href="/_h5ai/css/styles.css">
<script src="/_h5ai/js/modernizr-2.5.3.min.js"></script>
<script src="/_h5ai/js/modernizr.js"></script>
</head>
<body id="h5ai-info">
<h1><span class="h5ai">h5ai</span></h1>
<span class="build-version">version %BUILD_VERSION%</span>
<span class="build-stamp">%BUILD_STAMP%</span>
<h1>h5ai</h1>
<span class="build-version">version {{version}}</span>
<span class="build-stamp">{{stamp}}</span>
<h2>server supports</h2>
<ul id="tests">
<li class="test" data-id="php"><span class="test-label">php version</span><span class="test-result">?</span>
@ -55,15 +54,13 @@
</ul>
<div id="bottombar" class="clearfix">
<span class="left">
<a id="h5ai-reference" href="http://larsjung.de/h5ai" title="h5ai project page">h5ai %BUILD_VERSION%</a>
<a id="h5ai-reference" href="http://larsjung.de/h5ai" title="h5ai project page">h5ai {{version}}</a>
<span class="hideOnJs noJsMsg"> ⚡ JavaScript is disabled! ⚡ </span>
<span class="oldBrowser"> ⚡ Some features disabled! Works best in <a href="http://browsehappy.com">modern browsers</a>. ⚡ </span>
</span>
<span class="right"></span>
<span class="center"></span>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/_h5ai/js/jquery-1.7.2.min.js"><\/script>')</script>
<script src="/_h5ai/config.js"></script>
<script src="/_h5ai/js/scripts.js"></script>
</body>

View File

@ -0,0 +1,157 @@
modulejs.define('core/ajax', ['$', 'amplify', 'base64', 'core/resource'], function ($, amplify, base64, resource) {
var reContentType = /^text\/html;h5ai=/,
getStatus = function (href, withContent, callback) {
$.ajax({
url: href,
type: withContent ? 'GET' : 'HEAD',
complete: function (xhr) {
var res = {
status: xhr.status,
content: xhr.responseText
};
if (xhr.status === 200 && reContentType.test(xhr.getResponseHeader('Content-Type'))) {
res.status = 'h5ai';
}
callback(res);
}
});
},
getChecks = function (callback) {
$.ajax({
url: resource.api(),
data: {
action: 'getchecks'
},
type: 'POST',
dataType: 'json',
success: function (json) {
callback(json);
},
error: function () {
callback();
}
});
},
getArchive = function (data, callback) {
$.ajax({
url: resource.api(),
data: {
action: 'archive',
execution: data.execution,
format: data.format,
hrefs: data.hrefs
},
type: 'POST',
dataType: 'json',
beforeSend: function (xhr) {
if (data.user) {
xhr.setRequestHeader('Authorization', 'Basic ' + base64.encode(data.user + ':' + data.password));
}
},
success: function (json) {
callback(json);
},
error: function () {
callback();
}
});
},
getThumbSrc = function (data, callback) {
$.ajax({
url: resource.api(),
data: {
action: 'getthumbsrc',
type: data.type,
href: data.href,
mode: data.mode,
width: data.width,
height: data.height
},
type: 'POST',
dataType: 'json',
success: function (json) {
if (json.code === 0) {
callback(json.absHref);
}
callback();
},
error: function () {
callback();
}
});
},
getThumbSrcSmall = function (type, href, callback) {
getThumbSrc(
{
type: type,
href: href,
mode: 'square',
width: 16,
height: 16
},
callback
);
},
getThumbSrcBig = function (type, href, callback) {
getThumbSrc(
{
type: type,
href: href,
mode: 'rational',
width: 100,
height: 48
},
callback
);
},
getHtml = function (url, callback) {
$.ajax({
url: url,
dataType: 'html',
success: function (html) {
callback(html);
},
error: function () {
callback();
}
});
};
return {
getStatus: getStatus,
getChecks: getChecks,
getArchive: getArchive,
getThumbSrcSmall: getThumbSrcSmall,
getThumbSrcBig: getThumbSrcBig,
getHtml: getHtml
};
});

View File

@ -1,12 +1,11 @@
module.define('core/entry', [jQuery, 'core/parser', 'model/entry'], function ($, parser, Entry) {
modulejs.define('core/entry', ['$', 'core/parser', 'model/entry'], function ($, parser, Entry) {
var absHref = document.location.pathname.replace(/[^\/]*$/, '');
var entry = Entry.get();
parser.parse(absHref, $('body'));
parser.parse(entry.absHref, $('body'));
$('#data-apache-autoindex').remove();
var entry = Entry.get(absHref);
entry.status = 'h5ai';
if (entry.parent) {
entry.parent.isParentFolder = true;

View File

@ -1,5 +1,5 @@
module.define('core/event', [amplify], function (amplify) {
modulejs.define('core/event', ['amplify'], function (amplify) {
var sub = function (topic, callback) {

View File

@ -1,5 +1,5 @@
module.define('core/format', [moment], function (moment) {
modulejs.define('core/format', ['_', 'moment'], function (_, moment) {
var reParseSize = /^\s*([\.\d]+)\s*([kmgt]?)b?\s*$/i,
treshhold = 1000.0,

View File

@ -0,0 +1,34 @@
modulejs.define('core/langs', ['config', '_'], function (config, _) {
var defaults = {
lang: 'unknown',
details: 'details',
icons: 'icons',
name: 'Name',
lastModified: 'Last modified',
size: 'Size',
parentDirectory: 'Parent Directory',
empty: 'empty',
folders: 'folders',
files: 'files',
download: 'download',
noMatch: 'no match',
dateFormat: 'YYYY-MM-DD HH:mm',
filter: 'filter'
},
translations = {},
parse = function (langs) {
_.each(langs, function (trans, lang) {
translations[lang] = _.extend({}, defaults, trans);
});
};
parse(_.extend({}, config.langs));
return translations;
});

View File

@ -1,15 +1,20 @@
module.define('core/parser', [jQuery], function ($) {
modulejs.define('core/parser', ['$'], function ($) {
if ($('#data-apache-autoindex').length) {
return module.require('parser/apache-autoindex');
return modulejs.require('parser/apache-autoindex');
}
if ($('#data-generic-json').length) {
return module.require('parser/generic-json');
return modulejs.require('parser/generic-json');
}
return {
id: 'none',
mode: null,
server: {
name: null,
version: null
},
parse: function () {
return [];
}

View File

@ -1,5 +1,5 @@
module.define('core/resource', ['core/settings'], function (settings) {
modulejs.define('core/resource', ['core/settings'], function (settings) {
var api = function () {

View File

@ -1,5 +1,5 @@
module.define('core/settings', [H5AI_CONFIG], function (config) {
modulejs.define('core/settings', ['config', '_'], function (config, _) {
var defaults = {
rootAbsHref: '/',
@ -10,86 +10,3 @@ module.define('core/settings', [H5AI_CONFIG], function (config) {
return _.extend({}, defaults, config.options);
});
module.define('core/types', [H5AI_CONFIG], function (config) {
var reEndsWithSlash = /\/$/,
reStartsWithDot = /^\./,
fileExts = {},
fileNames = {},
parse = function (types) {
_.each(types, function (matches, type) {
_.each(matches, function (match) {
match = match.toLowerCase();
if (reStartsWithDot.test(match)) {
fileExts[match] = type;
} else {
fileNames[match] = type;
}
});
});
},
getType = function (sequence) {
if (reEndsWithSlash.test(sequence)) {
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;
return fileNames[name] || fileExts[ext] || 'unknown';
};
parse(_.extend({}, config.types));
return {
getType: getType
};
});
module.define('core/langs', [H5AI_CONFIG], function (config) {
var defaults = {
lang: 'unknown',
details: 'details',
icons: 'icons',
name: 'Name',
lastModified: 'Last modified',
size: 'Size',
parentDirectory: 'Parent Directory',
empty: 'empty',
folders: 'folders',
files: 'files',
download: 'download',
noMatch: 'no match',
dateFormat: 'YYYY-MM-DD HH:mm'
},
translations = {},
parse = function (langs) {
_.each(langs, function (trans, lang) {
translations[lang] = _.extend({}, defaults, trans);
});
};
parse(_.extend({}, config.langs));
return translations;
});

View File

@ -1,5 +1,5 @@
module.define('core/store', [amplify], function (amplify) {
modulejs.define('core/store', ['amplify'], function (amplify) {
var put = function (key, value) {

View File

@ -0,0 +1,48 @@
modulejs.define('core/types', ['config', '_'], function (config, _) {
var reEndsWithSlash = /\/$/,
reStartsWithDot = /^\./,
fileExts = {},
fileNames = {},
parse = function (types) {
_.each(types, function (matches, type) {
_.each(matches, function (match) {
match = match.toLowerCase();
if (reStartsWithDot.test(match)) {
fileExts[match] = type;
} else {
fileNames[match] = type;
}
});
});
},
getType = function (sequence) {
if (reEndsWithSlash.test(sequence)) {
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;
return fileNames[name] || fileExts[ext] || 'unknown';
};
parse(_.extend({}, config.types));
return {
getType: getType
};
});

View File

@ -1,5 +1,5 @@
module.define('ext/crumb', [jQuery, 'core/settings', 'core/resource', 'core/entry'], function ($, allsettings, resource, entry) {
modulejs.define('ext/crumb', ['_', '$', 'core/settings', 'core/resource', 'core/entry'], function (_, $, allsettings, resource, entry) {
var defaults = {
enabled: false

View File

@ -1,5 +1,5 @@
module.define('ext/custom', [jQuery, 'core/settings'], function ($, allsettings) {
modulejs.define('ext/custom', ['_', '$', 'core/settings', 'core/ajax'], function (_, $, allsettings, ajax) {
var defaults = {
enabled: false,
@ -16,23 +16,19 @@ module.define('ext/custom', [jQuery, 'core/settings'], function ($, allsettings)
}
if (_.isString(settings.header)) {
$.ajax({
url: settings.header,
dataType: 'html',
success: function (data) {
ajax.getHtml(settings.header, function (html) {
$('<div id="content-header">' + data + '</div>').prependTo('#content');
if (html) {
$('<div id="content-header">' + html + '</div>').prependTo('#content');
}
});
}
if (_.isString(settings.footer)) {
$.ajax({
url: settings.footer,
dataType: 'html',
success: function (data) {
ajax.getHtml(settings.footer, function (html) {
$('<div id="content-footer">' + data + '</div>').appendTo('#content');
if (html) {
$('<div id="content-footer">' + html + '</div>').appendTo('#content');
}
});
}

View File

@ -1,5 +1,5 @@
module.define('ext/download', [jQuery, 'core/settings', 'core/resource', 'core/event'], function ($, allsettings, resource, event) {
modulejs.define('ext/download', ['_', '$', 'core/settings', 'core/resource', 'core/event', 'core/ajax'], function (_, $, allsettings, resource, event, ajax) {
var defaults = {
enabled: false,
@ -33,19 +33,19 @@ module.define('ext/download', [jQuery, 'core/settings', 'core/resource', 'core/e
}, 1000);
},
handleResponse = function (response) {
handleResponse = function (json) {
$download.removeClass('current');
$img.attr('src', resource.image('download'));
if (response) {
if (response.code === 0) {
if (json) {
if (json.code === 0) {
setTimeout(function () { // wait here so the img above can be updated in time
window.location = resource.api() + '?action=getarchive&id=' + response.id + '&as=h5ai-selection.' + settings.format;
window.location = resource.api() + '?action=getarchive&id=' + json.id + '&as=h5ai-selection.' + settings.format;
}, 200);
} else {
if (response.code === 401) {
if (json.code === 401) {
$downloadAuth
.css({
left: $download.offset().left,
@ -65,34 +65,13 @@ module.define('ext/download', [jQuery, 'core/settings', 'core/resource', 'core/e
$download.addClass('current');
$img.attr('src', resource.image('loading.gif', true));
$.ajax({
url: resource.api(),
data: {
action: 'archive',
execution: settings.execution,
format: settings.format,
hrefs: hrefsStr
},
type: 'POST',
dataType: 'json',
beforeSend: function (xhr) {
var user = $downloadUser.val(),
password = $downloadPassword.val();
if (user) {
xhr.setRequestHeader('Authorization', 'Basic ' + Base64.encode(user + ':' + password));
}
},
success: function (response) {
handleResponse(response);
},
error: function () {
handleResponse();
}
});
ajax.getArchive({
execution: settings.execution,
format: settings.format,
hrefs: hrefsStr,
user: $downloadUser.val(),
password: $downloadPassword.val()
}, handleResponse);
},
onSelection = function (entries) {

View File

@ -1,5 +1,5 @@
module.define('ext/filter', [jQuery, 'core/settings', 'core/resource'], function ($, allsettings, resource) {
modulejs.define('ext/filter', ['_', '$', 'core/settings', 'core/resource'], function (_, $, allsettings, resource) {
var defaults = {
enabled: false
@ -61,7 +61,6 @@ module.define('ext/filter', [jQuery, 'core/settings', 'core/resource'], function
escapeRegExp = function (sequence) {
return sequence.replace(/[\-\[\]{}()*+?.,\\$\^|#\s]/g, '\\$&');
// return sequence.replace(/[|()\[{.+*?^$\\]/g,"\\$0");
},
parseFilterSequence = function (sequence) {
@ -72,10 +71,15 @@ module.define('ext/filter', [jQuery, 'core/settings', 'core/resource'], function
sequence = $.map($.trim(sequence).split(/\s+/), function (part) {
return escapeRegExp(part);
return _.map(part.split(''), function (char) {
return escapeRegExp(char);
}).join('.*?');
// return escapeRegExp(part);
}).join('|');
return new RegExp(sequence);
return new RegExp(sequence, 'i');
},
update = function () {

View File

@ -1,5 +1,5 @@
module.define('ext/folderstatus', [jQuery, 'core/settings'], function ($, allsettings) {
modulejs.define('ext/folderstatus', ['_', 'core/settings'], function (_, allsettings) {
var defaults = {
enabled: false,

View File

@ -0,0 +1,30 @@
modulejs.define('ext/google-analytics', ['_', 'core/settings'], function (_, allsettings) {
var defaults = {
enabled: false,
gaq: []
},
settings = _.extend({}, defaults, allsettings['google-analytics']),
init = function () {
if (!settings.enabled) {
return;
}
window._gaq = settings.gaq;
var strScript = 'script',
doc = document,
newScriptTag = doc.createElement(strScript),
firstScriptTag = doc.getElementsByTagName(strScript)[0];
newScriptTag.async = true;
newScriptTag.src = ('https:' === location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
firstScriptTag.parentNode.insertBefore(newScriptTag, firstScriptTag);
};
init();
});

View File

@ -1,5 +1,5 @@
module.define('ext/l10n', [jQuery, 'core/settings', 'core/langs', 'core/format', 'core/store', 'core/event'], function ($, allsettings, langs, format, store, event) {
modulejs.define('ext/l10n', ['_', '$', 'core/settings', 'core/langs', 'core/format', 'core/store', 'core/event'], function (_, $, allsettings, langs, format, store, event) {
var defaults = {
enabled: true,
@ -58,6 +58,8 @@ module.define('ext/l10n', [jQuery, 'core/settings', 'core/langs', 'core/format',
$this.text(format.formatDate($this.data('time')));
});
$('#filter input').attr('placeholder', currentLang.filter);
},
initLangSelector = function (langs) {
@ -92,7 +94,9 @@ module.define('ext/l10n', [jQuery, 'core/settings', 'core/langs', 'core/format',
.css('top', '-' + $langOptions.outerHeight() + 'px')
.stop(true, true)
.fadeIn();
$langOptions.get(0).updateScrollbar();
// needs to be updated twice for initial fade in rendering :/
$langOptions.scrollpanel('update').scrollpanel('update');
},
function () {
$langOptions

View File

@ -1,5 +1,5 @@
module.define('ext/link-hover-states', [jQuery, 'core/settings'], function ($, allsettings) {
modulejs.define('ext/link-hover-states', ['_', '$', 'core/settings'], function (_, $, allsettings) {
var defaults = {
enabled: false

View File

@ -1,5 +1,5 @@
module.define('ext/mode', [jQuery, 'core/settings', 'core/parser'], function ($, allsettings, parser) {
modulejs.define('ext/mode', ['_', '$', 'core/settings', 'core/parser'], function (_, $, allsettings, parser) {
var defaults = {
enabled: false,

View File

@ -1,5 +1,5 @@
module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'core/store', 'core/entry'], function ($, allsettings, resource, store, entry) {
modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/entry'], function (_, $, allsettings, resource, store, entry) {
var defaults = {
enabled: false,
@ -8,24 +8,24 @@ module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'cor
settings = _.extend({}, defaults, allsettings['preview-img']),
template = '<div id="preview-overlay" class="noSelection">' +
'<div id="preview-content">' +
'<img id="preview-img" />' +
template = '<div id="pv-img-overlay" class="noSelection">' +
'<div id="pv-img-content">' +
'<img id="pv-img-image" />' +
'</div>' +
'<div id="preview-close" />' +
'<div id="preview-prev" />' +
'<div id="preview-next" />' +
'<div id="preview-bottombar" class="clearfix">' +
'<ul id="preview-buttons">' +
'<li id="preview-bar-size" class="bar-left bar-label"></li>' +
'<li id="preview-bar-percent" class="bar-left bar-label"></li>' +
'<li id="preview-bar-label" class="bar-left bar-label"></li>' +
'<li id="preview-bar-close" class="bar-right bar-button"><img src="' + resource.image('preview/close') + '" /></li>' +
'<li id="preview-bar-original" class="bar-right"><a class="bar-button" target="_blank"><img src="' + resource.image('preview/image') + '" /></a></li>' +
'<li id="preview-bar-fullscreen" class="bar-right bar-button"><img src="' + resource.image('preview/fullscreen') + '" /></li>' +
'<li id="preview-bar-next" class="bar-right bar-button"><img src="' + resource.image('preview/next') + '" /></li>' +
'<li id="preview-bar-idx" class="bar-right bar-label"></li>' +
'<li id="preview-bar-prev" class="bar-right bar-button"><img src="' + resource.image('preview/prev') + '" /></li>' +
'<div id="pv-img-close" />' +
'<div id="pv-img-prev" />' +
'<div id="pv-img-next" />' +
'<div id="pv-img-bottombar" class="clearfix">' +
'<ul id="pv-img-buttons">' +
'<li id="pv-img-bar-size" class="bar-left bar-label"></li>' +
'<li id="pv-img-bar-percent" class="bar-left bar-label"></li>' +
'<li id="pv-img-bar-label" class="bar-left bar-label"></li>' +
'<li id="pv-img-bar-close" class="bar-right bar-button"><img src="' + resource.image('preview/close') + '" /></li>' +
'<li id="pv-img-bar-original" class="bar-right"><a class="bar-button" target="_blank"><img src="' + resource.image('preview/raw') + '" /></a></li>' +
'<li id="pv-img-bar-fullscreen" class="bar-right bar-button"><img src="' + resource.image('preview/fullscreen') + '" /></li>' +
'<li id="pv-img-bar-next" class="bar-right bar-button"><img src="' + resource.image('preview/next') + '" /></li>' +
'<li id="pv-img-bar-idx" class="bar-right bar-label"></li>' +
'<li id="pv-img-bar-prev" class="bar-right bar-button"><img src="' + resource.image('preview/prev') + '" /></li>' +
'</ul>' +
'</div>' +
'</div>',
@ -39,8 +39,8 @@ module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'cor
adjustSize = function () {
var rect = $(window).fracs('viewport'),
$container = $('#preview-content'),
$img = $('#preview-img'),
$container = $('#pv-img-content'),
$img = $('#pv-img-image'),
margin = isFullscreen ? 0 : 20,
barheight = isFullscreen ? 0 : 31;
@ -60,26 +60,35 @@ module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'cor
rect = $img.fracs('rect');
if (!rect) {
// console.log('RECT FAILED!');
return;
}
rect = rect.relativeTo($('#preview-overlay').fracs('rect'));
rect = rect.relativeTo($('#pv-img-overlay').fracs('rect'));
$('#preview-prev').css({
'left': rect.left,
'top': rect.top,
'width': rect.width / 2,
'height': rect.height
$('#pv-img-prev').css({
left: rect.left,
top: rect.top,
width: rect.width / 2,
height: rect.height
});
$('#preview-next').css({
'left': rect.left + rect.width / 2,
'top': rect.top,
'width': rect.width / 2,
'height': rect.height
$('#pv-img-next').css({
left: rect.left + rect.width / 2,
top: rect.top,
width: rect.width / 2,
height: rect.height
});
if (isFullscreen) {
$('#pv-img-overlay').addClass('fullscreen');
$('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/no-fullscreen'));
$('#pv-img-bottombar').fadeOut(400);
} else {
$('#pv-img-overlay').removeClass('fullscreen');
$('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/fullscreen'));
$('#pv-img-bottombar').fadeIn(200);
}
},
preload = function (src, callback) {
preloadImg = function (src, callback) {
var $hidden = $('<div><img/></div>')
.css({
@ -98,17 +107,17 @@ module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'cor
$hidden.remove();
callback(width, height);
// setTimeout(function () { callback(width, height); }, 1000); // for testing
})
.attr('src', src);
},
showImg = function (entries, idx) {
onIndexChange = function (idx) {
currentEntries = entries;
currentIdx = (idx + currentEntries.length) % currentEntries.length;
var $container = $('#preview-content'),
$img = $('#preview-img'),
var $container = $('#pv-img-content'),
$img = $('#pv-img-image'),
src = currentEntries[currentIdx].absHref,
spinnerTimeout = setTimeout(function () {
@ -121,44 +130,84 @@ module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'cor
});
}, 200);
$('#preview-overlay').stop(true, true).fadeIn(200);
$('#preview-bar-idx').text('' + (currentIdx + 1) + ' / ' + currentEntries.length);
preload(src, function (width, height) {
preloadImg(src, function (width, height) {
clearTimeout(spinnerTimeout);
$container.spin(false);
$img.attr('src', src).show();
$img.fadeOut(100, function () {
adjustSize();
$img.attr('src', src).fadeIn(200);
// small timeout, so $img is visible and therefor $img.width is available
setTimeout(function () {
adjustSize();
$('#pv-img-bar-percent').text('' + (100 * $img.width() / width).toFixed(0) + '%');
$('#pv-img-bar-label').text(currentEntries[currentIdx].label);
$('#pv-img-bar-size').text('' + width + 'x' + height);
$('#pv-img-bar-idx').text('' + (currentIdx + 1) + ' / ' + currentEntries.length);
$('#pv-img-bar-original').find('a').attr('href', currentEntries[currentIdx].absHref);
}, 1);
});
$('#preview-bar-label').text(currentEntries[currentIdx].label);
$('#preview-bar-percent').text('' + (100 * $img.width() / width).toFixed(0) + '%');
$('#preview-bar-size').text('' + width + 'x' + height);
$('#preview-bar-idx').text('' + (currentIdx + 1) + ' / ' + currentEntries.length);
$('#preview-bar-original').find('a').attr('href', currentEntries[currentIdx].absHref);
});
},
checkEntry = function (entry) {
onEnter = function (entries, idx) {
if (entry.$extended && $.inArray(entry.type, settings.types) >= 0) {
$(window).on('keydown', onKeydown);
$('#pv-img-overlay').stop(true, true).fadeIn(200);
var $a = entry.$extended.find('a');
$a.on('click', function (event) {
currentEntries = entries;
onIndexChange(idx);
},
onNext = function () {
onIndexChange(currentIdx + 1);
},
onPrevious = function () {
onIndexChange(currentIdx - 1);
},
onExit = function () {
$(window).off('keydown', onKeydown);
$('#pv-img-overlay').stop(true, true).fadeOut(200);
},
onFullscreen = function () {
isFullscreen = !isFullscreen;
store.put(storekey, isFullscreen);
adjustSize();
},
onKeydown = function (event) {
var key = event.which;
if (key === 27) { // esc
onExit();
} else if (key === 8 || key === 37 || key === 40) { // backspace, left, down
onPrevious();
} else if (key === 13 || key === 32 || key === 38 || key === 39) { // enter, space, up, right
onNext();
} else if (key === 70) { // f
onFullscreen();
}
},
initEntry = function (entries, entry, idx) {
if (entry.$extended) {
entry.$extended.find('a').on('click', function (event) {
event.preventDefault();
var entries = _.filter(_.map($('#extended .entry'), function (entry) {
return $(entry).data('entry');
}), function (entry) {
return _.indexOf(settings.types, entry.type) >= 0;
});
showImg(entries, _.indexOf(entries, entry));
onEnter(entries, idx);
});
}
},
@ -169,74 +218,61 @@ module.define('ext/preview-img', [jQuery, 'core/settings', 'core/resource', 'cor
return;
}
var imageEntries = _.filter(entry.content, function (entry) {
return _.indexOf(settings.types, entry.type) >= 0;
});
_.each(imageEntries, function (e, idx) {
initEntry(imageEntries, e, idx);
});
$(template).appendTo('body');
$('#pv-img-bar-prev, #pv-img-prev').on('click', onPrevious);
$('#pv-img-bar-next, #pv-img-next').on('click', onNext);
$('#pv-img-bar-close, #pv-img-close').on('click', onExit);
$('#pv-img-bar-fullscreen').on('click', onFullscreen);
$('#pv-img-overlay').on('keydown', onKeydown);
_.each(entry.content, checkEntry);
$('#preview-bar-prev, #preview-prev').on('click', function (event) {
// event.stopPropagation();
showImg(currentEntries, currentIdx - 1);
});
$('#preview-prev')
.on('mouseenter', function (event) {
// event.stopPropagation();
$('#preview-bar-prev').addClass('hover');
$('#pv-img-prev')
.on('mouseenter', function () {
$('#pv-img-bar-prev').addClass('hover');
})
.on('mouseleave', function (event) {
// event.stopPropagation();
$('#preview-bar-prev').removeClass('hover');
.on('mouseleave', function () {
$('#pv-img-bar-prev').removeClass('hover');
});
$('#preview-bar-next, #preview-next').on('click', function (event) {
// event.stopPropagation();
showImg(currentEntries, currentIdx + 1);
});
$('#preview-next')
.on('mouseenter', function (event) {
// event.stopPropagation();
$('#preview-bar-next').addClass('hover');
$('#pv-img-next')
.on('mouseenter', function () {
$('#pv-img-bar-next').addClass('hover');
})
.on('mouseleave', function (event) {
// event.stopPropagation();
$('#preview-bar-next').removeClass('hover');
.on('mouseleave', function () {
$('#pv-img-bar-next').removeClass('hover');
});
$('#preview-bar-close, #preview-close').on('click', function () {
// event.stopPropagation();
$('#preview-overlay').stop(true, true).fadeOut(200);
});
$('#preview-close')
.on('mouseenter', function (event) {
// event.stopPropagation();
$('#preview-bar-close').addClass('hover');
$('#pv-img-close')
.on('mouseenter', function () {
$('#pv-img-bar-close').addClass('hover');
})
.on('mouseleave', function (event) {
// event.stopPropagation();
$('#preview-bar-close').removeClass('hover');
.on('mouseleave', function () {
$('#pv-img-bar-close').removeClass('hover');
});
$('#preview-bar-fullscreen').on('click', function (event) {
// event.stopPropagation();
isFullscreen = !isFullscreen;
store.put(storekey, isFullscreen);
$('#preview-bar-fullscreen').find('img').attr('src', isFullscreen ? resource.image('preview/no-fullscreen') : resource.image('preview/fullscreen'));
adjustSize();
});
$('#preview-overlay')
.on('mousedown', function (event) {
$('#pv-img-overlay')
.on('click mousedown mousemove keydown keypress', function (event) {
event.stopPropagation();
})
.on('mousemove', function (event) {
if (isFullscreen) {
var rect = $('#preview-overlay').fracs('rect');
var rect = $('#pv-img-overlay').fracs('rect');
if (rect.bottom - event.pageY < 64) {
$('#preview-bottombar').fadeIn(200);
$('#pv-img-bottombar').fadeIn(200);
} else {
$('#preview-bottombar').fadeOut(400);
$('#pv-img-bottombar').fadeOut(400);
}
}
});

View File

@ -0,0 +1,261 @@
modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/entry'], function (_, $, allsettings, resource, store, entry) {
var defaults = {
enabled: false,
types: {
authors: 'plain',
copying: 'plain',
c: 'c',
cpp: 'cpp',
css: 'css',
h: 'c',
hpp: 'cpp',
install: 'plain',
log: 'plain',
java: 'java',
makefile: 'xml',
markdown: 'plain',
php: 'php',
python: 'python',
readme: 'plain',
rb: 'ruby',
rtf: 'plain',
script: 'shell',
text: 'plain',
js: 'js',
xml: 'xml'
}
},
settings = _.extend({}, defaults, allsettings['preview-txt']),
template = '<div id="pv-txt-overlay" class="noSelection">' +
'<div id="pv-txt-close" />' +
'<div id="pv-txt-content">' +
'<div id="pv-txt-text" />' +
'</div>' +
'<div id="pv-txt-bottombar" class="clearfix">' +
'<ul id="pv-txt-buttons">' +
'<li id="pv-txt-bar-size" class="bar-left bar-label"></li>' +
'<li id="pv-txt-bar-label" class="bar-left bar-label"></li>' +
'<li id="pv-txt-bar-close" class="bar-right bar-button"><img src="' + resource.image('preview/close') + '" /></li>' +
'<li id="pv-txt-bar-original" class="bar-right"><a class="bar-button" target="_blank"><img src="' + resource.image('preview/raw') + '" /></a></li>' +
'<li id="pv-txt-bar-next" class="bar-right bar-button"><img src="' + resource.image('preview/next') + '" /></li>' +
'<li id="pv-txt-bar-idx" class="bar-right bar-label"></li>' +
'<li id="pv-txt-bar-prev" class="bar-right bar-button"><img src="' + resource.image('preview/prev') + '" /></li>' +
'</ul>' +
'</div>' +
'</div>',
templateText = '<pre id="pv-txt-text" />',
templateMarkdown = '<div id="pv-txt-text" class="markdown" />',
currentEntries = [],
currentIdx = 0,
loadScript = function (url, globalId, callback) {
if (window[globalId]) {
callback(window[globalId]);
} else {
$.ajax({
url: url,
dataType: 'script',
complete: function () {
callback(window[globalId]);
}
});
}
},
loadSyntaxhighlighter = function (callback) {
loadScript(allsettings.h5aiAbsHref + 'js/syntaxhighlighter.js', 'SyntaxHighlighter', callback);
},
loadMarkdown = function (callback) {
loadScript(allsettings.h5aiAbsHref + 'js/markdown.js', 'markdown', callback);
},
adjustSize = function () {
var rect = $(window).fracs('viewport'),
$container = $('#pv-txt-content'),
margin = 20,
barheight = 31;
$container.css({
// width: rect.width - 2 * margin,
height: rect.height - 2 * margin - barheight - 32,
// left: margin,
top: margin
});
},
preloadText = function (absHref, callback) {
$.ajax({
url: absHref,
dataType: 'text',
success: function (content) {
callback(content);
// setTimeout(function () { callback(content); }, 1000); // for testing
},
error: function (jqXHR, textStatus, errorThrown) {
callback('[ajax error] ' + textStatus);
}
});
},
onIndexChange = function (idx) {
currentIdx = (idx + currentEntries.length) % currentEntries.length;
var $container = $('#pv-txt-content'),
$text = $('#pv-txt-text'),
current = currentEntries[currentIdx],
spinnerTimeout = setTimeout(function () {
$container.spin({
length: 12,
width: 4,
radius: 24,
color: '#ccc',
shadow: true
});
}, 200);
preloadText(current.absHref, function (content) {
clearTimeout(spinnerTimeout);
$container.spin(false);
$text.fadeOut(100, function () {
var $nText;
if (current.type === 'markdown') {
$nText = $(templateMarkdown).hide();
$text.replaceWith($nText);
loadMarkdown(function (md) {
if (md) {
$nText.html(md.toHTML(content));
}
});
} else {
$nText = $(templateText).hide().addClass('toolbar: false; brush:').addClass(settings.types[current.type] || 'plain').text(content);
$text.replaceWith($nText);
loadSyntaxhighlighter(function (sh) {
if (sh) {
sh.highlight({}, $nText[0]);
}
});
}
$nText.fadeIn(200);
adjustSize();
$('#pv-txt-bar-label').text(current.label);
$('#pv-txt-bar-size').text('' + current.size + ' bytes');
$('#pv-txt-bar-idx').text('' + (currentIdx + 1) + ' / ' + currentEntries.length);
$('#pv-txt-bar-original').find('a').attr('href', current.absHref);
});
});
},
onEnter = function (entries, idx) {
$(window).on('keydown', onKeydown);
$('#pv-txt-overlay').stop(true, true).fadeIn(200);
currentEntries = entries;
onIndexChange(idx);
},
onNext = function () {
onIndexChange(currentIdx + 1);
},
onPrevious = function () {
onIndexChange(currentIdx - 1);
},
onExit = function () {
$(window).off('keydown', onKeydown);
$('#pv-txt-overlay').stop(true, true).fadeOut(200);
},
onKeydown = function (event) {
var key = event.which;
if (key === 27) { // esc
onExit();
} else if (key === 8 || key === 37 || key === 40) { // backspace, left, down
onPrevious();
} else if (key === 13 || key === 32 || key === 38 || key === 39) { // enter, space, up, right
onNext();
}
},
initEntry = function (entries, entry, idx) {
if (entry.$extended) {
entry.$extended.find('a').on('click', function (event) {
event.preventDefault();
onEnter(entries, idx);
});
}
},
init = function (entry) {
if (!settings.enabled) {
return;
}
var imageEntries = _.filter(entry.content, function (entry) {
return _.indexOf(_.keys(settings.types), entry.type) >= 0;
});
_.each(imageEntries, function (e, idx) {
initEntry(imageEntries, e, idx);
});
$(template).appendTo('body');
$('#pv-txt-bar-prev').on('click', onPrevious);
$('#pv-txt-bar-next').on('click', onNext);
$('#pv-txt-bar-close, #pv-txt-close').on('click', onExit);
$('#pv-txt-overlay').on('keydown', onKeydown);
$('#pv-txt-close')
.on('mouseenter', function () {
$('#pv-txt-bar-close').addClass('hover');
})
.on('mouseleave', function () {
$('#pv-txt-bar-close').removeClass('hover');
});
$('#pv-txt-overlay')
.on('click mousedown mousemove keydown keypress', function (event) {
event.stopPropagation();
});
$(window).on('resize load', adjustSize);
};
init(entry);
});

View File

@ -1,5 +1,5 @@
module.define('ext/qrcode', [jQuery, 'core/settings', 'core/event'], function ($, allsettings, event) {
modulejs.define('ext/qrcode', ['_', '$', 'modernizr', 'core/settings', 'core/event'], function (_, $, modernizr, allsettings, event) {
var defaults = {
enabled: false,
@ -15,7 +15,7 @@ module.define('ext/qrcode', [jQuery, 'core/settings', 'core/event'], function ($
update = function (entry) {
$context.find('.qrcode').empty().qrcode({
render: Modernizr.canvas ? 'canvas' : 'div',
render: modernizr.canvas ? 'canvas' : 'div',
width: settings.size,
height: settings.size,
color: '#333',

View File

@ -1,5 +1,5 @@
module.define('ext/select', [jQuery, 'core/settings', 'core/event'], function ($, allsettings, event) {
modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/event'], function (_, $, allsettings, event) {
var defaults = {
enabled: false
@ -90,7 +90,7 @@ module.define('ext/select', [jQuery, 'core/settings', 'core/event'], function ($
event.preventDefault();
$(':focus').blur();
if (!event.ctrlKey) {
if (!event.ctrlKey && !event.metaKey) {
$('#extended .entry').removeClass('selected');
publish();
}
@ -112,7 +112,7 @@ module.define('ext/select', [jQuery, 'core/settings', 'core/event'], function ($
noSelectionUnlessCtrl = function (event) {
if (!event.ctrlKey) {
if (!event.ctrlKey && !event.metaKey) {
noSelection(event);
}
},

View File

@ -1,5 +1,5 @@
module.define('ext/sort', [jQuery, 'core/settings', 'core/resource', 'core/store'], function ($, allsettings, resource, store) {
modulejs.define('ext/sort', ['_', '$', 'core/settings', 'core/resource', 'core/store'], function (_, $, allsettings, resource, store) {
var defaults = {
enabled: false,

View File

@ -1,5 +1,5 @@
module.define('ext/statusbar', [jQuery, 'core/settings', 'core/format', 'core/event', 'core/entry'], function ($, allsettings, format, event, entry) {
modulejs.define('ext/statusbar', ['_', '$', 'core/settings', 'core/format', 'core/event', 'core/entry'], function (_, $, allsettings, format, event, entry) {
var defaults = {
enabled: false

View File

@ -1,5 +1,5 @@
module.define('ext/thumbnails', [jQuery, 'core/settings', 'core/resource', 'core/entry'], function ($, allsettings, resource, entry) {
modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/entry', 'core/ajax'], function (_, allsettings, entry, ajax) {
var defaults = {
enabled: false,
@ -11,46 +11,32 @@ module.define('ext/thumbnails', [jQuery, 'core/settings', 'core/resource', 'core
settings = _.extend({}, defaults, allsettings.thumbnails),
requestThumb = function ($img, data) {
$.getJSON(resource.api(), data, function (json) {
if (json.code === 0) {
$img.addClass('thumb').attr('src', json.absHref);
}
});
},
checkEntry = function (entry) {
if (entry.$extended) {
var type = null;
if ($.inArray(entry.type, settings.img) >= 0) {
if (_.indexOf(settings.img, entry.type) >= 0) {
type = 'img';
} else if ($.inArray(entry.type, settings.mov) >= 0) {
} else if (_.indexOf(settings.mov, entry.type) >= 0) {
type = 'mov';
} else if ($.inArray(entry.type, settings.doc) >= 0) {
} else if (_.indexOf(settings.doc, entry.type) >= 0) {
type = 'doc';
}
if (type) {
requestThumb(entry.$extended.find('.icon.small img'), {
action: 'getthumbsrc',
type: type,
href: entry.absHref,
mode: 'square',
width: 16,
height: 16
ajax.getThumbSrcSmall(type, entry.absHref, function (src) {
if (src) {
entry.$extended.find('.icon.small img').addClass('thumb').attr('src', src);
}
});
requestThumb(entry.$extended.find('.icon.big img'), {
action: 'getthumbsrc',
type: type,
href: entry.absHref,
mode: 'rational',
width: 100,
height: 48
ajax.getThumbSrcBig(type, entry.absHref, function (src) {
if (src) {
entry.$extended.find('.icon.big img').addClass('thumb').attr('src', src);
}
});
}
}

View File

@ -1,5 +1,5 @@
module.define('ext/title', [jQuery, 'core/settings', 'core/entry'], function ($, allsettings, entry) {
modulejs.define('ext/title', ['_', 'core/settings', 'core/entry'], function (_, allsettings, entry) {
var defaults = {
enabled: false

View File

@ -1,5 +1,5 @@
module.define('ext/tree', [jQuery, 'core/settings', 'core/resource', 'core/event', 'core/entry', 'core/parser'], function ($, allsettings, resource, event, entry, parser) {
modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/event', 'core/entry', 'core/parser'], function (_, $, allsettings, resource, event, entry, parser) {
var defaults = {
enabled: false,
@ -101,15 +101,14 @@ module.define('ext/tree', [jQuery, 'core/settings', 'core/resource', 'core/event
createOnIndicatorClick = function (parser) {
var $tree = $('#tree'),
tree = $tree.get(0),
slide = function (entry, $indicator, $content, down) {
entry.isContentVisible = down;
$indicator.removeClass('open close').addClass(down ? 'open' : 'close');
tree.updateScrollbar(true);
$tree.scrollpanel('update', true);
$content[down ? 'slideDown' : 'slideUp'](function () {
tree.updateScrollbar();
$tree.scrollpanel('update');
});
};
@ -175,7 +174,6 @@ module.define('ext/tree', [jQuery, 'core/settings', 'core/resource', 'core/event
adjustSpacing = function () {
var $tree = $('#tree'),
tree = $tree[0],
winHeight = $(window).height(),
navHeight = $('#topbar').outerHeight(),
footerHeight = $('#bottombar').outerHeight();
@ -185,9 +183,7 @@ module.define('ext/tree', [jQuery, 'core/settings', 'core/resource', 'core/event
height: winHeight - navHeight - footerHeight - 16
});
if (tree.updateScrollbar) {
tree.updateScrollbar();
}
$tree.scrollpanel('update');
},
// creates the complete tree from entry down to the root
@ -197,27 +193,33 @@ module.define('ext/tree', [jQuery, 'core/settings', 'core/resource', 'core/event
return;
}
var $tree = $('<div id="tree" />').appendTo('body');
var $tree = $('<div id="tree" />')
.appendTo('body')
.scrollpanel()
.on('click', '.indicator', createOnIndicatorClick(parser))
.on('mouseenter', function () {
shiftTree(true);
})
.on('mouseleave', function () {
shiftTree();
});
fetchTree(entry, parser, function (root) {
$tree
.append(update(root))
.scrollpanel()
.find('.sp-container').append(update(root)).end()
.show();
adjustSpacing();
shiftTree(false, true);
setTimeout(function () { $tree.get(0).updateScrollbar(); }, 1);
});
$tree
.on('click', '.indicator', createOnIndicatorClick(parser))
.on('mouseenter', function () { shiftTree(true); })
.on('mouseleave', function () { shiftTree(); });
event.sub('ready', adjustSpacing);
$(window).on('resize', function () {
adjustSpacing();
shiftTree();
});

View File

@ -1,5 +1,5 @@
module.define('h5ai-info', [jQuery, 'core/resource'], function ($, resource) {
modulejs.define('h5ai-info', ['$', 'core/ajax'], function ($, ajax) {
var setCheckResult = function (id, result) {
@ -12,37 +12,17 @@ module.define('h5ai-info', [jQuery, 'core/resource'], function ($, resource) {
}
},
handleChecksResponse = function (response) {
$('.test').each(function () {
setCheckResult(this, response && response[$(this).data('id')]);
});
},
checks = function () {
$.ajax({
url: resource.api(),
data: {
action: 'getchecks'
},
type: 'POST',
dataType: 'json',
success: function (response) {
handleChecksResponse(response);
},
error: function () {
handleChecksResponse();
}
});
},
init = function () {
checks();
ajax.getChecks(function (json) {
if (json) {
$('.test').each(function () {
setCheckResult(this, json[$(this).data('id')]);
});
}
});
};
init();

View File

@ -1,17 +1,19 @@
module.define('h5ai-main', [jQuery, 'core/event', 'core/settings'], function ($, event, settings) {
modulejs.define('h5ai-main', ['_', 'core/event', 'core/settings'], function (_, event, settings) {
event.pub('beforeView');
module.require('view/extended');
module.require('view/viewmode');
module.require('view/spacing');
modulejs.require('view/extended');
modulejs.require('view/spacing');
modulejs.require('view/viewmode');
event.pub('beforeExt');
_.each(module.getIds(/^ext\/.+/), function (id) {
_.each(modulejs.state(), function (state, id) {
module.require(id);
if (/^ext\/.+/.test(id)) {
modulejs.require(id);
}
});
event.pub('ready');

View File

@ -1,130 +0,0 @@
/*!
* jQuery.qrcode
* author: Lars Jung
* license: MIT
*
* kudos to http://github.com/jeromeetienne/jquery-qrcode
*/
(function ($) {
'use strict';
// @include "qrcode.js"
var createQr = function (typeNumber, correctLevel, text) {
var qr = new qrcode(typeNumber, correctLevel);
qr.addData(text);
qr.make();
return qr;
},
createBestQr = function (text) {
for (var type = 2; type <= 10; type += 1) {
try {
return createQr(type, 'L', text);
} catch (err) {}
}
return null;
},
createCanvas = function (settings) {
var qr = createBestQr(settings.text),
$canvas = $('<canvas/>').attr('width', settings.width).attr('height', settings.height),
ctx = $canvas[0].getContext('2d');
if (settings.bgColor) {
ctx.fillStyle = settings.bgColor;
ctx.fillRect(0, 0, settings.width, settings.height);
}
if (qr) {
var moduleCount = qr.getModuleCount(),
moduleWidth = settings.width / moduleCount,
moduleHeight = settings.height / moduleCount,
row, col;
ctx.beginPath();
for (row = 0; row < moduleCount; row += 1) {
for (col = 0; col < moduleCount; col += 1) {
if (qr.isDark(row, col)) {
ctx.rect(col * moduleWidth, row * moduleHeight, moduleWidth, moduleHeight);
}
}
}
ctx.fillStyle = settings.color;
ctx.fill();
}
return $canvas;
},
createDiv = function (settings) {
var qr = createBestQr(settings.text),
$div = $('<div/>').css({
position: 'relative',
left: 0,
top: 0,
padding: 0,
margin: 0,
width: settings.width,
height: settings.height
});
if (settings.bgColor) {
$div.css('background-color', settings.bgColor);
}
if (qr) {
var moduleCount = qr.getModuleCount(),
moduleWidth = Math.floor(settings.width / moduleCount),
moduleHeight = Math.floor(settings.height / moduleCount),
offsetLeft = Math.floor(0.5 * (settings.width - moduleWidth * moduleCount)),
offsetTop = Math.floor(0.5 * (settings.height - moduleHeight * moduleCount)),
row, col;
for (row = 0; row < moduleCount; row++) {
for (col = 0; col < moduleCount; col++) {
if (qr.isDark(row, col)) {
$('<div/>')
.css({
left: offsetLeft + col * moduleWidth,
top: offsetTop + row * moduleHeight
})
.appendTo($div);
}
}
}
$div.children()
.css({
position: 'absolute',
padding: 0,
margin: 0,
width: moduleWidth,
height: moduleHeight,
'background-color': settings.color
});
}
return $div;
},
defaults = {
render: 'canvas',
width: 256,
height: 256,
color: '#000',
bgColor: null,
text: 'no text'
};
$.fn.qrcode = function(options) {
var settings = $.extend({}, defaults, options);
$(this).append(settings.render === 'canvas' ? createCanvas(settings) : createDiv(settings));
};
}(jQuery));

View File

@ -1,156 +0,0 @@
/*!
* jQuery.scrollpanel
* author: Lars Jung
* license: MIT
*
* still quick and dirty!
*/
(function (window, $) {
"use strict";
var $window = $(window),
init = function (htmlElement) {
var $element = $(htmlElement),
$scrollbar, $drag, $wrapper, $content, mouseOffsetY, updateId,
update, scroll;
if (!$element.css("position") || $element.css("position") === "static") {
$element.css("position", "relative");
}
$scrollbar = $("<div class='scrollbar' />");
$drag = $("<div class='drag' />").appendTo($scrollbar);
$element
.wrapInner("<div class='wrapper'><div class='content' /></div>")
.append($scrollbar);
$wrapper = $element.find("> .wrapper");
$content = $wrapper.find("> .content");
mouseOffsetY = 0;
update = function (repeat) {
var visibleHeight, contentHeight, scrollTop, scrollTopFrac, visVertFrac;
if (updateId && !repeat) {
clearInterval(updateId);
updateId = undefined;
} else if (!updateId && repeat) {
updateId = setInterval(function() { update(true); }, 50);
}
$wrapper.css("height", $element.height());
visibleHeight = $element.height();
contentHeight = $content.outerHeight();
scrollTop = $wrapper.scrollTop();
scrollTopFrac = scrollTop / contentHeight;
visVertFrac = Math.min(visibleHeight / contentHeight, 1);
if (visVertFrac < 1) {
$scrollbar
.fadeIn(50)
.css({
height: $element.innerHeight() + $scrollbar.height() - $scrollbar.outerHeight(true)
});
$drag
.css({
top: $scrollbar.height() * scrollTopFrac,
height: $scrollbar.height() * visVertFrac
});
} else {
$scrollbar.fadeOut(50);
}
};
scroll = function (event) {
var clickFrac = (event.pageY - $scrollbar.offset().top - mouseOffsetY) / $scrollbar.height();
$wrapper.scrollTop($content.outerHeight() * clickFrac);
update();
event.preventDefault();
};
$element
.on('mousewheel', function (event, delta, deltaX, deltaY) {
$wrapper.scrollTop($wrapper.scrollTop() - 50 * deltaY);
update();
event.stopPropagation();
event.preventDefault();
})
.on('scroll', update);
$element.get(0).updateScrollbar = update;
$wrapper
.css({
"padding-right": $scrollbar.outerWidth(true),
height: $element.height(),
overflow: "hidden"
});
$scrollbar
.css({
position: "absolute",
top: 0,
right: 0,
overflow: "hidden",
cursor: "pointer"
})
.mousedown(function (event) {
mouseOffsetY = $drag.outerHeight() / 2;
scroll(event);
$scrollbar.addClass("dragOn");
$window
.bind("mousemove", scroll)
.one("mouseup", function (event) {
$scrollbar.removeClass("dragOn");
$window.unbind("mousemove", scroll);
scroll(event);
event.stopPropagation();
});
event.preventDefault();
})
.each(function () {
this.onselectstart = function () {
return false;
};
});
$drag
.css({
position: "absolute",
left: 0,
width: "100%"
})
.mousedown(function (event) {
mouseOffsetY = event.pageY - $drag.offset().top;
scroll(event);
$scrollbar.addClass("dragOn");
$window
.bind("mousemove", scroll)
.one("mouseup", function (event) {
$scrollbar.removeClass("dragOn");
$window.unbind("mousemove", scroll);
scroll(event);
event.stopPropagation();
});
event.stopPropagation();
});
update();
};
$.fn.scrollpanel = function () {
return this.each(function () {
init(this);
});
};
}(window, jQuery));

View File

@ -1,198 +0,0 @@
/*!
* module.js
* author: Lars Jung
* license: MIT
*/
(function (global, name) {
'use strict';
var err = function (message) {
throw name + ' exception: ' + message;
};
if (!_) {
err(name + ' depends on underscore');
}
var self = {},
previous = global[name],
noConflict = function () {
if (global[name] === self) {
global[name] = previous;
}
return self;
},
definitions = {},
modules = {},
findDepsUnsafe = function (ids) {
var self = this;
var deps = [];
if (_.isString(ids)) {
var def = definitions[ids];
if (def) {
_.each(def.deps, function (id) {
deps = deps.concat(findDepsUnsafe(id));
});
deps.push(def.id);
} else {
deps.push(ids);
}
} else if (_.isArray(ids)) {
_.each(ids, function (id) {
deps = deps.concat(findDepsUnsafe(id));
});
}
return _.uniq(deps);
},
findDeps = function (ids) {
if (ids) {
try {
return findDepsUnsafe(ids);
} catch (e) {
err('cyclic dependencies for ids "' + ids + '"');
}
} else {
var res = {};
_.each(definitions, function (def, id) {
res[id] = findDeps(id);
});
return res;
}
},
log = function (showInvDeps) {
var allDeps = findDeps(),
allInvDeps = {},
out = '';
if (!showInvDeps) {
_.each(allDeps, function (deps, id) {
deps.pop();
out += (_.has(modules, id) ? '* ' : ' ') + id + ' -> [ ' + deps.join(', ') + ' ]\n';
});
} else {
_.each(definitions, function (def) {
var invDeps = [];
_.each(allDeps, function (depIds, id) {
if (_.indexOf(depIds, def.id) >= 0) {
invDeps.push(id);
}
});
allInvDeps[def.id] = invDeps;
});
_.each(allInvDeps, function (invDeps, id) {
invDeps.shift();
out += (_.has(modules, id) ? '* ' : ' ') + id + ' <- [ ' + invDeps.join(', ') + ' ]\n';
});
}
return out;
},
define = function (id, deps, fn) {
if (_.isFunction(deps)) {
fn = deps;
deps = [];
}
if (!_.isString(id)) {
err('id must be a string "' + id + '"');
}
if (!_.isArray(deps)) {
err('dependencies must be an array "' + deps + '"');
}
if (!_.isFunction(fn)) {
err('constructor must be a function "' + fn + '"');
}
if (definitions[id]) {
err('id already defined "' + id + '"');
}
definitions[id] = {
id: id,
deps: deps,
fn: fn
};
},
getIds = function (regexp) {
var ids = _.map(definitions, function (def) {
return def.id;
});
if (!_.isRegExp(regexp)) {
return ids;
}
return _.filter(ids, function (id) {
return regexp.test(id);
});
},
isDefined = function (id) {
return _.isString(id) ? !!definitions[id] : !!id;
},
require = function (id) {
if (!_.isString(id)) {
return id;
}
if (_.has(modules, id)) {
return modules[id];
}
var def = definitions[id];
if (!def) {
err('id not defined "' + id + '"');
}
var deps = _.map(def.deps, function (depId) {
return require(depId);
});
var obj = def.fn.apply(this, deps);
modules[id] = obj;
return obj;
};
_.extend(self, {
noConflict: noConflict,
log: log,
define: define,
require: require,
getIds: getIds,
isDefined: isDefined
});
global[name] = self;
}(this, 'module'));

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
// Underscore.js 1.3.1
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);

View File

@ -2,13 +2,17 @@
(function ($) {
'use strict';
// @include "core/ajax.js"
// @include "core/entry.js"
// @include "core/event.js"
// @include "core/format.js"
// @include "core/langs.js"
// @include "core/parser.js"
// @include "core/resource.js"
// @include "core/settings.js"
// @include "core/store.js"
// @include "core/types.js"
// @include "model/entry.js"
@ -24,10 +28,12 @@
// @include "ext/download.js"
// @include "ext/filter.js"
// @include "ext/folderstatus.js"
// @include "ext/google-analytics.js"
// @include "ext/l10n.js"
// @include "ext/link-hover-states.js"
// @include "ext/mode.js"
// @include "ext/preview-img.js"
// @include "ext/preview-txt.js"
// @include "ext/qrcode.js"
// @include "ext/select.js"
// @include "ext/sort.js"
@ -41,8 +47,21 @@
$(function () {
/*global H5AI_CONFIG, amplify, Base64, jQuery, Modernizr, moment, _ */
module.require($('body').attr('id'));
// Register predefined globals on doc ready, so the script order inside
// the document doesn't matter. `jQuery`, `moment` and `underscore` are
// itself functions, so they have to be wrapped to not be handled as
// constructors.
modulejs.define('config', H5AI_CONFIG);
modulejs.define('amplify', amplify);
modulejs.define('base64', Base64);
modulejs.define('$', function () { return jQuery; });
modulejs.define('modernizr', Modernizr);
modulejs.define('moment', function () { return moment; });
modulejs.define('_', function () { return _; });
modulejs.require($('body').attr('id'));
});
}(jQuery));

View File

@ -1,8 +1,56 @@
module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, types, ajax) {
var doc = document,
domain = doc.domain,
forceEncoding = function (href) {
return href
.replace(/\/+/g, '/')
.replace(/'/g, '%27')
.replace(/\[/g, '%5B')
.replace(/\]/g, '%5D')
.replace(/\(/g, '%28')
.replace(/\)/g, '%29')
.replace(/\+/g, '%2B')
.replace(/\=/g, '%3D');
},
location = (function () {
var rePrePathname = /.*:\/\/[^\/]*/,
rePostPathname = /[^\/]*$/,
uriToPathname = function (uri) {
return uri.replace(rePrePathname, '').replace(rePostPathname, '');
},
testpathname = '/a b',
a = doc.createElement('a'),
isDecoded, location;
a.href = testpathname;
isDecoded = uriToPathname(a.href) === testpathname;
a.href = doc.location.href;
location = uriToPathname(a.href);
if (isDecoded) {
location = encodeURIComponent(location).replace(/%2F/ig, '/');
}
return forceEncoding(location);
}()),
folderstatus = (function () {
try { return modulejs.require('ext/folderstatus'); } catch (e) {}
return {};
}()),
var domain = document.domain,
location = document.location.pathname.replace(/[^\/]*$/, ''),
// utils
@ -15,9 +63,7 @@ module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
if (sequence.length > 1 && reEndsWithSlash.test(sequence)) {
sequence = sequence.slice(0, -1);
}
try {
sequence = decodeURI(sequence);
} catch (err) {}
try { sequence = decodeURIComponent(sequence); } catch (e) {}
return sequence;
},
@ -29,90 +75,41 @@ module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
var match;
sequence = sequence.replace(/\/+/g, '/');
if (sequence === '/') {
return {
parent: null,
parentname: null,
name: '/'
};
return { parent: null, name: '/' };
}
match = reSplitPath2.exec(sequence);
if (match) {
return {
parent: match[1],
parentname: match[2],
name: match[3]
};
return { parent: match[1], name: match[3] };
}
match = reSplitPath.exec(sequence);
if (match) {
return {
parent: '/',
parentname: '/',
name: match[1]
};
return { parent: '/', name: match[1] };
}
},
reContentType = /^text\/html;h5ai=/,
ajaxRequest = function (self, parser, callback) {
$.ajax({
url: self.absHref,
type: parser ? 'GET' : 'HEAD',
complete: function (xhr) {
ajax.getStatus(self.absHref, parser, function (response) {
if (xhr.status === 200 && reContentType.test(xhr.getResponseHeader('Content-Type'))) {
self.status = 'h5ai';
if (parser) {
parser.parse(self.absHref, xhr.responseText);
}
} else {
self.status = xhr.status;
}
callback(self);
self.status = response.status;
if (parser && response.status === 'h5ai') {
parser.parse(self.absHref, response.content);
}
callback(self);
});
},
// Entry
// Cache
cache = {},
Entry = function (absHref) {
getEntry = function (absHref, time, size, status, isContentFetched) {
var split = splitPath(absHref);
cache[absHref] = this;
this.absHref = absHref;
this.type = types.getType(absHref);
this.label = createLabel(absHref === '/' ? domain : split.name);
this.time = null;
this.size = null;
this.parent = null;
this.status = null;
this.content = {};
if (split.parent) {
this.parent = cache[split.parent] || new Entry(split.parent);
this.parent.content[this.absHref] = this;
if (_.keys(this.parent.content).length > 1) {
this.parent.isContentFetched = true;
}
}
},
get = function (absHref, time, size, status, isContentFetched) {
absHref = absHref || location;
absHref = forceEncoding(absHref || location);
var self = cache[absHref] || new Entry(absHref);
@ -132,11 +129,9 @@ module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
return self;
},
folderstatus = module.isDefined('ext/folderstatus') ? module.require('ext/folderstatus') : {},
fetchStatus = function (absHref, callback) {
var self = cache[absHref] || new Entry(absHref);
var self = getEntry(absHref);
if (self.status || !self.isFolder()) {
callback(self);
@ -150,7 +145,7 @@ module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
fetchContent = function (absHref, parser, callback) {
var self = cache[absHref] || new Entry(absHref);
var self = getEntry(absHref);
if (self.isContentFetched) {
callback(self);
@ -168,6 +163,33 @@ module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
};
// Entry
var Entry = function (absHref) {
var split = splitPath(absHref);
cache[absHref] = this;
this.absHref = absHref;
this.type = types.getType(absHref);
this.label = createLabel(absHref === '/' ? domain : split.name);
this.time = null;
this.size = null;
this.parent = null;
this.status = null;
this.content = {};
if (split.parent) {
this.parent = getEntry(split.parent);
this.parent.content[this.absHref] = this;
if (_.keys(this.parent.content).length > 1) {
this.parent.isContentFetched = true;
}
}
};
_.extend(Entry.prototype, {
isFolder: function () {
@ -254,7 +276,9 @@ module.define('model/entry', [jQuery, 'core/types'], function ($, types) {
}
});
return {
get: get
get: getEntry
};
});

View File

@ -1,5 +1,5 @@
module.define('parser/apache-autoindex', [jQuery, 'core/settings', 'core/format', 'model/entry'], function ($, settings, format, Entry) {
modulejs.define('parser/apache-autoindex', ['_', '$', 'core/settings', 'core/format', 'model/entry'], function (_, $, settings, format, Entry) {
var parseTableRow = function (absHref, tr) {

View File

@ -1,5 +1,5 @@
module.define('parser/generic-json', [jQuery, 'core/settings', 'model/entry'], function ($, settings, Entry) {
modulejs.define('parser/generic-json', ['_', '$', 'core/settings', 'model/entry'], function (_, $, settings, Entry) {
var parser = {
id: 'generic-json',
@ -12,16 +12,16 @@ module.define('parser/generic-json', [jQuery, 'core/settings', 'model/entry'], f
parseJson = function (absHref, json) {
if (json.hasOwnProperty('customHeader')) {
if (_.has(json, 'customHeader')) {
settings.custom.header = json.customHeader;
}
if (json.hasOwnProperty('customFooter')) {
if (_.has(json, 'customFooter')) {
settings.custom.footer = json.customFooter;
}
if (json.hasOwnProperty('mode')) {
if (_.has(json, 'mode')) {
parser.mode = json.mode;
}
if (json.hasOwnProperty('server')) {
if (_.has(json, 'server')) {
parser.server = json.server;
}

View File

@ -1,5 +1,5 @@
module.define('view/extended', [jQuery, 'core/settings', 'core/resource', 'core/format', 'core/event', 'core/entry'], function ($, allsettings, resource, format, event, entry) {
modulejs.define('view/extended', ['_', '$', 'core/settings', 'core/resource', 'core/format', 'core/event', 'core/entry'], function (_, $, allsettings, resource, format, event, entry) {
var defaults = {
modes: ['details', 'icons'],

View File

@ -1,5 +1,5 @@
module.define('view/spacing', [jQuery, 'core/settings', 'core/event'], function ($, allsettings, event) {
modulejs.define('view/spacing', ['_', '$', 'core/settings', 'core/event'], function (_, $, allsettings, event) {
var defaults = {
maxWidth: 960,

View File

@ -1,5 +1,5 @@
module.define('view/viewmode', [jQuery, 'core/settings', 'core/resource', 'core/store'], function ($, allsettings, resource, store) {
modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'core/store'], function (_, $, allsettings, resource, store) {
var defaults = {
modes: ['details', 'list', 'icons'],

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/*! jQuery.scrollpanel 0.1 - //larsjung.de/scrollpanel - MIT License */
(function(a){"use strict";var b=a(window),c="scrollpanel",d={prefix:"sp-"},e=function(b,c){var e=this;e.$el=a(b),e.settings=a.extend({},d,c);var f=e.settings.prefix;e.mouseOffsetY=0,e.updateId=0,e.scrollProxy=a.proxy(e.scroll,e),(!e.$el.css("position")||e.$el.css("position")==="static")&&e.$el.css("position","relative"),e.$scrollbar=a('<div class="'+f+'scrollbar" />'),e.$thumb=a('<div class="'+f+'thumb" />').appendTo(e.$scrollbar),e.$el.addClass(f+"host").wrapInner('<div class="'+f+'viewport"><div class="'+f+'container" /></div>').append(e.$scrollbar),e.$viewport=e.$el.find("> ."+f+"viewport"),e.$container=e.$viewport.find("> ."+f+"container"),e.$el.on("mousewheel",function(a,b,c,d){e.$viewport.scrollTop(e.$viewport.scrollTop()-50*d),e.update(),a.preventDefault(),a.stopPropagation()}).on("scroll",function(){e.update()}),e.$viewport.css({paddingRight:e.$scrollbar.outerWidth(!0),height:e.$el.height(),overflow:"hidden"}),e.$container.css({overflow:"hidden"}),e.$scrollbar.css({position:"absolute",top:0,right:0,overflow:"hidden"}).on("mousedown",function(a){e.mouseOffsetY=e.$thumb.outerHeight()/2,e.onMousedown(a)}).each(function(){e.onselectstart=function(){return!1}}),e.$thumb.css({position:"absolute",left:0,width:"100%"}).on("mousedown",function(a){e.mouseOffsetY=a.pageY-e.$thumb.offset().top,e.onMousedown(a)}),e.update()};a.extend(e.prototype,{update:function(a){var b=this;b.updateId&&!a?(clearInterval(b.updateId),b.updateId=0):!b.updateId&&a&&(b.updateId=setInterval(function(){b.update(!0)},50)),b.$viewport.css("height",b.$el.height());var c=b.$el.height(),d=b.$container.outerHeight(),e=b.$viewport.scrollTop(),f=e/d,g=Math.min(c/d,1),h=b.$scrollbar.height();g<1?(b.$scrollbar.css({height:b.$el.innerHeight()+h-b.$scrollbar.outerHeight(!0)}).fadeIn(50),b.$thumb.css({top:h*f,height:h*g})):b.$scrollbar.fadeOut(50)},scroll:function(a){var b=this,c=(a.pageY-b.$scrollbar.offset().top-b.mouseOffsetY)/b.$scrollbar.height();b.$viewport.scrollTop(b.$container.outerHeight()*c),b.update(),a.preventDefault(),a.stopPropagation()},onMousedown:function(a){var c=this;c.scroll(a),c.$scrollbar.addClass("active"),b.on("mousemove",c.scrollProxy).one("mouseup",function(a){c.$scrollbar.removeClass("active"),b.off("mousemove",c.scrollProxy),c.scroll(a)})}}),a.fn[c]=function(b,d){return this.each(function(){var f=a(this),g=f.data(c);g||(g=new e(this,b),g.update(),f.data(c,g)),b==="update"&&g.update(d)})}})(jQuery)

View File

@ -1,5 +1,5 @@
/*
http://www.JSON.org/json2.js
json2.js
2011-10-19
Public Domain.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
/* Modernizr 2.6.1 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-opacity-rgba-canvas-history-audio-video-shiv-cssclasses-prefixes
*/
;window.Modernizr=function(a,b,c){function v(a){j.cssText=a}function w(a,b){return v(m.join(a+";")+(b||""))}function x(a,b){return typeof a===b}function y(a,b){return!!~(""+a).indexOf(b)}function z(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:x(f,"function")?f.bind(d||b):f}return!1}var d="2.6.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t={}.hasOwnProperty,u;!x(t,"undefined")&&!x(t.call,"undefined")?u=function(a,b){return t.call(a,b)}:u=function(a,b){return b in a&&x(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e}),n.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},n.history=function(){return!!a.history&&!!history.pushState},n.rgba=function(){return v("background-color:rgba(150,255,150,.5)"),y(j.backgroundColor,"rgba")},n.opacity=function(){return w("opacity:.55"),/^0.55$/.test(j.opacity)},n.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},n.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c};for(var A in n)u(n,A)&&(s=A.toLowerCase(),e[s]=n[A](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)u(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},v(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document);

View File

@ -0,0 +1,247 @@
/*! modulejs 0.2 - //larsjung.de/modulejs - MIT License */
(function (global, name) {
'use strict';
var objProto = Object.prototype,
arrayForEach = Array.prototype.forEach,
isType = function (arg, type) {
return objProto.toString.call(arg) === '[object ' + type + ']';
},
isString = function (arg) {
return isType(arg, 'String');
},
isFunction = function (arg) {
return isType(arg, 'Function');
},
isArray = Array.isArray || function (arg) {
return isType(arg, 'Array');
},
isObject = function (arg) {
return arg === new Object(arg);
},
has = function (arg, id) {
return objProto.hasOwnProperty.call(arg, id);
},
each = function (obj, iterator, context) {
if (arrayForEach && obj.forEach === arrayForEach) {
obj.forEach(iterator, context);
} else if (obj.length === +obj.length) {
for (var i = 0, l = obj.length; i < l; i += 1) {
iterator.call(context, obj[i], i, obj);
}
} else {
for (var key in obj) {
if (has(obj, key)) {
iterator.call(context, obj[key], key, obj);
}
}
}
},
contains = function (array, item) {
for (var i = 0, l = array.length; i < l; i += 1) {
if (array[i] === item) {
return true;
}
}
return false;
},
uniq = function (array) {
var elements = {},
result = [];
each(array, function (el) {
if (!has(elements, el)) {
result.push(el);
elements[el] = 1;
}
});
return result;
},
err = function (condition, code, message) {
if (condition) {
throw {
code: code,
msg: message,
toString: function () {
return name + ' error ' + code + ': ' + message;
}
};
}
},
// Module definitions.
definitions = {},
// Module instances.
instances = {},
resolve = function (id, cold, stack) {
err(!isString(id), 31, 'id must be a string "' + id + '"');
if (!cold && has(instances, id)) {
return instances[id];
}
var def = definitions[id];
err(!def, 32, 'id not defined "' + id + '"');
stack = (stack || []).slice(0);
stack.push(id);
var deps = [];
each(def.deps, function (depId, idx) {
err(contains(stack, depId), 33, 'cyclic dependencies: ' + stack + ' & ' + depId);
if (cold) {
deps = deps.concat(resolve(depId, cold, stack));
deps.push(depId);
} else {
deps[idx] = resolve(depId, cold, stack);
}
});
if (cold) {
return uniq(deps);
}
var obj = def.fn.apply(global, deps);
instances[id] = obj;
return obj;
},
// Public methods
// --------------
// ### define
// Defines a module for `id: String`, optional `deps: Array[String]`,
// `arg: Object/function`.
define = function (id, deps, arg) {
// sort arguments
if (arg === undefined) {
arg = deps;
deps = [];
}
// check arguments
err(!isString(id), 11, 'id must be a string "' + id + '"');
err(definitions[id], 12, 'id already defined "' + id + '"');
err(!isArray(deps), 13, 'dependencies for "' + id + '" must be an array "' + deps + '"');
err(!isObject(arg) && !isFunction(arg), 14, 'arg for "' + id + '" must be object or function "' + arg + '"');
// accept definition
definitions[id] = {
id: id,
deps: deps,
fn: isFunction(arg) ? arg : function () { return arg; }
};
},
// ### require
// Returns an instance for `id`.
require = function (id) {
return resolve(id);
},
// ### state
// Returns an object that holds infos about the current definitions and dependencies.
state = function () {
var res = {};
each(definitions, function (def, id) {
res[id] = {
// direct dependencies
deps: def.deps.slice(0),
// transitive dependencies
reqs: resolve(id, true),
// already initiated/required
init: has(instances, id)
};
});
each(definitions, function (def, id) {
var inv = [];
each(definitions, function (def2, id2) {
if (contains(res[id2].reqs, id)) {
inv.push(id2);
}
});
// all inverse dependencies
res[id].reqd = inv;
});
return res;
},
// ### log
// Returns a string that displays module dependencies.
log = function (inv) {
var out = '\n';
each(state(), function (st, id) {
var list = inv ? st.reqd : st.reqs;
out += (st.init ? '* ' : ' ') + id + ' -> [ ' + list.join(', ') + ' ]\n';
});
return out;
};
// Register Public API
// -------------------
global[name] = {
define: define,
require: require,
state: state,
log: log
};
// Uncomment to run internal tests.
/*
if (global[name.toUpperCase()] === true) {
global[name.toUpperCase()] = {
isString: isString,
isFunction: isFunction,
isArray: isArray,
isObject: isObject,
has: has,
each: each,
contains: contains,
uniq: uniq,
err: err,
definitions: definitions,
instances: instances,
resolve: resolve
};
} // */
}(this, 'modulejs'));

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d<c.9;d++)i[c[d]]=a}2 o(c){1 a=r.H("J"),d=3;a.K=c;a.M="L/t";a.G="t";a.u=a.v=2(){6(!d&&(!8.7||8.7=="F"||8.7=="z")){d=q;e[c]=q;a:{4(1 p y e)6(e[p]==3)B a;j&&5.C(k)}a.u=a.v=x;a.D.O(a)}};r.N.R(a)}1 f=Q,l=h.P(),i={},e={},j=3,k=x,b;5.T=2(c){k=c;j=q};4(b=0;b<f.9;b++){1 m=f[b].w?f[b]:f[b].S(/\\s+/),g=m.w();n(m,g)}4(b=0;b<l.9;b++)6(g=i[l[b].E.A]){e[g]=3;o(g)}}})();',56,56,'|var|function|false|for|SyntaxHighlighter|if|readyState|this|length|||||||||||||||||true|document||javascript|onload|onreadystatechange|pop|null|in|complete|brush|break|highlight|parentNode|params|loaded|language|createElement|autoloader|script|src|text|type|body|removeChild|findElements|arguments|appendChild|split|all'.split('|'),0,{}))

59
src/_h5ai/js/lib/sh/shBrushAS3.js vendored Normal file
View File

@ -0,0 +1,59 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
// Created by Peter Atoria @ http://iAtoria.com
var inits = 'class interface function package';
var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' +
'extends false final finally flash_proxy for get if implements import in include Infinity ' +
'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' +
'Null Number Object object_proxy override parseFloat parseInt private protected public ' +
'return set static String super switch this throw true try typeof uint undefined unescape ' +
'use void while with'
;
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
{ regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
{ regex: new RegExp('var', 'gm'), css: 'variable' }, // variable
{ regex: new RegExp('trace', 'gm'), css: 'color1' } // trace
];
this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['actionscript3', 'as3'];
SyntaxHighlighter.brushes.AS3 = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

File diff suppressed because one or more lines are too long

59
src/_h5ai/js/lib/sh/shBrushBash.js vendored Normal file
View File

@ -0,0 +1,59 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne ge le';
var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
'vi watch wc whereis which who whoami Wget xargs yes'
;
this.regexList = [
{ regex: /^#!.*$/gm, css: 'preprocessor bold' },
{ regex: /\/[\w-\/]+/gm, css: 'plain' },
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
{ regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
];
}
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['bash', 'shell'];
SyntaxHighlighter.brushes.Bash = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

65
src/_h5ai/js/lib/sh/shBrushCSharp.js vendored Normal file
View File

@ -0,0 +1,65 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
'continue decimal default delegate do double else enum event explicit ' +
'extern false finally fixed float for foreach get goto if implicit in int ' +
'interface internal is lock long namespace new null object operator out ' +
'override params private protected public readonly ref return sbyte sealed set ' +
'short sizeof stackalloc static string struct switch this throw true try ' +
'typeof uint ulong unchecked unsafe ushort using virtual void while';
function fixComments(match, regexInfo)
{
var css = (match[0].indexOf("///") == 0)
? 'color1'
: 'comments'
;
return [new SyntaxHighlighter.Match(match[0], match.index, css)];
}
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
{ regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
{ regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
{ regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
{ regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
];
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['c#', 'c-sharp', 'csharp'];
SyntaxHighlighter.brushes.CSharp = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

100
src/_h5ai/js/lib/sh/shBrushColdFusion.js vendored Normal file
View File

@ -0,0 +1,100 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
// Contributed by Jen
// http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus
var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' +
'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' +
'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' +
'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' +
'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' +
'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' +
'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' +
'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' +
'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' +
'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' +
'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' +
'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' +
'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' +
'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' +
'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' +
'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' +
'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' +
'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' +
'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' +
'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' +
'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' +
'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' +
'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' +
'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' +
'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' +
'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' +
'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' +
'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' +
'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' +
'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' +
'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' +
'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' +
'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' +
'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' +
'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' +
'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' +
'XmlValidate Year YesNoFormat';
var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' +
'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' +
'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' +
'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' +
'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' +
'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' +
'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' +
'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' +
'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' +
'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' +
'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' +
'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' +
'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' +
'cfwindow cfxml cfzip cfzipparam';
var operators = 'all and any between cross in join like not null or outer some';
this.regexList = [
{ regex: new RegExp('--(.*)$', 'gm'), css: 'comments' }, // one line and multiline comments
{ regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // single quoted strings
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // functions
{ regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
];
}
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['coldfusion','cf'];
SyntaxHighlighter.brushes.ColdFusion = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

97
src/_h5ai/js/lib/sh/shBrushCpp.js vendored Normal file
View File

@ -0,0 +1,97 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
// Copyright 2006 Shin, YoungJin
var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
'va_list wchar_t wctrans_t wctype_t wint_t signed';
var keywords = 'break case catch class const __finally __exception __try ' +
'const_cast continue private public protected __declspec ' +
'default delete deprecated dllexport dllimport do dynamic_cast ' +
'else enum explicit extern if for friend goto inline ' +
'mutable naked namespace new noinline noreturn nothrow ' +
'register reinterpret_cast return selectany ' +
'sizeof static static_cast struct switch template this ' +
'thread throw true false try typedef typeid typename union ' +
'using uuid virtual void volatile whcar_t while';
var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
'fwrite getc getchar gets perror printf putc putchar puts remove ' +
'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
'clock ctime difftime gmtime localtime mktime strftime time';
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
{ regex: /^ *#.*/gm, css: 'preprocessor' },
{ regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
{ regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
];
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['cpp', 'c'];
SyntaxHighlighter.brushes.Cpp = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

91
src/_h5ai/js/lib/sh/shBrushCss.js vendored Normal file
View File

@ -0,0 +1,91 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
};
function getValuesCSS(str)
{
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
};
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
{ regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
{ regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
{ regex: /!important/g, css: 'color3' }, // !important
{ regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
{ regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
{ regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
];
this.forHtmlScript({
left: /(&lt;|<)\s*style.*?(&gt;|>)/gi,
right: /(&lt;|<)\/\s*style\s*(&gt;|>)/gi
});
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['css'];
SyntaxHighlighter.brushes.CSS = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

55
src/_h5ai/js/lib/sh/shBrushDelphi.js vendored Normal file
View File

@ -0,0 +1,55 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
'case char class comp const constructor currency destructor div do double ' +
'downto else end except exports extended false file finalization finally ' +
'for function goto if implementation in inherited int64 initialization ' +
'integer interface is label library longint longword mod nil not object ' +
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
'pint64 pointer private procedure program property pshortstring pstring ' +
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
'record repeat set shl shortint shortstring shr single smallint string then ' +
'threadvar to true try type unit until uses val var varirnt while widechar ' +
'widestring with word write writeln xor';
this.regexList = [
{ regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
{ regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
{ regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
{ regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
];
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['delphi', 'pascal', 'pas'];
SyntaxHighlighter.brushes.Delphi = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

41
src/_h5ai/js/lib/sh/shBrushDiff.js vendored Normal file
View File

@ -0,0 +1,41 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
this.regexList = [
{ regex: /^\+\+\+.*$/gm, css: 'color2' },
{ regex: /^\-\-\-.*$/gm, css: 'color2' },
{ regex: /^\s.*$/gm, css: 'color1' },
{ regex: /^@@.*@@$/gm, css: 'variable' },
{ regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
{ regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
];
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['diff', 'patch'];
SyntaxHighlighter.brushes.Diff = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

52
src/_h5ai/js/lib/sh/shBrushErlang.js vendored Normal file
View File

@ -0,0 +1,52 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
function Brush()
{
// Contributed by Jean-Lou Dupont
// http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
// According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
'case catch cond div end fun if let not of or orelse '+
'query receive rem try when xor'+
// additional
' module export import define';
this.regexList = [
{ regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' },
{ regex: new RegExp("\\%.+", 'gm'), css: 'comments' },
{ regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' },
{ regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' },
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
];
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['erl', 'erlang'];
SyntaxHighlighter.brushes.Erland = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();

Some files were not shown because too many files have changed in this diff Show More