1
0
mirror of https://github.com/lrsjng/h5ai.git synced 2025-08-29 16:50:08 +02:00

Compare commits

..

467 Commits

Author SHA1 Message Date
Lars Jung
c521ecd055 Update deps. 2019-02-20 22:06:03 +01:00
Lars Jung
44e53ab213 Dev options. 2016-08-13 20:24:54 +02:00
Lars Jung
5af71185ff Release v0.29.0. 2016-08-12 14:57:36 +02:00
Lars Jung
d714ea90fb Prepare release. 2016-08-12 14:49:20 +02:00
Lars Jung
1e12faa756 Clean PHP. 2016-08-12 14:35:34 +02:00
Lars Jung
85ddff9c2d Turn onReady/Load into promised code. 2016-08-12 12:28:56 +02:00
Lars Jung
00232389ad Update changelog. 2016-08-11 19:51:55 +02:00
Lars Jung
e10fe49cc0 Add chunksize to thumbnail requests. 2016-08-11 19:50:28 +02:00
Lars Jung
6c52ae659f Update deps. 2016-08-11 17:31:42 +02:00
Lars Jung
3c54c1d66c Add space. 2016-08-11 16:43:06 +02:00
Lars Jung
940608d02a Fix selector field. 2016-08-11 00:53:43 +02:00
Lars Jung
b6b8d9f144 Clean some PHP code. 2016-08-11 00:33:06 +02:00
Lars Jung
c559edc208 Update changelog. 2016-08-10 23:59:27 +02:00
Lars Jung
4a41994556 Update changelog. 2016-08-10 23:49:41 +02:00
Lars Jung
d763d6b20a Fix safari language selection. 2016-08-10 16:35:57 +02:00
Lars Jung
dc2a74d251 Fix xhr check for safari. 2016-08-10 15:58:05 +02:00
Lars Jung
fe5ce111af Clean fallback mode topbar style. 2016-08-10 15:54:03 +02:00
Lars Jung
a930f4ce1b Clean info page styles. 2016-08-10 00:43:18 +02:00
Lars Jung
dae89ba5d8 Fix emtpy selection issues. 2016-08-10 00:20:40 +02:00
Lars Jung
78df81266c Another fix for download-all. 2016-08-09 23:26:16 +02:00
Lars Jung
b261c7e937 Docs. 2016-08-09 23:06:12 +02:00
Lars Jung
f9a7a217f8 Dereference sym links when using du. 2016-08-09 22:46:28 +02:00
Lars Jung
4d96cb47ad Fix drag-select on scrollable content. 2016-08-09 22:28:01 +02:00
Lars Jung
0f4fe15195 Fix always visible download button. 2016-08-09 19:27:43 +02:00
Lars Jung
d20d1e8b2c Lighter sidebars. 2016-08-09 03:06:50 +02:00
Lars Jung
4130f7a6fd Center icon labels. 2016-08-09 02:49:51 +02:00
Lars Jung
4ccd4bb030 Back to a cleaner GUI. 2016-08-07 18:15:22 +02:00
Lars Jung
16926f821d Update deps. 2016-08-03 11:52:45 +02:00
Lars Jung
7b5599e9d1 Merge pull request #561 from edmundlaugasson/master
added Estonian translation
2016-08-03 11:42:54 +02:00
Lars Jung
834f3b5425 Clean some tests. 2016-08-03 11:40:53 +02:00
Lars Jung
f0bee58869 Update piwik-analytics code. 2016-08-03 10:28:17 +02:00
edmundlaugasson
03e89dab5e added Estonian translation 2016-08-03 09:38:24 +03:00
Lars Jung
b7f25c45f2 Add unload funcs to audio and video previews. 2016-08-01 14:34:52 +02:00
Lars Jung
e5966bc610 Merge pull request #557 from Sirgue/patch-1
Update fr.json
2016-08-01 13:42:30 +02:00
Sirgue
78bc1e2a1e Update fr.json
Some translates for french language
2016-07-28 05:01:53 +02:00
Lars Jung
0315e29b44 Update deps. 2016-07-26 00:10:00 +02:00
Lars Jung
152dcb9b46 Revert. 2016-07-25 21:38:44 +02:00
Lars Jung
3a87b594a6 Update deps. 2016-07-25 20:15:35 +02:00
Lars Jung
631a0f7aa3 Merge pull request #556 from unix4you2/patch-2
Update es.json
2016-07-25 02:46:51 +02:00
Lars Jung
5564559b7c Merge pull request #555 from unix4you2/patch-1
Update es.json
2016-07-25 02:46:19 +02:00
Lars Jung
0e0f06d634 Add some tests. 2016-07-24 01:23:10 +02:00
Lars Jung
e52b3dd440 Width hack. 2016-07-23 22:30:26 +02:00
Lars Jung
c486962ff8 Minor. 2016-07-23 11:18:18 +02:00
Lars Jung
3fe1b2d6f8 Add tests. 2016-07-23 03:03:35 +02:00
Lars Jung
691cbce10f Replace regularCmp with cmp. 2016-07-23 02:36:16 +02:00
Lars Jung
4ccab28253 Update preview code. 2016-07-23 02:15:59 +02:00
Lars Jung
a6994150ca Add jsdom for headless testing. 2016-07-22 21:19:10 +02:00
Lars Jung
1d4b4b8a02 Update dom. 2016-07-22 20:15:14 +02:00
Lars Jung
20e080751d Update preview code. 2016-07-22 19:43:44 +02:00
Lars Jung
8a4ccd098c Clean preview code. 2016-07-22 03:59:50 +02:00
Lars Jung
9e0b1698fc Replace prism with lolight. 2016-07-21 16:31:14 +02:00
Lars Jung
18dfa1e09f Move some deps to package.json. 2016-07-21 14:26:48 +02:00
Lars Jung
83aad78ab0 Fix preview. 2016-07-21 13:48:54 +02:00
Lars Jung
9b88cdeb9b Update deps. 2016-07-21 13:44:31 +02:00
John Arroyave
11030a17af Update es.json 2016-07-11 08:02:25 -05:00
John Arroyave
aa7df50402 Update es.json 2016-07-11 07:44:35 -05:00
Lars Jung
2008d0755c Clean code. 2016-07-06 16:15:13 +02:00
Lars Jung
c7fdfc27a1 Update normalize to 4.2.0. 2016-07-02 15:11:11 +02:00
Lars Jung
717e046bb9 Update deps. 2016-07-02 13:41:01 +02:00
Lars Jung
5bbc88b8e2 Update tests. 2016-07-02 02:40:34 +02:00
Lars Jung
babb952485 Remove peer5 options. 2016-07-02 01:39:27 +02:00
Lars Jung
22b2db8daf Clean some code. 2016-07-02 00:38:52 +02:00
Lars Jung
8485905901 Clean sort code. 2016-07-01 19:26:17 +02:00
Lars Jung
73e74bb887 Update eslintrc. 2016-07-01 15:00:39 +02:00
Lars Jung
a893cb7534 Update readme. 2016-07-01 14:48:41 +02:00
Lars Jung
87e5472d42 Minor. 2016-07-01 14:44:51 +02:00
Lars Jung
05194167e1 Update prism. 2016-07-01 14:38:23 +02:00
Lars Jung
6dbffb8be1 Minor. 2016-07-01 03:55:27 +02:00
Lars Jung
24945faded Remove last jQuery refs and jQuery itself. 2016-07-01 03:27:38 +02:00
Lars Jung
3761a40e50 Clean code. 2016-06-30 02:19:49 +02:00
Lars Jung
f547d95f30 Minor. 2016-06-29 22:06:43 +02:00
Lars Jung
4a3e8c6734 Minor. 2016-06-29 19:03:54 +02:00
Lars Jung
07ccdbd734 Remove peer5. 2016-06-29 17:42:01 +02:00
Lars Jung
47b46813db Clean select code. 2016-06-29 16:59:39 +02:00
Lars Jung
82c0ae88f8 Clean select code. 2016-06-29 16:57:32 +02:00
Lars Jung
749c8b29c9 Clean select code. 2016-06-29 01:55:28 +02:00
Lars Jung
d0b6197aec Clean custom code. 2016-06-28 21:34:55 +02:00
Lars Jung
3b8edf9ad8 Clean tree code. 2016-06-28 19:44:52 +02:00
Lars Jung
9c4f3111ba Remove jq from tree. 2016-06-28 03:01:07 +02:00
Lars Jung
901d8c407d Bundle utils. 2016-06-26 17:57:25 +02:00
Lars Jung
6b3ba18da1 Update dom. 2016-06-26 17:07:43 +02:00
Lars Jung
cfbae4c5d5 Update. 2016-06-26 14:08:18 +02:00
Lars Jung
7320592dc2 Start to replace jQuery with dom. 2016-06-26 01:03:24 +02:00
Lars Jung
9234e3f287 Clean code. 2016-06-25 00:39:57 +02:00
Lars Jung
95c473a7c7 Clean code. 2016-06-24 23:06:00 +02:00
Lars Jung
3e14d7bed4 Clean code. 2016-06-24 21:26:59 +02:00
Lars Jung
aebfdeb1cd Remove all lodash deps. 2016-06-24 20:31:40 +02:00
Lars Jung
131d153cf5 More changes from jq.data to pure props. 2016-06-24 19:37:57 +02:00
Lars Jung
a3c9bc9db0 Initial switch from jq.data to pure props. 2016-06-24 18:59:16 +02:00
Lars Jung
06b4d81a61 Clean code. 2016-06-24 18:18:44 +02:00
Lars Jung
d8d7b997b5 Remove some more lodash refs. 2016-06-24 16:59:31 +02:00
Lars Jung
26c4d569aa Merge pull request #544 from PeterDaveHelloKitchen/image-optimize
optimize png images losslessly using zopflipng
2016-06-24 13:19:04 +02:00
Lars Jung
67d9e9794b Merge pull request #542 from kuoruan/translate
Update Chinese Translate
2016-06-24 13:15:23 +02:00
Lars Jung
0b8d7e5343 Minor. 2016-06-24 01:11:26 +02:00
Lars Jung
c3cd171785 Refactor. 2016-06-23 13:15:12 +02:00
Lars Jung
171f1c12eb Overlay sidebar. 2016-06-23 00:27:24 +02:00
Lars Jung
50644c84dc Overlay sidebar on small screens. 2016-06-23 00:19:23 +02:00
Lars Jung
92e8e34a66 Improve 64-bit hint. 2016-06-22 23:14:25 +02:00
Lars Jung
804df4c0fb Refactor PHP. 2016-06-22 22:07:57 +02:00
Lars Jung
41bb7d76b5 Refactor PHP. 2016-06-22 22:04:35 +02:00
Lars Jung
35df02984b Clean code. 2016-06-22 21:15:50 +02:00
Lars Jung
e0fc7043b5 Add PHP arch check. 2016-06-22 18:15:55 +02:00
Lars Jung
628836a201 PHP filesize. 2016-06-22 16:54:32 +02:00
Lars Jung
00f9ee09d3 Minor. 2016-06-22 11:36:36 +02:00
Lars Jung
029d4ed5af Minor. 2016-06-22 11:36:16 +02:00
Lars Jung
cd7c3c3dd4 Update editorconfig. 2016-06-21 03:25:20 +02:00
Lars Jung
d5c9668013 Update eslint. 2016-06-21 03:20:04 +02:00
Lars Jung
2fb7f9129e Add source check. 2016-06-21 03:16:35 +02:00
Lars Jung
f6150c58f4 Clean code. 2016-06-20 01:37:18 +02:00
Lars Jung
3246525d78 Remove some lodash deps. 2016-06-20 00:13:52 +02:00
Lars Jung
fe9cdbc46b Clean code. 2016-06-19 23:05:31 +02:00
Lars Jung
324fceb5c3 Move server to root dir. 2016-06-19 19:21:32 +02:00
Lars Jung
8656bdd74e Update styles. 2016-06-19 16:50:23 +02:00
Lars Jung
8ef9575e51 Replace jQuery.qrcode with kjua 0.1.1. 2016-06-19 14:47:39 +02:00
Lars Jung
1fc72d8473 Update ghu.js. 2016-06-19 14:08:26 +02:00
Lars Jung
2153056266 Rename global.js to pre.js. 2016-06-19 13:57:10 +02:00
Lars Jung
2240bd3ca1 Update deps. 2016-06-18 12:22:29 +02:00
Peter Dave Hello
127eaf9aac optimize png images losslessly using zopflipng 2016-06-11 10:21:37 +08:00
Lars Jung
7d5945d45b Minor changes. 2016-06-04 16:26:08 +02:00
Lars Jung
1d2c45dc68 Refactor view files. Add option to disable sidebar. 2016-06-04 16:09:35 +02:00
Lars Jung
2ee4a18e1c Clean build file. 2016-06-04 14:36:08 +02:00
Lars Jung
f0a9937dc6 Switch file names from jade to pug. 2016-06-04 02:43:48 +02:00
Lars Jung
3a2e61b163 Clean up tests. 2016-06-04 01:06:25 +02:00
Lars Jung
c4fa90a747 Add scar tests. 2016-06-03 23:08:30 +02:00
Lars Jung
1cba9290b6 Refactor win.js into globals.js. 2016-06-03 22:40:05 +02:00
Lars Jung
58cbad2bfd Disable filter. 2016-06-03 17:56:50 +02:00
Lars Jung
da9d027fed Remove custom modernizr. 2016-06-03 17:46:01 +02:00
Lars Jung
70d6528190 Test some module designs. 2016-06-03 17:38:00 +02:00
Lars Jung
f7187fb14b Stricter browser checks. Drop IE support. 2016-06-03 17:36:42 +02:00
Lars Jung
7ec2bdf16a Begin to move all src javascript to es6. Add search/filter ignore case option. 2016-06-02 23:16:23 +02:00
Hsing-Wang Liao
c7433b0d14 Update Traditional Chinese translation
Signed-off-by: Hsing-Wang Liao <kuoruan@gmail.com>
2016-06-01 14:20:47 +08:00
Hsing-Wang Liao
0179a5044b Update Simplified Chinese translation
Signed-off-by: Hsing-Wang Liao <kuoruan@gmail.com>
2016-06-01 14:08:08 +08:00
Lars Jung
f37e8e7b89 Update sinon to 1.17.3. 2016-05-31 02:00:19 +02:00
Lars Jung
ba670be7d8 Update ghu. Switch from jade to pug. 2016-05-31 01:21:44 +02:00
Lars Jung
93487de085 Remove sharpen arg from pdf convert. 2016-05-29 20:47:17 +02:00
Lars Jung
a2fb3d952d Replace getenv with SERVER lookups. 2016-05-29 19:05:50 +02:00
Lars Jung
fada3c1e36 Release custom head tags. 2016-05-29 18:21:32 +02:00
Lars Jung
aa87ec15b0 Add fallback mode. 2016-05-29 17:35:15 +02:00
Lars Jung
a0db0e0ac3 Update htaccess. 2016-05-29 14:52:39 +02:00
Lars Jung
a790c34a24 Readd some apache config. 2016-05-28 22:23:27 +02:00
Lars Jung
38daa4aa1f Update readme. 2016-05-28 21:34:23 +02:00
Lars Jung
c92822ba7d Update readme. 2016-05-28 19:58:17 +02:00
Lars Jung
18f2c72fd1 Change svg from text to image format. 2016-05-28 19:57:11 +02:00
Lars Jung
d03dc990fa Update readme and changelog. 2016-05-28 16:21:09 +02:00
Lars Jung
882abd1972 Merge pull request #510 from SushiDude/htaccess
Use mod_authz_core when available. Otherwise, fallback to mod_authz_host or mod_access_compat.
2016-05-28 00:04:37 +02:00
Lars Jung
2dd594ba13 Clean code. 2016-05-27 23:49:27 +02:00
Lars Jung
8d5473903e Merge pull request #534 from thezbyg/master
Fix incorrect tree item display.
2016-05-27 23:47:22 +02:00
Lars Jung
69c1ffd92f Fix and clean code from broken pull request. 2016-05-27 23:06:50 +02:00
Lars Jung
808e37d034 Merge pull request #526 from cygmris/master
Add commands support for Windows
2016-05-27 23:00:26 +02:00
Lars Jung
60ef5ff983 Merge pull request #492 from Joery/master
h5ai: fix typo & nl translation
2016-05-27 22:47:54 +02:00
Lars Jung
171539643e Merge pull request #537 from Monter/master
Update pl.json
2016-05-27 22:43:15 +02:00
Lars Jung
793bfce202 Minor change. 2016-05-27 22:42:11 +02:00
Lars Jung
10d6d2c3c1 Remove babel for now. 2016-05-27 20:35:43 +02:00
Lars Jung
51a161eede Minor tweaks. 2016-05-27 18:23:29 +02:00
Lars Jung
57b3ee6c2f Update deps: jquery, lodash, qrcode, modulejs. Minor fixes. 2016-05-27 17:56:32 +02:00
Lars Jung
641d9b3cfa Update deps. Fix lint issues. 2016-05-27 16:31:27 +02:00
Mark eM
5c2d84aaa9 Update pl.json 2016-05-22 20:25:50 +02:00
Albertas Vyšniauskas
8157ada8fc Fix incorrect tree item display.
Issues #533 and #499.
2016-05-17 17:04:24 +03:00
Lars Jung
8e143a4607 Update deps. 2016-05-16 16:10:37 +02:00
Lars Jung
e021862acf Minor tweaks. 2016-05-05 23:51:47 +02:00
Chr1sh3ng
ed9f04a372 Add commands support for Windows 2016-04-15 19:17:43 +08:00
Wyatt J. Brown
ca86993091 Use mod_authz_core when available. Otherwise, fallback to mod_authz_host or mod_access_compat.
https://github.com/lrsjng/h5ai/pull/489
https://github.com/lrsjng/h5ai/issues/504
2016-02-27 03:12:37 -05:00
Joery
85bd0abd8d Merge pull request #1 from lrsjng/master
h5ai: downstream 20160121
2016-01-21 10:09:53 +01:00
Lars Jung
ed1ab4053c Update apk icon. Add rust type and icon. 2016-01-19 01:18:08 +01:00
Lars Jung
6aed4455d3 Update deps. 2016-01-14 00:44:10 +01:00
Lars Jung
5f265672ae Remove blank lines from PHP sources. 2016-01-14 00:36:25 +01:00
Joery
1653306440 h5ai: update dutch translation 2015-12-25 22:03:03 +01:00
Joery
d0fe566f8f h5ai: fix typo 2015-12-25 22:02:30 +01:00
Lars Jung
11bab8d0a1 Fix mobile view. 2015-12-19 19:58:25 +01:00
Lars Jung
c612fbcfb7 Push version. 2015-12-19 18:12:31 +01:00
Lars Jung
11c86c7031 Update deps. 2015-12-19 17:52:36 +01:00
Lars Jung
e2ffb09ed1 Merge pull request #478 from m0vie/php-tar-dir-mtime
php-tar: store mtime of directories
2015-12-19 17:09:11 +01:00
Lars Jung
77f1a073a7 Merge pull request #457 from Kleofass/patch-1
Update lv.json
2015-12-19 17:07:51 +01:00
Lars Jung
168ead7ed5 Update package. 2015-12-19 17:07:17 +01:00
Lars Jung
0e5b463acf Update deps. Fix version string. 2015-12-19 17:01:45 +01:00
Lars Jung
2e8ae301c5 Remove stamp. 2015-12-13 22:23:40 +01:00
Lars Jung
ab622d5cd2 Update deps. 2015-12-11 23:13:00 +01:00
Lars Jung
a6e6cf96d6 Update readme. 2015-11-19 00:07:25 +01:00
Lars Jung
58b4d20185 Update readme. 2015-11-18 23:39:28 +01:00
Lars Jung
39ea94daa8 Fix a lot eslint errors. 2015-11-18 23:16:58 +01:00
Lars Jung
0c6143704a Switch to ghu and eslint. 2015-11-18 17:27:16 +01:00
Lars Jung
5d0770ca36 Update. 2015-10-24 20:04:44 +02:00
Lars Jung
1ae45f6cbb Breaking changes. 2015-10-24 19:20:31 +02:00
m0vie
eb69d73190 php-tar: store mtime of directories 2015-10-14 21:00:04 +02:00
Lars Jung
2b2656b7e1 Minor. 2015-07-01 23:56:20 +02:00
Lars Jung
6c7e3e8c5d Update test desc. 2015-06-14 16:04:11 +02:00
Lars Jung
063049ec8e Fix tests. 2015-06-14 15:32:01 +02:00
Lars Jung
787eae7a80 Update tests. 2015-06-14 15:24:05 +02:00
Kleofass
5b1b8e0b2d Update lv.json 2015-06-05 10:21:31 +03:00
Lars Jung
18a62ca831 Revert. 2015-05-31 21:21:32 +02:00
Lars Jung
de0b2eedc9 Test. 2015-05-31 21:03:33 +02:00
Lars Jung
d7b389e407 Refactor IE check. 2015-05-30 20:26:38 +02:00
Lars Jung
14825ebe29 Update lodash to 3.9.3, use modern build. 2015-05-29 16:12:22 +02:00
Lars Jung
34aeac9787 Replace modernizr with custom setup. 2015-05-29 15:27:44 +02:00
Lars Jung
fc3f84da6e Clean code. 2015-05-29 12:08:43 +02:00
Lars Jung
6ed6819cef Maintenance. 2015-05-23 02:45:15 +02:00
Lars Jung
370bb3b068 Update readme. 2015-05-21 02:41:27 +02:00
Lars Jung
570431e39c Fix fseek filesize. 2015-05-21 00:33:54 +02:00
Lars Jung
efc4623a0b Minor changes. 2015-05-20 22:44:08 +02:00
Lars Jung
65d8aab429 Clean code. 2015-05-20 22:13:04 +02:00
Lars Jung
6c9d480736 Start filesize refactoring. 2015-05-20 18:41:48 +02:00
Lars Jung
9fde25fc8e Tweaks. 2015-05-20 03:25:15 +02:00
Lars Jung
e6a59ae6d0 Update readme. 2015-05-20 02:54:55 +02:00
Lars Jung
5b68fe731a Reorganize file structure. 2015-05-20 02:54:01 +02:00
Lars Jung
c8eff2d313 Reorganize file structure. 2015-05-20 01:53:56 +02:00
Lars Jung
74745a8603 Tweaks. 2015-05-20 00:45:43 +02:00
Lars Jung
0aadd1add9 Tweaks. 2015-05-20 00:12:29 +02:00
Lars Jung
b3f61f81e2 Add icons. 2015-05-18 00:17:17 +02:00
Lars Jung
90befd2b8e Add txt-pdf icon. 2015-05-17 20:22:07 +02:00
Lars Jung
bf5483950c Update types. 2015-05-17 18:52:40 +02:00
Lars Jung
bd7e005c91 Update crumb styles. 2015-05-17 18:08:57 +02:00
Lars Jung
e08cbb4c96 Merge pull request #442 from jerryjacobs/type-add-golang
Add golang syntax highlight.
2015-05-17 18:07:04 +02:00
Lars Jung
c93df78f1d Merge pull request #446 from bskim45/patch-2
Updated ko.json
2015-05-17 18:06:34 +02:00
Lars Jung
bfb1be8aa5 Fix fallback styles. Update fallback and favicons. 2015-05-17 17:15:06 +02:00
Lars Jung
86466f072b Fix preview label issue. 2015-05-17 16:31:15 +02:00
Lars Jung
b33599f4f2 Fix preview label issue. 2015-05-17 16:27:53 +02:00
Lars Jung
d0f29ec3cf New default theme. New theme comity. 2015-05-17 16:20:06 +02:00
Bumsoo Kim
be7626b698 Updated ko.json 2015-05-17 18:08:28 +09:00
Lars Jung
01b1a8e029 Update text preview. 2015-05-17 02:28:39 +02:00
Lars Jung
09fa3acc4d Update text preview. 2015-05-17 00:16:31 +02:00
Lars Jung
04d9296733 Update tests. 2015-05-16 22:15:54 +02:00
Lars Jung
0b57b1cbd2 Clean code. 2015-05-16 21:48:27 +02:00
Lars Jung
0a843a0b1f Refactor browser check. 2015-05-16 21:36:05 +02:00
Lars Jung
8d3611e30c Update changelog. 2015-05-16 15:34:11 +02:00
Lars Jung
76c226c57b Add ignorecase option to tree. 2015-05-16 14:28:54 +02:00
Lars Jung
673afead73 Update styles. 2015-05-16 05:17:08 +02:00
Lars Jung
8e5b874490 Update styles. 2015-05-16 05:05:22 +02:00
Lars Jung
d9ea66ef85 Clean font css. Add font options. 2015-05-16 04:39:19 +02:00
Lars Jung
fbd9db897e Add extensions dir. 2015-05-16 03:11:09 +02:00
Lars Jung
1995acab95 Add improved PHP JSON parsing. Add option to add resources. 2015-05-16 03:03:17 +02:00
Lars Jung
fe9c7587d8 Add maxIconSize option. 2015-05-15 01:17:00 +02:00
Lars Jung
9eb29b5707 Fix theme. 2015-05-14 22:11:57 +02:00
Lars Jung
99462d0ae0 Add gm support for PDF thumbs. 2015-05-14 19:00:10 +02:00
Lars Jung
89d56b3ae4 Update mode toggle. 2015-05-14 18:04:39 +02:00
Lars Jung
a61dea8c40 Update tests. 2015-05-14 17:37:35 +02:00
Lars Jung
cc4bb962a6 Add non-public cache. 2015-05-14 17:33:54 +02:00
Lars Jung
0a3d085c5a Update readme and changelog. 2015-05-14 15:32:51 +02:00
Lars Jung
17b5d4dfaa Remove version from settings. 2015-05-14 14:50:51 +02:00
Lars Jung
95f087cfd6 Refactor info page. 2015-05-14 14:22:40 +02:00
Lars Jung
9090c28f04 Clean jade markup. 2015-05-14 13:41:13 +02:00
Lars Jung
fe5723f75d Minor changes. 2015-05-14 01:27:32 +02:00
Lars Jung
9637c89b1b Clean code. 2015-05-14 00:33:27 +02:00
Lars Jung
4db158e8d9 Replace appHref with publicHref. 2015-05-14 00:13:22 +02:00
Lars Jung
05547c2685 Update readme. 2015-05-13 23:42:35 +02:00
Lars Jung
4f9a298273 Fix some edge case. 2015-05-13 22:30:38 +02:00
Lars Jung
2a7b1b1f0d Refactor code. 2015-05-13 21:44:56 +02:00
Lars Jung
21014ff788 Clean markup. 2015-05-13 19:04:20 +02:00
Lars Jung
9611aed707 Make Bootstrap static again. 2015-05-13 17:33:43 +02:00
Lars Jung
ae677a2194 Refactor pages. 2015-05-13 16:13:21 +02:00
Lars Jung
f19d9b9419 Fix fatal request error. 2015-05-13 14:11:22 +02:00
Lars Jung
fe6830cd83 Update tests. 2015-05-13 14:09:30 +02:00
Lars Jung
4932dda11c Move passhass to options. 2015-05-13 14:07:21 +02:00
Lars Jung
37fbca2ead Minor changes. 2015-05-13 02:34:11 +02:00
Lars Jung
093296dbac Update tests. 2015-05-13 02:19:39 +02:00
Lars Jung
4f83c95d20 Use own location as API href. 2015-05-13 01:16:21 +02:00
Lars Jung
0f72db1961 Fix image href. 2015-05-13 00:30:35 +02:00
Lars Jung
7063b26a5f Fix some info page styles. 2015-05-13 00:28:32 +02:00
Lars Jung
4889290d3e Minor tweaks. 2015-05-12 22:25:59 +02:00
Lars Jung
b1f88f28f4 Merge index and info routing. 2015-05-12 18:21:30 +02:00
Lars Jung
ee241e7e3f Restructure file base. 2015-05-12 16:08:20 +02:00
Lars Jung
057a5f05a5 Rename app to context. 2015-05-12 14:03:49 +02:00
Lars Jung
06b9232552 Refactor PHP code. 2015-05-12 13:36:29 +02:00
Lars Jung
6258c40a24 Clean PHP code. 2015-05-12 03:26:44 +02:00
Lars Jung
9f53ddd3f3 Clean PHP code. 2015-05-12 02:04:58 +02:00
Lars Jung
e199be6363 Clean PHP code. 2015-05-12 01:18:14 +02:00
Lars Jung
788f4f047c Clean PHP code. 2015-05-12 01:00:45 +02:00
Lars Jung
34f86997cb Clean code. 2015-05-11 23:55:31 +02:00
Lars Jung
291f4e28d8 Refactor PHP. 2015-05-11 23:54:46 +02:00
Lars Jung
8f921c8a1f Refactor PHP. 2015-05-11 23:34:02 +02:00
Lars Jung
8c810a1818 Clean code. 2015-05-11 17:56:01 +02:00
Lars Jung
d07850b6ef Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 13:00:10 +02:00
Lars Jung
cb9b8c6244 Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 12:47:38 +02:00
Lars Jung
1e11b804ab Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 12:40:33 +02:00
Lars Jung
0719eeeb90 Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 12:32:34 +02:00
Lars Jung
f363e78601 Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 12:27:24 +02:00
Lars Jung
b340fe3569 Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 12:20:09 +02:00
Lars Jung
429a2b7749 Refactor PHP. Switch to explicit string literals where possible. 2015-05-11 12:14:25 +02:00
Lars Jung
c18b09c658 Refactor PHP. Remove almost all defines. 2015-05-11 11:55:48 +02:00
Lars Jung
7bcb52214b Minor changes. 2015-05-10 16:10:03 +02:00
Lars Jung
34e6c2c381 Minor changes. 2015-05-10 16:09:11 +02:00
Lars Jung
b6b84a541b Refactor code. 2015-05-10 15:09:10 +02:00
Lars Jung
76186e513f Tweaks. 2015-05-10 14:59:08 +02:00
Lars Jung
5930681095 Refactor code. 2015-05-10 13:24:41 +02:00
Lars Jung
1d7457a4a2 Refactor code. 2015-05-10 13:05:39 +02:00
Lars Jung
7503d79c06 Refactor view and viewmode. 2015-05-10 10:58:18 +02:00
Lars Jung
24319e1c49 Refactor PHP. 2015-05-10 02:37:12 +02:00
Lars Jung
48b788eaef Refactor PHP. 2015-05-10 01:39:18 +02:00
Lars Jung
6b071fc1e7 Change test description to make it work standalone. 2015-05-09 20:44:02 +02:00
Lars Jung
942f4696e2 Add tests. 2015-05-09 20:40:30 +02:00
Lars Jung
022f715b98 Add tests. 2015-05-09 20:34:39 +02:00
Lars Jung
7311cc8e4b Add tests for escapePattern and parsePattern. 2015-05-09 19:30:17 +02:00
Jerry Jacobs
7f6755b5de * Add golang syntax highlight 2015-05-09 18:27:29 +02:00
Lars Jung
a482529fdc Refactor code. 2015-05-09 17:33:03 +02:00
Lars Jung
5798529fe2 Refactor code. 2015-05-09 17:27:15 +02:00
Lars Jung
a362356a72 Improve view, filter and search. 2015-05-09 16:29:26 +02:00
Lars Jung
4896d9a101 Update l10n and sort l10n entries. 2015-05-09 02:15:36 +02:00
Lars Jung
d244ab9fca Update l10n and sot l10n entries. 2015-05-09 02:10:55 +02:00
Lars Jung
570599c19d Add debounce option to search. 2015-05-09 01:18:56 +02:00
Lars Jung
a9f6f157fa Fix tests. 2015-05-08 22:13:06 +02:00
Lars Jung
c35abad20a Add search frontend extension, plus refactorings to make it work. 2015-05-08 22:09:12 +02:00
Lars Jung
7f687e0a84 Refactor PHP. 2015-05-07 01:27:02 +02:00
Lars Jung
ea24ae3b5f Refactor PHP. 2015-05-06 23:51:12 +02:00
Lars Jung
55597ae1ba Refactor PHP. 2015-05-06 20:57:18 +02:00
Lars Jung
6ee0ed3444 Refactor code. 2015-05-06 19:12:28 +02:00
Lars Jung
d5a1a829e3 Refactor API. 2015-05-06 18:58:07 +02:00
Lars Jung
5c72378b39 Refactor API, add search. 2015-05-06 17:18:08 +02:00
Lars Jung
e3603cfec1 Change version info. 2015-05-06 14:17:44 +02:00
Lars Jung
90d337a51f Change hash algo to sha512. 2015-05-06 14:12:17 +02:00
Lars Jung
1975715dbd Refactor bootstrap. 2015-05-06 13:11:37 +02:00
Lars Jung
85be66886a Add fast PHP version check and exit. 2015-05-06 12:28:50 +02:00
Lars Jung
d4e349f260 Refactor PHP, 5.3 => 5.4. 2015-05-05 23:58:11 +02:00
Lars Jung
059e166402 Refactor PHP, 5.3 => 5.4. 2015-05-05 23:55:35 +02:00
Lars Jung
1d7c2f3b80 Clean code. 2015-05-05 23:20:37 +02:00
Lars Jung
11c3750690 Refactor custom API. 2015-05-05 21:53:23 +02:00
Lars Jung
808b1bf657 Update thumbnail requests. 2015-05-05 21:01:30 +02:00
Lars Jung
7c4f9d574c Refactor API. 2015-05-05 01:58:50 +02:00
Lars Jung
e31028f5a9 Refactor API. 2015-05-05 00:01:25 +02:00
Lars Jung
0f1ca4e85b Refactor item. 2015-05-03 23:52:49 +02:00
Lars Jung
003b3f3edb Refactor. 2015-05-03 22:11:31 +02:00
Lars Jung
69cc1bd281 Refactor getThumbHref return object. 2015-05-03 21:05:04 +02:00
Lars Jung
31fe4d1591 Clean l10n code. 2015-05-03 20:44:05 +02:00
Lars Jung
675efd6cd3 Refactor url to href, to be more consistent. 2015-05-03 19:36:17 +02:00
Lars Jung
0f0d97dab5 Remove unused definitions. 2015-05-03 17:33:42 +02:00
Lars Jung
4b19239f6f Remove CURRENT_* definitions. 2015-05-03 16:48:53 +02:00
Lars Jung
a74e849faf Reduce CURRENT_PATH deps. 2015-05-03 04:05:42 +02:00
Lars Jung
d0f7f586e8 Clean code. 2015-05-03 03:10:33 +02:00
Lars Jung
3b9e87e11b Refactor code. 2015-05-03 01:52:26 +02:00
Lars Jung
46b335eb9f Refactor code. 2015-05-02 23:38:47 +02:00
Lars Jung
9bdf86fc24 Refactor PHP, restrict setup info. 2015-05-02 22:29:26 +02:00
Lars Jung
167e30dee1 Refactor code. 2015-05-02 20:16:48 +02:00
Lars Jung
16186811a4 Clean code. 2015-05-02 19:45:01 +02:00
Lars Jung
d2031d57d2 Refactor PHP. 2015-05-02 18:01:03 +02:00
Lars Jung
6e54ba2f73 Refactor PHP setup. 2015-05-02 16:52:50 +02:00
Lars Jung
77d6da3a24 Refactor PHP code. 2015-05-02 03:59:22 +02:00
Lars Jung
65caa0fe9d Clean PHP code. 2015-05-02 03:27:24 +02:00
Lars Jung
d6040b028e Clean up and fix. 2015-05-02 02:07:22 +02:00
Lars Jung
509074c263 Add safety check on PHP options lookup. 2015-05-02 01:44:50 +02:00
Lars Jung
6ad53ec2aa Refactor PHP request handling and return codes. 2015-05-01 20:29:36 +02:00
Lars Jung
e275ecac07 Set minimum PHP version to 5.4.0 2015-05-01 18:26:46 +02:00
Lars Jung
2d0cc10e44 Change quotes. 2015-05-01 16:48:20 +02:00
Lars Jung
af6c715a5b Switch API to react to POST only. 2015-05-01 16:16:31 +02:00
Lars Jung
3360e4d167 Minor changes. 2015-05-01 12:33:37 +02:00
Lars Jung
2331f21f90 Refactor code. 2015-04-30 23:30:28 +02:00
Lars Jung
58bf1a3091 Refactor view. 2015-04-30 23:01:54 +02:00
Lars Jung
3cf135b670 Clean code. 2015-04-30 13:01:17 +02:00
Lars Jung
5ce0541937 Add view/viewmode tests. 2015-04-30 00:32:43 +02:00
Lars Jung
19aa32feb4 Add view/viewmode tests. 2015-04-30 00:18:14 +02:00
Lars Jung
aedf75b9f8 Add view/viewmode tests. 2015-04-30 00:15:09 +02:00
Lars Jung
8b7e0b57c5 Add view/item tests. 2015-04-29 23:47:39 +02:00
Lars Jung
3dfd912266 Clean code. 2015-04-29 23:17:54 +02:00
Lars Jung
5bd767d744 Clean code. 2015-04-29 23:15:37 +02:00
Lars Jung
b39ba9cd00 Clean code. 2015-04-29 23:15:16 +02:00
Lars Jung
07ffb9d995 Clean code. 2015-04-29 23:13:51 +02:00
Lars Jung
2479aa597b Clean code. 2015-04-29 23:11:45 +02:00
Lars Jung
8c34337136 Refactor view/content. 2015-04-29 23:08:38 +02:00
Lars Jung
0faf399abd Fix content scroll. 2015-04-29 20:02:57 +02:00
Lars Jung
7704a00d7b Rename mainrow. 2015-04-29 19:47:37 +02:00
Lars Jung
96b6ff7fff Update tests. 2015-04-29 18:55:36 +02:00
Lars Jung
3dedb6b0f6 Minor changes. 2015-04-29 17:56:44 +02:00
Lars Jung
13457f8a6a Minor changes. 2015-04-29 17:14:04 +02:00
Lars Jung
bc966c46c6 Relax test. 2015-04-29 16:37:06 +02:00
Lars Jung
a5d04198dc Update viewmode. 2015-04-29 16:23:24 +02:00
Lars Jung
c3803b2e84 Add viewmode tests. 2015-04-29 14:54:59 +02:00
Lars Jung
aa8b9789f7 Clean tests. 2015-04-29 14:28:27 +02:00
Lars Jung
70c8364349 Add integration test. 2015-04-29 14:23:15 +02:00
Lars Jung
ea306c7d0c Minor visual tweak. 2015-04-29 11:56:41 +02:00
Lars Jung
33bc45d179 Add simple toggle. 2015-04-29 02:16:29 +02:00
Lars Jung
f7d0f7d5eb Refactor type tests. 2015-04-29 01:48:11 +02:00
Lars Jung
f181c52d13 Minor changes. 2015-04-29 01:25:32 +02:00
Lars Jung
f7e3f4da79 Minor changes. 2015-04-29 01:18:11 +02:00
Lars Jung
2365c23af7 Refactor notifications. 2015-04-29 01:13:30 +02:00
Lars Jung
73496c6b7c Refactor notifications. 2015-04-29 00:57:58 +02:00
Lars Jung
6500b624f5 Refactor location module. 2015-04-29 00:44:10 +02:00
Lars Jung
2525ad8393 Adds onpopstate tests. 2015-04-29 00:39:22 +02:00
Lars Jung
344c61bd23 Refactor forceEncoding. 2015-04-28 21:46:49 +02:00
Lars Jung
248e7efdb0 Refactor test runner. 2015-04-28 13:03:52 +02:00
Lars Jung
530e9c3859 Clean code. 2015-04-28 01:24:26 +02:00
Lars Jung
594653a753 Update. 2015-04-28 01:04:51 +02:00
Lars Jung
cb5c197994 Clean test code. 2015-04-28 00:25:48 +02:00
Lars Jung
c8bffa006b Refactor test runner 2015-04-27 23:55:25 +02:00
Lars Jung
df76ca0807 Update test styles. 2015-04-27 23:04:34 +02:00
Lars Jung
1e00e2b733 Remove ready event. 2015-04-27 21:48:56 +02:00
Lars Jung
2b834f0233 Refactor test runner. 2015-04-27 12:51:25 +02:00
Lars Jung
af34531ee0 Update test styles. 2015-04-27 12:05:22 +02:00
Lars Jung
b5049ea855 Update test styles. 2015-04-27 02:13:26 +02:00
Lars Jung
785f4632c7 Update test runner code. 2015-04-27 02:06:46 +02:00
Lars Jung
fcaddbbd3b Clean code. 2015-04-27 01:53:34 +02:00
Lars Jung
ddf23d1ea5 Clean and refactor styles. 2015-04-27 00:49:50 +02:00
Lars Jung
dabc9e3c93 Clean and refactor styles. 2015-04-27 00:19:46 +02:00
Lars Jung
f89010bd98 Refactor styles. 2015-04-26 23:41:07 +02:00
Lars Jung
cf84bd74f1 Fix some jshint issues. 2015-04-26 21:41:05 +02:00
Lars Jung
b95aa583a9 Refactor test code. 2015-04-26 21:37:41 +02:00
Lars Jung
21c976bb3d Update test runner. 2015-04-26 20:02:23 +02:00
Lars Jung
63fe57731e Update font styles. 2015-04-26 19:00:08 +02:00
Lars Jung
668f316465 Refactor tests. 2015-04-26 18:10:31 +02:00
Lars Jung
55fa4a1bcd Remove stylesheet types. 2015-04-26 16:37:12 +02:00
Lars Jung
bdeac2533f Clean styles. 2015-04-26 16:27:56 +02:00
Lars Jung
2ed333ab82 Clean contextmenu. 2015-04-26 16:16:47 +02:00
Lars Jung
8d11090f7d Update fallback styles. 2015-04-26 14:15:19 +02:00
Lars Jung
336e9ac0bd Clean styles. 2015-04-26 13:55:27 +02:00
Lars Jung
0a4fd4ee2c Clean styles. 2015-04-26 02:59:49 +02:00
Lars Jung
b90b164552 Clean styles. 2015-04-26 01:12:58 +02:00
Lars Jung
b7a77797f6 Refactor styles. 2015-04-26 00:33:36 +02:00
Lars Jung
ebcf431363 Refactor styles. 2015-04-25 21:44:34 +02:00
Lars Jung
ba315be9e5 Refactor topbar and crumb. 2015-04-25 21:13:25 +02:00
Lars Jung
d5a0dce27a Clean code. 2015-04-25 17:29:15 +02:00
Lars Jung
1a47a2aa3b Refactor code. 2015-04-25 17:10:47 +02:00
Lars Jung
d5221c0d17 Refactor view. 2015-04-25 13:24:34 +02:00
Lars Jung
0be36ea9e8 Rename smartBrowsing to fastBrowsing. 2015-04-24 22:22:15 +02:00
Lars Jung
c03fd20bae Add tests. 2015-04-24 20:37:19 +02:00
Lars Jung
c632cc6dea Add tests. 2015-04-24 19:59:51 +02:00
Lars Jung
908c49c584 Clean code. Add tests. 2015-04-24 18:03:10 +02:00
Lars Jung
d591dbc0cd Clean code. 2015-04-24 15:39:59 +02:00
Lars Jung
945703952b Clean code. 2015-04-24 15:34:06 +02:00
Lars Jung
9102b6d1c3 Clean code. 2015-04-24 15:17:54 +02:00
Lars Jung
4daab5d77b Remove force arg from content update method. 2015-04-24 03:42:25 +02:00
Lars Jung
5e8baf027e Clean code. 2015-04-24 02:32:03 +02:00
Lars Jung
34525afe56 Clean code. 2015-04-24 00:51:26 +02:00
Lars Jung
c73bc83f7d Clean code. 2015-04-24 00:01:56 +02:00
Lars Jung
ce11fcffbc Update mocha code. 2015-04-23 23:52:59 +02:00
Lars Jung
239157df30 Update test styles. 2015-04-23 13:41:20 +02:00
Lars Jung
e7d97d4b66 Update test styles. 2015-04-23 02:33:40 +02:00
Lars Jung
b2c4802310 Clean code. 2015-04-23 00:31:29 +02:00
Lars Jung
60b366a7f4 Clean code. 2015-04-23 00:08:43 +02:00
Lars Jung
c732fbb363 Clean code. 2015-04-22 23:50:16 +02:00
Lars Jung
41b199c578 Clean strings. 2015-04-22 23:45:23 +02:00
Lars Jung
88854ad451 Add tests. 2015-04-22 23:21:48 +02:00
Lars Jung
3882f1483b Add tests. 2015-04-22 21:30:29 +02:00
Lars Jung
882bf8ae11 Clean code. 2015-04-22 19:34:35 +02:00
Lars Jung
c396800dfa Publish tests. 2015-04-22 17:12:45 +02:00
Lars Jung
5a8ecd593d Sort module deps. 2015-04-22 17:10:49 +02:00
Lars Jung
84693e6404 Sort module deps. 2015-04-22 05:03:28 +02:00
Lars Jung
476df8219f Update build file. 2015-04-22 01:02:33 +02:00
Lars Jung
448c889e56 Clean code. 2015-04-19 23:23:34 +02:00
Lars Jung
52ca5275b1 Update JSCS config. 2015-04-19 20:35:54 +02:00
Lars Jung
0fd6e2c878 Update build file. 2015-04-18 13:53:05 +02:00
Lars Jung
85599f8a33 Refactor. 2015-04-18 01:11:48 +02:00
Lars Jung
5f2a7985d8 Refactor js init sequence. 2015-04-18 00:38:28 +02:00
Lars Jung
b1b5e37ab6 Remove #settings div. 2015-04-17 23:58:56 +02:00
Lars Jung
2f26146228 Remove #settings div. 2015-04-17 23:51:48 +02:00
Lars Jung
6bfbebc51e Clean code. 2015-04-17 20:29:17 +02:00
Lars Jung
762fd54788 Clean code. 2015-04-17 17:50:27 +02:00
Lars Jung
57ab18355d Clean code. 2015-04-17 17:46:44 +02:00
Lars Jung
8d9a2f505f Clean code. 2015-04-17 15:34:27 +02:00
Lars Jung
c20da80bda Clean store module. Publish test build commands. 2015-04-17 03:16:04 +02:00
Lars Jung
e99bd06370 Clean code. 2015-04-17 03:02:48 +02:00
Lars Jung
6f5446f218 Update build file. 2015-04-14 04:21:05 +02:00
Lars Jung
c1c25f0e28 Update build file. 2015-04-14 03:19:50 +02:00
Lars Jung
cdca37e59d Clean code. 2015-04-14 01:38:49 +02:00
Lars Jung
6137120b2e Update deps. 2015-04-13 00:13:38 +02:00
Lars Jung
f0912f9e9d Add JSCS rules and clean code. 2015-04-12 23:23:05 +02:00
Lars Jung
1623d0f60a Refactor preview extension. 2015-04-11 23:01:24 +02:00
Lars Jung
96db9677c6 Clean deps. 2015-04-11 18:35:42 +02:00
Lars Jung
bcfdec87c9 Remove Moment.js. 2015-04-11 17:38:49 +02:00
Lars Jung
488e321613 Update modulejs to 1.5.0. 2015-04-11 02:11:26 +02:00
Lars Jung
90fcae1932 Clean code. 2015-04-11 01:19:48 +02:00
Lars Jung
271c5fd9d2 Update build file. 2015-04-10 20:48:26 +02:00
Lars Jung
bd2b564876 Update mkr. 2015-04-10 16:12:05 +02:00
Lars Jung
99a45ab56e Fix preview bottom bar for small screen widths. 2015-04-10 03:55:21 +02:00
Lars Jung
18d12b6746 Update build process. 2015-04-09 23:22:37 +02:00
Lars Jung
90013da52c Updates h5bp CSS and normalize.css. 2015-04-09 02:23:33 +02:00
Lars Jung
ce6680ae19 Add fquery-autoprefixer. 2015-04-09 01:50:20 +02:00
Lars Jung
bdbaf26e9b Fix some IE10 styles. 2015-04-08 01:14:17 +02:00
Lars Jung
c487eaa846 Use wide links in tree. 2015-04-08 01:08:06 +02:00
Lars Jung
69318824f6 Compress release packages. 2015-04-07 18:33:20 +02:00
Lars Jung
fc918f1e3c Remove jscs file. 2015-04-07 00:38:59 +02:00
Lars Jung
04c574c6f9 Back to develop. 2015-04-06 21:01:40 +02:00
302 changed files with 14609 additions and 7947 deletions

View File

@@ -12,21 +12,11 @@ insert_final_newline = true
trim_trailing_whitespace = true
[package.json]
indent_style = space
[{package.json,.travis.yml,.eslintrc}]
indent_size = 2
[.travis.yml]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.jade]
[{*.md,*.pug}]
trim_trailing_whitespace = false

3
.eslintignore Normal file
View File

@@ -0,0 +1,3 @@
build
node_modules
**/vendor

182
.eslintrc Normal file
View File

@@ -0,0 +1,182 @@
---
root: true
env:
es6: true
node: true
parserOptions:
ecmaVersion: 6
rules:
array-bracket-spacing: [2, never]
arrow-parens: [2, as-needed]
arrow-spacing: 2
block-scoped-var: 2
brace-style: [2, 1tbs, {allowSingleLine: true}]
camelcase: 0
comma-dangle: [2, never]
comma-spacing: [2, {before: false, after: true}]
comma-style: [2, last]
complexity: [1, 10] ###
computed-property-spacing: [2, never]
consistent-return: 2
consistent-this: [2, self]
constructor-super: 2
curly: [2, multi-line]
default-case: 2
dot-location: [2, property]
dot-notation: [2, {allowKeywords: true}]
eol-last: 2
eqeqeq: 2
func-names: 2
func-style: [2, declaration, {allowArrowFunctions: true}]
generator-star-spacing: [2, after]
guard-for-in: 2
handle-callback-err: 2
indent: [2, 4]
key-spacing: [2, {beforeColon: false, afterColon: true}]
keyword-spacing: [2, {before: true, after: true}]
linebreak-style: [2, unix]
max-depth: [1, 4]
max-len: [0, 80, 4]
max-nested-callbacks: [1, 3]
max-params: [1, 4] ###
max-statements: [1, 30] ###
new-cap: 0
new-parens: 2
newline-after-var: 0
no-alert: 2
no-array-constructor: 2
no-bitwise: 2
no-caller: 2
no-catch-shadow: 2
no-class-assign: 2
no-cond-assign: 2
no-console: 0 ###
no-const-assign: 2
no-constant-condition: 1
no-continue: 0
no-control-regex: 2
no-debugger: 2
no-delete-var: 2
no-div-regex: 2
no-dupe-args: 2
no-dupe-class-members: 2
no-dupe-keys: 2
no-duplicate-case: 2
no-else-return: 1
no-empty: 2
no-empty-character-class: 2
no-empty-pattern: 2
no-eq-null: 2
no-eval: 2
no-ex-assign: 2
no-extend-native: 1
no-extra-bind: 2
no-extra-boolean-cast: 2
no-extra-parens: 1
no-extra-semi: 2
no-fallthrough: 2
no-floating-decimal: 2
no-func-assign: 2
no-implicit-coercion: [2, {boolean: false, number: true, string: true}]
no-implied-eval: 2
no-inline-comments: 0
no-inner-declarations: [2, functions]
no-invalid-regexp: 2
no-invalid-this: 2
no-irregular-whitespace: 2
no-iterator: 2
no-label-var: 2
no-labels: 2
no-lone-blocks: 2
no-lonely-if: 2
no-loop-func: 1
no-magic-numbers: 0
no-mixed-requires: [2, false]
no-mixed-spaces-and-tabs: [2, false]
no-multi-spaces: 2
no-multi-str: 2
no-multiple-empty-lines: [2, {max: 4}]
no-native-reassign: 1
no-negated-in-lhs: 2
no-nested-ternary: 0
no-new: 2
no-new-func: 2
no-new-object: 2
no-new-require: 2
no-new-wrappers: 2
no-obj-calls: 2
no-octal: 2
no-octal-escape: 2
no-param-reassign: 0
no-path-concat: 2
no-plusplus: 2
no-process-env: 2
no-process-exit: 2
no-proto: 2
no-redeclare: 2
no-regex-spaces: 2
no-restricted-modules: 2
no-return-assign: 2
no-script-url: 2
no-self-compare: 2
no-sequences: 2
no-shadow: 2
no-shadow-restricted-names: 2
no-spaced-func: 2
no-sparse-arrays: 2
no-sync: 0
no-ternary: 0
no-this-before-super: 2
no-throw-literal: 1
no-trailing-spaces: 2
no-undef: 2
no-undef-init: 2
no-undefined: 0
no-underscore-dangle: 0
no-unexpected-multiline: 2
no-unneeded-ternary: 2
no-unreachable: 2
no-useless-call: 2
no-useless-concat: 2
no-unused-expressions: 2
no-unused-vars: [1, {vars: all, args: after-used}]
no-use-before-define: 2
no-var: 2
no-void: 2
no-warning-comments: [1, {terms: [todo, fixme, xxx], location: start}]
no-with: 2
object-curly-spacing: [2, never]
object-shorthand: [2, always]
one-var: [2, never]
operator-assignment: [2, always]
operator-linebreak: [2, after]
padded-blocks: [2, never]
prefer-arrow-callback: 2
prefer-const: 1
prefer-reflect: 1
prefer-spread: 2
prefer-template: 0
quote-props: [2, as-needed]
quotes: [2, single, avoid-escape]
radix: 2
require-yield: 2
semi: 2
semi-spacing: [2, {before: false, after: true}]
sort-vars: 0
space-before-blocks: [2, always]
space-before-function-paren: [2, {anonymous: always, named: never}]
space-in-parens: [2, never]
space-infix-ops: 2
space-unary-ops: [2, {words: true, nonwords: false}]
spaced-comment: [2, always]
strict: [2, never]
use-isnan: 2
valid-jsdoc: 2
valid-typeof: 2
vars-on-top: 0
wrap-iife: [2, outside]
wrap-regex: 2
yoda: [2, never, {exceptRange: true}]

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
build
local
node_modules
test
npm-debug.log

View File

@@ -1,2 +0,0 @@
{
}

View File

@@ -1,113 +1,187 @@
# Changelog
## v0.29.1 - *2019-01-20*
* replace `babel-preset-es2015` with `babel-preset-env`
* update `eslint` to 5.14.1
* update `ghu` to 0.12.0
* update `jsdom` to 9.2.0
* update `kjua` to 0.1.2
* update `lolight` to 0.6.0
* update `marked` to 0.6.1
* update `normalize.css` to 8.0.1
* update `scar` to 1.0.0
## v0.29.0 - *2016-08-12*
* back to cleaner visual experience
* add option to disable sidebar
* add options to filter/search ignore case
* replace PHP `getenv` calls with `$_SERVER` lookups
* add `view.fallbackMode` option to generally serve only fallback mode
* serve fallback mode for text browsers (`curl`, `links`, `lynx`, `w3m`)
* change type `txt-svg` to `img-svg`, no thumbs but preview
* fix a tree indentation glitch
* fix shell command detection on Windows
* fix Piwik anayltics
* fix `.htaccess` auth issues
* fix drag-select on scrollable content
* fix download-all function
* fix audio and video preview loading
* fix thumbnail request issues
* add `rust` type and icon
* add `autoplay` option to audio and video preview
* add `--dereference` to `shell-du` to follow sym links
* remove *Install* section from `README.md`, causes too much trouble
* remove peer5 support
* update build process to use `node 6.0+`, no need for babel now
* replace `jquery-qrcode` with [`kjua`](https://larsjung.de/kjua/)
* replace `prism` with [`lolight`](https://larsjung.de/lolight/)
* move deps to `package.json` (`normalize.css`, `kjua`, `lolight` and `marked`)
* remove `jQuery`
* remove `lodash`
* remove [`modulejs`](https://larsjung.de/modulejs/) for now
* reduce JS code by 60% (~250kb -> ~100kb)
* update languages (`et`, `nl`, `pl`)
## v0.28.0 - *2015-12-19*
* now require PHP 5.5.0+
* change index path to `/_h5ai/public/index.php`
* now only `/_h5ai/public/` needs to be web-accessible
* add support for custom script and style additions
* add options to set font families
* add search
* add ignorecase sorting option to tree
* add wide links in tree view
* add IE edge mode
* add frontend tests
* fix some styles in IE10
* fix preview bottom bar for small screen widths
* lots of code cleanup and refactorings
* change API
* update build process, now uses [`ghu`](https://larsjung.de/ghu/)
* switch from jshint and jscs to [`eslint`](http://eslint.org/)
* update `jQuery` to 2.1.4
* update `lodash` to 3.9.3 (add debounce and trim)
* update `marked` to 0.3.5
* update `modulejs` to 1.13.0
* update `prism` to 2015-12-19
* update h5bp styles to 5.2.0
* update `normalize.css` to 3.0.3
* remove `Moment.js`
## v0.27.0 - *2015-04-06*
* new layout
* adds editorconfig
* drops support for IE9 (gets fallback)
* updates sidebar settings
* adds info sidebar
* adds opt-out for click'n'drag selection
* adds package name option for single selections
* adds initial support for Peer5
* adds option to down-sample images for preview
* adds option for natural sorting in tree sidebar
* fixes problems with files/folders named `0`
* changes font from `Ubuntu` to `Roboto` (smaller footprint, clearer for small sizes)
* switches back to Google Fonts
* improves PDF thumbnail quality
* improves drag-select
* improves image preview
* prevents listing `_h5ai` folder and subfolders
* updates build process, now uses [mkr](http://larsjung.de/mkr/) and [fQuery](http://larsjung.de/fquery/)
* updates `jQuery` to 2.1.3
* updates `jQuery.qrcode` to 0.11.0
* updates `Lo-Dash` to 3.6.0
* updates `Modernizr` to 2.8.3
* updates `modulejs` to 1.4.0
* updates `Moment.js` to 2.9.0
* updates `Prism` to 2015-04-05
* removes deprecated Google Analytics code
* removes `jQuery.fracs`
* removes `jQuery.scrollpanel`
* removes `jQuery.mousewheel`
* language updates and additions (`af`, `es`, `ja`, `ko`, `ru`, `zh-cn`)
* add editorconfig
* drop support for IE9 (gets fallback)
* update sidebar settings
* add info sidebar
* add opt-out for click'n'drag selection
* add package name option for single selections
* add initial support for Peer5
* add option to down-sample images for preview
* add option for natural sorting in tree sidebar
* fix problems with files/folders named `0`
* change font from `Ubuntu` to `Roboto` (smaller footprint, clearer for small sizes)
* switch back to Google Fonts
* improve PDF thumbnail quality
* improve drag-select
* improve image preview
* prevent listing `_h5ai` folder and subfolders
* update build process, now uses [`mkr`](https://larsjung.de/mkr/) and [`fQuery`](https://larsjung.de/fquery/)
* update `jQuery` to 2.1.3
* update `jQuery.qrcode` to 0.11.0
* update `Lo-Dash` to 3.6.0
* update `Modernizr` to 2.8.3
* update `modulejs` to 1.4.0
* update `Moment.js` to 2.9.0
* update `Prism` to 2015-04-05
* remove deprecated Google Analytics code
* remove `jQuery.fracs`
* remove `jQuery.scrollpanel`
* remove `jQuery.mousewheel`
* update languages (`af`, `es`, `ja`, `ko`, `ru`, `zh-cn`)
## v0.26.1 - *2014-08-17*
* fixes links
* fix links
## v0.26.0 - *2014-08-16*
* removes True Type fonts
* outsources themes to [h5ai-themes](https://github.com/lrsjng/h5ai-themes)
* adds filesize fallback for large files and 32bit PHP
* fixes server detection
* adds config file tests to info page
* removes JSON shim
* adds caching of command checks
* updates `jQuery.mousewheel` to 3.1.12
* updates `jQuery.qrcode` to 0.8.0
* replaces `markdown` with [`marked`](https://github.com/chjj/marked) 0.3.2
* updates `modulejs` to 0.4.5
* updates `Moment.js` to 2.8.1
* replaces `underscore` with [`Lo-Dash`](https://github.com/lodash/lodash) 2.4.1
* replaces `SyntaxHighlighter` with [`Prism`](http://prismjs.com) 2014-08-04
* remove True Type fonts
* outsource themes to [h5ai-themes](https://github.com/lrsjng/h5ai-themes)
* add filesize fallback for large files and 32bit PHP
* fix server detection
* add config file tests to info page
* remove JSON shim
* add caching of command checks
* update `jQuery.mousewheel` to 3.1.12
* update `jQuery.qrcode` to 0.8.0
* replace `markdown` with [`marked`](https://github.com/chjj/marked) 0.3.2
* update `modulejs` to 0.4.5
* update `Moment.js` to 2.8.1
* replace `underscore` with [`Lo-Dash`](https://github.com/lodash/lodash) 2.4.1
* replace `SyntaxHighlighter` with [`Prism`](http://prismjs.com) 2014-08-04
## v0.25.2 - *2014-07-01*
* adds optional info page protection
* fixes `short_open_tag` issues for PHP < 5.4.0
* fixes default folder download (`alwaysVisible` option)
* add optional info page protection
* fix `short_open_tag` issues for PHP < 5.4.0
* fix default folder download (`alwaysVisible` option)
* minor fixes
## v0.25.1 - *2014-06-25*
* fixes broken paths for filenames containing '+' characters
* fixes Google Universal Analytics
* fixes file type check
* fix broken paths for filenames containing '+' characters
* fix Google Universal Analytics
* fix file type check
## v0.25.0 - *2014-06-22*
* adds sidebar
* adds initial theme support
* adds icons from [Evolvere Icon Theme](http://franksouza183.deviantart.com/art/Evolvere-Icon-theme-440718295)
* adds PHP variant to calc folder sizes
* adds scroll position reset on location change (issue [#279](https://github.com/lrsjng/h5ai/issues/279))
* adds option to hide unreadable files
* adds option where to place folders (top, inplace, bottom)
* adds markdown support for custom header and footer files
* adds video and audio preview via HTML5 elements (no fallback, works best in Chrome)
* adds filter reset on location change
* adds option to make download button always visible
* adds Google UA support
* extends selectable icon sizes (adds 128px, 192px, 256px, 384px)
* improves preview GUI
* add sidebar
* add initial theme support
* add icons from [Evolvere Icon Theme](http://franksouza183.deviantart.com/art/Evolvere-Icon-theme-440718295)
* add PHP variant to calc folder sizes
* add scroll position reset on location change (issue [#279](https://github.com/lrsjng/h5ai/issues/279))
* add option to hide unreadable files
* add option where to place folders (top, inplace, bottom)
* add markdown support for custom header and footer files
* add video and audio preview via HTML5 elements (no fallback, works best in Chrome)
* add filter reset on location change
* add option to make download button always visible
* add Google UA support
* extend selectable icon sizes (add 128px, 192px, 256px, 384px)
* improve preview GUI
* disable thumbs in `cache` folder
* fixes QR code URI origin (issue [#287](https://github.com/lrsjng/h5ai/issues/287))
* replaces PHP backtick operator with `exec`
* removes server side file manipulation extensions `dropbox`, `delete` and `rename`
* updates `H5BP` to 4.3.0
* updates `jQuery` to 2.1.1
* updates `json2.js` to 2014-02-04
* updates `markdown-js` to 0.5.0
* updates `Modernizr` to 2.8.2
* updates `Moment.js` to 2.6.0
* updates `Underscore.js` to 1.6.0
* language updates (`bg`, `ko`, `pt`, `sl`, `sv`, `zh-cn`)
* fix QR code URI origin (issue [#287](https://github.com/lrsjng/h5ai/issues/287))
* replace PHP backtick operator with `exec`
* remove server side file manipulation extensions `dropbox`, `delete` and `rename`
* update `H5BP` to 4.3.0
* update `jQuery` to 2.1.1
* update `json2.js` to 2014-02-04
* update `markdown-js` to 0.5.0
* update `Modernizr` to 2.8.2
* update `Moment.js` to 2.6.0
* update `Underscore.js` to 1.6.0
* update languages (`bg`, `ko`, `pt`, `sl`, `sv`, `zh-cn`)
## v0.24.1 - *2014-04-09*
* security fixes! (issues [#268](https://github.com/lrsjng/h5ai/issues/268), [#269](https://github.com/lrsjng/h5ai/issues/269))
* language updates (`fi`, `fr`, `hi`, `it`, `zh-tw`)
* fixes WinOS command detection
* fix WinOS command detection
* update languages (`fi`, `fr`, `hi`, `it`, `zh-tw`)
## v0.24.0 - *2013-09-04*
@@ -202,9 +276,9 @@
* changes language code `gr` to `el`
* adds localization for filter placeholder
* adds `hu` translation by [Rodolffo](https://github.com/Rodolffo)
* updates to [jQuery.qrcode](http://larsjung.de/qrcode/) 0.2
* updates to [jQuery.scrollpanel](http://larsjung.de/scrollpanel/) 0.1
* updates to [modulejs](http://larsjung.de/modulejs/) 0.2
* updates to [jQuery.qrcode](https://larsjung.de/qrcode/) 0.2
* updates to [jQuery.scrollpanel](https://larsjung.de/scrollpanel/) 0.1
* updates to [modulejs](https://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

View File

@@ -3,34 +3,36 @@
[![license][license-img]][github] [![web][web-img]][web] [![github][github-img]][github]
A modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee.
For bug reports and feature requests please use [issues][github-issues].
## Install
## Important
Do **not** install any files from the `src` folder, they need to be
preprocessed to work correctly! Find a preprocessed package and detailed
install instructions on the [project page][web].
* Do **not** install any files from the `src` folder, they need to be
preprocessed to work correctly!
* Find a preprocessed package and detailed install instructions on the
[project page][web].
* For bug reports and feature requests please use [issues][github-issues].
## Build
There are installation ready packages for the latest [releases][release] and
[dev builds][develop]. But to clone and build **h5ai** yourself run the
following commands to find a fresh zipball in folder `build` (tested on linux
only, requires [`git`][git] and [`npm`][npm] to be installed).
[dev builds][develop]. But to build **h5ai** yourself either `git clone` or
download the repository. From within the root folder run the following
commands to find a fresh zipball in folder `build` (tested on linux only,
requires [`node 6.0+`][node] to be installed).
> git clone git://github.com/lrsjng/h5ai.git
> cd h5ai
> npm install
> npm run build
~~~sh
> npm install
> npm run build
~~~
## License
The MIT License (MIT)
Copyright (c) 2015 Lars Jung (http://larsjung.de)
Copyright (c) 2019 Lars Jung (https://larsjung.de)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -54,18 +56,17 @@ THE SOFTWARE.
## References
**h5ai** profits from other projects, all of them licensed under the MIT license
too. Exceptions are the [Material Design icons][material-design-icons] (CC BY 4.0).
too. Exceptions are some [Material Design icons][material-design-icons] (CC BY 4.0).
[web]: http://larsjung.de/h5ai/
[web]: https://larsjung.de/h5ai/
[github]: https://github.com/lrsjng/h5ai
[github-issues]: https://github.com/lrsjng/h5ai/issues
[release]: http://release.larsjung.de/h5ai/
[develop]: http://release.larsjung.de/h5ai/develop/
[git]: http://git-scm.com
[npm]: https://www.npmjs.org
[release]: https://release.larsjung.de/h5ai/
[develop]: https://release.larsjung.de/h5ai/develop/
[node]: https://nodejs.org
[material-design-icons]: https://github.com/google/material-design-icons
[license-img]: http://img.shields.io/badge/license-MIT-a0a060.svg?style=flat-square
[web-img]: http://img.shields.io/badge/web-larsjung.de/h5ai-a0a060.svg?style=flat-square
[github-img]: http://img.shields.io/badge/github-lrsjng/h5ai-a0a060.svg?style=flat-square
[license-img]: https://img.shields.io/badge/license-MIT-a0a060.svg?style=flat-square
[web-img]: https://img.shields.io/badge/web-larsjung.de/h5ai-a0a060.svg?style=flat-square
[github-img]: https://img.shields.io/badge/github-lrsjng/h5ai-a0a060.svg?style=flat-square

169
ghu.js Normal file
View File

@@ -0,0 +1,169 @@
const {resolve, join} = require('path');
const {
ghu, autoprefixer, cssmin, each, ife, includeit, jszip, less, mapfn,
newerThan, pug, read, remove, run, uglify, watch, webpack, wrap, write
} = require('ghu');
const ROOT = resolve(__dirname);
const SRC = join(ROOT, 'src');
const TEST = join(ROOT, 'test');
const BUILD = join(ROOT, 'build');
const mapper = mapfn.p(SRC, BUILD).s('.less', '.css').s('.pug', '');
const webpackCfg = include => ({
module: {
loaders: [
{
include,
loader: 'babel-loader',
query: {
cacheDirectory: true,
presets: ['babel-preset-env']
}
},
{
test: /jsdom/,
loader: 'null-loader'
}
]
}
});
ghu.defaults('release');
ghu.before(runtime => {
runtime.pkg = Object.assign({}, require('./package.json'));
const res = run.sync(`git rev-list v${runtime.pkg.version}..HEAD`, {silent: true});
if (res.code === 0) {
const hashes = res.stdout.split(/\r?\n/).filter(x => x);
if (hashes.length) {
const counter = ('000' + hashes.length).substr(-3);
const hash = hashes[0].substr(0, 7);
runtime.pkg.version += `+${counter}~${hash}`;
}
}
runtime.comment = `${runtime.pkg.name} v${runtime.pkg.version} - ${runtime.pkg.homepage}`;
runtime.commentJs = `/* ${runtime.comment} */\n`;
runtime.commentHtml = `<!-- ${runtime.comment} -->`;
console.log(runtime.comment);
});
ghu.task('force-production', 'ensure :production flag is set', runtime => {
if (!runtime.args.production) {
runtime.args.production = true;
console.log('forcing production mode');
}
});
ghu.task('clean', 'delete build folder', () => {
return remove(BUILD);
});
ghu.task('lint', 'lint all JavaScript files with eslint', () => {
return run('eslint .', {stdio: 'inherit'});
});
ghu.task('build:scripts', runtime => {
return read(`${SRC}/_h5ai/public/js/scripts.js`)
.then(newerThan(mapper, `${SRC}/_h5ai/public/js/**`))
.then(webpack(webpackCfg([SRC]), {showStats: false}))
.then(wrap('\n\n// @include "pre.js"\n\n'))
.then(includeit())
.then(ife(() => runtime.args.production, uglify({compressor: {warnings: false}})))
.then(wrap(runtime.commentJs))
.then(write(mapper, {overwrite: true}));
});
ghu.task('build:styles', runtime => {
return read(`${SRC}/_h5ai/public/css/*.less`)
.then(newerThan(mapper, `${SRC}/_h5ai/public/css/**`))
.then(includeit())
.then(less())
.then(autoprefixer())
.then(ife(() => runtime.args.production, cssmin()))
.then(wrap(runtime.commentJs))
.then(write(mapper, {overwrite: true}));
});
ghu.task('build:pages', runtime => {
return read(`${SRC}: **/*.pug, ! **/*.tpl.pug`)
.then(newerThan(mapper, `${SRC}/**/*.tpl.pug`))
.then(pug({pkg: runtime.pkg}))
.then(wrap('', runtime.commentHtml))
.then(write(mapper, {overwrite: true}));
});
ghu.task('build:copy', runtime => {
const mapperRoot = mapfn.p(ROOT, join(BUILD, '_h5ai'));
return Promise.all([
read(`${SRC}/**/conf/*.json`)
.then(newerThan(mapper))
.then(wrap(runtime.commentJs))
.then(write(mapper, {overwrite: true, cluster: true})),
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.pug, ! **/conf/*.json`)
.then(newerThan(mapper))
.then(each(obj => {
if ((/index\.php$/).test(obj.source)) {
obj.content = obj.content.replace('{{VERSION}}', runtime.pkg.version);
}
}))
.then(write(mapper, {overwrite: true, cluster: true})),
read(`${ROOT}/*.md`)
.then(newerThan(mapperRoot))
.then(write(mapperRoot, {overwrite: true, cluster: true}))
]);
});
ghu.task('build:tests', ['build:styles'], 'build the test suite', () => {
return Promise.all([
read(`${BUILD}/_h5ai/public/css/styles.css`)
.then(newerThan(`${BUILD}/test/h5ai-styles.css`))
.then(write(`${BUILD}/test/h5ai-styles.css`, {overwrite: true})),
read(`${TEST}/index.html`)
.then(newerThan(`${BUILD}/test/index.html`))
.then(write(`${BUILD}/test/index.html`, {overwrite: true})),
read(`${TEST}: index.js`)
.then(webpack(webpackCfg([SRC, TEST]), {showStats: false}))
.then(wrap(`\n\n// @include "${SRC}/**/js/pre.js"\n\n`))
.then(includeit())
.then(write(mapfn.p(TEST, `${BUILD}/test`), {overwrite: true}))
]).then(() => {
console.log(`browse to file://${BUILD}/test/index.html to run the test suite`);
});
});
ghu.task('build', ['build:scripts', 'build:styles', 'build:pages', 'build:copy', 'build:tests'],
'build all updated files, optionally use :production');
ghu.task('deploy', ['build'], 'deploy to a specified path with :dest=/some/path', runtime => {
if (typeof runtime.args.dest !== 'string') {
throw new Error('no destination path (e.g. :dest=/some/path)');
}
console.log(`deploy to ${runtime.args.dest}`);
const mapperDeploy = mapfn.p(BUILD, resolve(runtime.args.dest));
return read(`${BUILD}/_h5ai/**`)
.then(newerThan(mapperDeploy))
.then(write(mapperDeploy, {overwrite: true, cluster: true}));
});
ghu.task('watch', runtime => {
return watch([SRC, TEST], () => ghu.run(runtime.sequence.filter(x => x !== 'watch'), runtime.args, true));
});
ghu.task('release', ['force-production', 'clean', 'build'], 'create a zipball', runtime => {
const target = join(BUILD, `${runtime.pkg.name}-${runtime.pkg.version}.zip`);
return read(`${BUILD}/_h5ai/**`)
.then(jszip({dir: BUILD, level: 9}))
.then(write(target, {overwrite: true}));
});

View File

@@ -1,208 +0,0 @@
/*jshint node: true */
'use strict';
var path = require('path');
var $ = require('fquery');
var pkg = require('./package.json');
var root = path.resolve(__dirname);
var src = path.join(root, 'src');
var build = path.join(root, 'build');
var mapSrc = $.map.p(src, build).s('.less', '.css').s('.jade', '');
var mapRoot = $.map.p(root, path.join(build, '_h5ai'));
function getBuildSuffix(callback) {
require('child_process').exec('git rev-list v' + pkg.version + '..HEAD', {cwd: root}, function (err, out) {
try {
var lines = out.trim().split(/\r?\n/);
callback('+' + ('000' + lines.length).substr(-3) + '~' + lines[0].substring(0, 7));
} catch (e) {
callback('+X');
}
});
}
$.fn.autoprefixer = function (options) {
var autoprefixer = require('autoprefixer-core');
var options = {browsers: ['last 2 versions']};
return this.edit(function (blob) {
try {
blob.content = autoprefixer.process(blob.content, options).css;
} catch (e) {
$.report({
type: 'err',
method: 'autoprefixer',
message: e.message,
fquery: this,
blob: blob,
err: e
});
}
});
};
$.plugin('fquery-cssmin');
$.plugin('fquery-handlebars');
$.plugin('fquery-includeit');
$.plugin('fquery-jade');
$.plugin('fquery-jshint');
$.plugin('fquery-jszip');
$.plugin('fquery-less');
$.plugin('fquery-uglifyjs');
module.exports = function (suite) {
suite.defaults('release');
suite.target('check-version', [], 'add git info to dev builds').task(function (done) {
if (!pkg.develop) {
done();
return;
}
getBuildSuffix(function (result) {
pkg.version += result;
$.report({type: 'info', method: 'check-version', message: 'version set to ' + pkg.version});
done();
});
});
suite.target('clean', [], 'delete build folder').task(function () {
$(build, {dirs: true}).delete();
});
suite.target('lint', [], 'lint all JavaScript files with JSHint').task(function () {
var jshint = {
// Enforcing Options
bitwise: true,
curly: true,
eqeqeq: true,
forin: true,
latedef: true,
newcap: true,
noempty: true,
plusplus: true,
trailing: true,
undef: true,
// Environments
browser: true
};
var globals = {
modulejs: true
};
$(src + '/_h5ai/client/js: **/*.js, ! lib/**')
.jshint(jshint, globals);
});
suite.target('build', ['check-version', 'lint'], 'build all updated files').task(function () {
var header = '/* ' + pkg.name + ' ' + pkg.version + ' - ' + pkg.homepage + ' */\n';
var env = {pkg: pkg};
$(src + ': _h5ai/client/js/*.js')
.newerThan(mapSrc, $(src + ': _h5ai/client/js/**'))
.includeit()
.uglifyjs()
.wrap(header)
.write(mapSrc, true);
$(src + ': _h5ai/client/css/*.less')
.newerThan(mapSrc, $(src + ': _h5ai/client/css/**'))
.less()
.autoprefixer()
.cssmin()
.wrap(header)
.write(mapSrc, true);
$(src + ': _h5ai/client/css/fonts/**')
.newerThan(mapSrc)
.write(mapSrc, true);
$(src + ': **/*.jade')
.newerThan(mapSrc)
.jade(env)
.write(mapSrc, true);
$(src + ': **, ! _h5ai/client/js/**, ! _h5ai/client/css/**, ! **/*.jade')
.newerThan(mapSrc)
.handlebars(env)
.write(mapSrc, true);
$(root + ': *.md')
.newerThan(mapRoot)
.write(mapRoot, true);
});
suite.target('build-uncompressed', ['check-version', 'lint'], 'build all updated files').task(function () {
var header = '/* ' + pkg.name + ' ' + pkg.version + ' - ' + pkg.homepage + ' */\n';
var env = {pkg: pkg};
$(src + ': _h5ai/client/js/*.js')
.newerThan(mapSrc, $(src + ': _h5ai/client/js/**'))
.includeit()
// .uglifyjs()
.wrap(header)
.write(mapSrc, true);
$(src + ': _h5ai/client/css/*.less')
.newerThan(mapSrc, $(src + ': _h5ai/client/css/**'))
.less()
.autoprefixer()
// .cssmin()
.wrap(header)
.write(mapSrc, true);
$(src + ': _h5ai/client/css/fonts/**')
.newerThan(mapSrc)
.write(mapSrc, true);
$(src + ': **/*.jade')
.newerThan(mapSrc)
.jade(env)
.write(mapSrc, true);
$(src + ': **, ! _h5ai/client/js/**, ! _h5ai/client/css/**, ! **/*.jade')
.newerThan(mapSrc)
.handlebars(env)
.write(mapSrc, true);
$(root + ': *.md')
.newerThan(mapRoot)
.write(mapRoot, true);
});
suite.target('release', ['clean', 'build'], 'create a zipball').task(function () {
var target = path.join(build, pkg.name + '-' + pkg.version + '.zip');
$(build + ': **')
.jszip({dir: build})
.write(target, true);
});
};

6579
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,31 +1,32 @@
{
"name": "h5ai",
"version": "0.27.0",
"develop": false,
"description": "a modern HTTP web server index",
"homepage": "http://larsjung.de/h5ai/",
"version": "0.29.1",
"description": "Modern HTTP web server index.",
"homepage": "https://larsjung.de/h5ai/",
"bugs": "https://github.com/lrsjng/h5ai/issues",
"author": "Lars Jung <lrsjng@gmail.com> (http://larsjung.de)",
"author": "Lars Jung <lrsjng@gmail.com> (https://larsjung.de)",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/lrsjng/h5ai.git"
},
"scripts": {
"build": "mkr release",
"test": "mocha --recursive test"
"build": "node ghu release"
},
"devDependencies": {
"autoprefixer-core": "~5.1.8",
"fquery": "~0.16.2",
"fquery-cssmin": "~0.3.0",
"fquery-handlebars": "~0.2.0",
"fquery-includeit": "~0.2.0",
"fquery-jade": "~0.3.0",
"fquery-jshint": "~0.2.0",
"fquery-jszip": "~0.4.0",
"fquery-less": "~0.2.0",
"fquery-uglifyjs": "~0.2.1",
"mkr": "~0.6.1"
"babel-loader": "6.2.4",
"babel-preset-env": "1.7.0",
"eslint": "5.14.1",
"ghu": "0.12.0",
"jsdom": "9.2.0",
"kjua": "0.1.2",
"lolight": "0.6.0",
"marked": "0.6.1",
"normalize.css": "8.0.1",
"null-loader": "0.1.1",
"scar": "1.0.0"
},
"engines": {
"node": ">=10.0.0"
}
}

4
src/.eslintrc Normal file
View File

@@ -0,0 +1,4 @@
---
rules:
no-console: 1
prefer-reflect: 0

View File

@@ -1,46 +1,165 @@
## details here: https://github.com/h5bp/server-configs-apache
DirectoryIndex index.html
## SECURITY ###################################################################
DirectoryIndex disabled
FileETag None
ServerSignature Off
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache ≥ 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header unset ETag
Header unset X-Powered-By
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
## COMPAT #####################################################################
AddDefaultCharset utf-8
<IfModule mod_mime.c>
AddCharset utf-8 .css .js .json .svg
AddCharset utf-8 .css .html .js .json .php .svg
AddType application/font-woff woff
AddType application/font-woff2 woff2
AddType application/json json
AddType application/javascript js
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttc ttf
AddType image/jpeg jpeg jpg
AddType image/png png
AddType image/svg+xml svg svgz
AddType image/x-icon ico
AddType font/opentype otf
AddType text/css css
AddType text/html html
</IfModule>
## SPEED ######################################################################
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 week"
# Data interchange
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# Favicon (cannot be renamed!)
ExpiresByType text/html "access plus 1 minute"
ExpiresByType image/x-icon "access plus 1 week"
# HTML
ExpiresByType text/html "access plus 0 seconds"
# JavaScript
ExpiresByType application/javascript "access plus 1 week"
# Media
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
# Web fonts
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Apache ≥ 2.3
<IfModule mod_authz_core.c>
# mod_filter as module only available for Apache ≥ 2.3.7
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE "application/atom+xml" \
"application/javascript" \
"application/json" \
"application/ld+json" \
"application/manifest+json" \
"application/rdf+xml" \
"application/rss+xml" \
"application/schema+json" \
"application/vnd.geo+json" \
"application/vnd.ms-fontobject" \
"application/x-font-ttf" \
"application/x-javascript" \
"application/x-web-app-manifest+json" \
"application/xhtml+xml" \
"application/xml" \
"font/eot" \
"font/opentype" \
"image/bmp" \
"image/svg+xml" \
"image/vnd.microsoft.icon" \
"image/x-icon" \
"text/cache-manifest" \
"text/css" \
"text/html" \
"text/javascript" \
"text/plain" \
"text/vcard" \
"text/vnd.rim.location.xloc" \
"text/vtt" \
"text/x-component" \
"text/x-cross-domain-policy" \
"text/xml"
</IfModule>
</IfModule>
# Apache < 2.3
<IfModule !mod_authz_core.c>
AddOutputFilterByType DEFLATE "application/atom+xml" \
"application/javascript" \
"application/json" \
"application/ld+json" \
"application/manifest+json" \
"application/rdf+xml" \
"application/rss+xml" \
"application/schema+json" \
"application/vnd.geo+json" \
"application/vnd.ms-fontobject" \
"application/x-font-ttf" \
"application/x-javascript" \
"application/x-web-app-manifest+json" \
"application/xhtml+xml" \
"application/xml" \
"font/eot" \
"font/opentype" \
"image/bmp" \
"image/svg+xml" \
"image/vnd.microsoft.icon" \
"image/x-icon" \
"text/cache-manifest" \
"text/css" \
"text/html" \
"text/javascript" \
"text/plain" \
"text/vcard" \
"text/vnd.rim.location.xloc" \
"text/vtt" \
"text/x-component" \
"text/x-cross-domain-policy" \
"text/xml"
</IfModule>
<IfModule mod_mime.c>
AddEncoding gzip gz
AddEncoding gzip svgz
</IfModule>
</IfModule>

View File

@@ -1,77 +0,0 @@
.cm-overlay {
display: none;
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
z-index: 200;
// background: rgba(0,0,0,0.1);
// background: rgba(255,255,255,0.6);
}
.cm-panel {
.popup();
.rounded();
display: block;
position: absolute;
left: 100px;
top: 100px;
background: #fff;
color: @col;
z-index: 10;
overflow: auto;
min-width: 200px;
ul {
margin: 0;
padding: 0;
list-style: none;
text-align: left;
.cm-label {
padding: 8px 16px;
white-space: nowrap;
font-weight: bold;
}
.cm-entry {
padding: 8px 16px;
white-space: nowrap;
cursor: pointer;
&:hover {
color: @col-hover;
background: @col-darkgray;
}
.cm-icon {
position: relative;
top: -2px;
img {
width: 20px;
height: 20px;
}
&.no-icon {
opacity: 0;
}
}
.cm-text {
margin: 0 0 0 12px;
}
}
.cm-sep {
height: 1px;
margin: 8px 0;
padding: 0;
border-top: 1px solid rgba(0,0,0,0.08);
}
}
}

View File

@@ -1,8 +0,0 @@
#download {
display: none;
&.failed {
background-color: @col-error;
}
}

View File

@@ -1,190 +0,0 @@
@col-blue-200: #90caf9;
@col-blue-400: #42a5f5;
@col-blue-500: #2196F3;
@col-blue-700: #1976D2;
@col-blue-900: #0D47A1;
@col-green: #4caf50;
@col-red: #f44336;
@col-pink-a200: #ff4081;
@col-light: #ffffff;
@col-lightgray: #fafafa;
// @col-darkgray: #eeeeee;
@col-darkgray: #f3f3f3;
// @col-dark: #333;
@col-dark: #212121;
@col-text-primary-black: rgba(0,0,0,0.87);
@col-text-secondary-black: rgba(0,0,0,0.54);
@col-text-disabled-black: rgba(0,0,0,0.26);
@col-divider-black: rgba(0,0,0,0.12);
@col-text-primary-white: rgba(255,255,255,1.0);
@col-text-secondary-white: rgba(255,255,255,0.7);
@col-text-disabled-white: rgba(255,255,255,0.3);
@col-divider-white: rgba(255,255,255,0.12);
@col-text-selected: @col-text-primary-white;
@col-back-selected: @col-blue-400;
@col-text-highlight: #111111;
@col-font-light: @col-light;
@col-font-dark: @col-dark;
@col-back-light: @col-lightgray;
@col-back-dark: @col-darkgray;
@col: @col-text-primary-black;
@col-back: @col-back-dark;
@col-hover: @col-blue-400;
@col-border: rgba(0,0,0,0.05);
@col-border-strong: rgba(0,0,0,0.15);
@col-border-stronger: rgba(0,0,0,0.3);
@col-okay: @col-green;
@col-error: @col-red;
@col-link: @col-blue-400;
@col-link-hover: @col-blue-400;
@col-widget-back: rgb(245,245,245);
@col-widget-back-highlight: rgba(255,255,255,0.8);
@col-widget-back-hover: rgba(255,255,255,0.8);
@col-widget-back-sel: rgba(255,255,255,0.8);
@col-widget-sep: @col-border;
@col-sb-back: rgba(0,0,0,0.08);
@col-sb-thumb: rgba(0,0,0,0.15);
@col-sb-thumb-active: rgba(0,0,0,0.25);
@col-range-back: rgb(224,224,224);
@col-range-thumb: #555;
@border-widget: 1px solid @col-border;
@border-widget-sep: 1px solid @col-widget-sep;
@font-family: Roboto, Helvetica, Arial, sans-serif;
@font-weight: normal;
@font-size: 13px;
@font-family-mono: monospace;
// @max-icon-size: 24px;
@max-icon-size: 32px;
// @max-icon-size: 48px;
::-moz-selection { background: @col-pink-a200; color: @col-text-primary-white; text-shadow: none; }
::selection { background: @col-pink-a200; color: @col-text-primary-white; text-shadow: none; }
.transition (@transition) {
-webkit-transition: @transition;
transition: @transition;
}
.transform (@transform) {
-webkit-transform: @transform;
-ms-transform: @transform;
transform: @transform;
zoom: 1;
}
.card() {
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.2);
}
.raised() {
box-shadow: 0 1px 10px 0 rgba(0,0,0,0.5);
}
.popup() {
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.5);
}
.rounded() {
// overflow: hidden;
border-radius: 2px;
}
.el-button() {
.card();
.rounded();
.transition(all 0.2s ease-in-out);
color: @col-text-primary-white;
background: @col-blue-400;
border-radius: 2px;
cursor: pointer;
text-decoration: none;
&:hover {
.raised();
}
}
.el-input() {
.card();
.rounded();
-moz-appearance: none;
-ms-appearance: none;
-webkit-appearance: none;
font-family: @font-family;
font-weight: @font-weight;
color: @col-text-primary-black;
background: @col-light;
border: none;
outline: none;
}
html {
min-height: 100%;
overflow: auto;
&.js .noJsMsg {
display: none;
}
&.browser .noBrowserMsg {
display: none;
}
}
body {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
font-family: @font-family;
font-size: @font-size;
font-weight: @font-weight;
color: @col-text-primary-black;
background: @col-back;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: flex-start;
align-content: flex-start;
align-items: stretch;
}
#main-row {
flex: 1 1 auto;
order: 50;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-content: flex-start;
align-items: stretch;
// non-webkit fix;
height: 0;
}
*:focus {
// outline: 1px solid @col-pink-a200;
outline: none;
}

View File

@@ -1,117 +0,0 @@
#pv-txt-text {
max-width: 960px;
text-align: left;
background-color: #fff;
margin: 0 auto;
padding: 8px;
overflow: auto;
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.3);
&.highlighted {
code {
font-family: @font-family-mono;
font-size: @font-size;
line-height: 1.2em;
}
a, a:active, a:visited {
color: #2080FF;
text-decoration: none;
cursor: pointer;
&:hover {
color: #68A9FF;
}
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #aaa;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.builtin {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #a67f59;
background: hsla(0,0%,100%,.5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function {
color: #DD4A68;
}
.token.regex,
.token.important {
color: #e90;
}
.token.important {
font-weight: bold;
}
.token.entity {
cursor: help;
}
}
&.markdown {
font-size: 1.1em;
padding: 8px 24px;
a, a:active, a:visited {
color: #2080FF;
text-decoration: none;
cursor: pointer;
&:hover {
color: #68A9FF;
}
}
pre, code {
font-family: @font-family-mono;
}
code {
color: #008200;
}
}
}

View File

@@ -1,31 +0,0 @@
@media only screen and (max-width: 700px) {
#crumbbar {
.crumb:not(.active) {
display: none;
}
.crumb.active .sep {
width: 0;
}
}
#view.view-details {
.header .label, .item .label {
margin-right: 80px !important;
}
.header .date, .item .date {
display: none;
}
}
#tree, #info {
display: none !important;
}
}
@media print {
a[href]:after {
content: "" !important;
}
#toolbar, #download, #sidebar, #tree, #info {
display: none !important;
}
}

View File

@@ -1,127 +0,0 @@
#topbar {
overflow: hidden;
flex: 0 0 auto;
order: 1;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-content: flex-start;
align-items: stretch;
background: @col-lightgray;
box-shadow: 0 0 8px 0 rgba(0,0,0,0.2);
z-index: 1;
}
#backlink {
overflow: hidden;
flex: 0 0 auto;
order: 99;
text-align: center;
padding: 6px 12px;
max-width: 80px;
overflow: hidden;
height: 36px;
.transition(all 0.2s ease-in-out);
&, &:active, &:visited {
color: @col-text-disabled-black;
cursor: pointer;
text-decoration: none;
}
&:hover {
color: @col-hover;
background: rgba(0,0,0,0.03);
}
&:focus {
outline: 0;
}
div {
line-height: 18px;
white-space: nowrap;
}
}
#toolbar {
overflow: hidden;
flex: 0 0 auto;
order: 1;
height: 48px;
.tool {
display: inline-block;
cursor: pointer;
img {
display: inline-block;
width: 24px;
height: 24px;
padding: 12px;
.transition(all 0.2s ease-in-out);
}
&:hover img {
background: rgba(0,0,0,0.03);
}
}
}
#crumbbar {
overflow: hidden;
flex: 1 1 auto;
order: 2;
height: 48px;
font-size: 16px;
padding: 0 8px;
// border-left: 1px solid rgba(0,0,0,0.05);
a, a:active, a:visited {
color: @col;
cursor: pointer;
text-decoration: none;
&.active {
font-weight: bold;
color: @col-text-highlight;
}
&:hover {
color: @col-hover;
}
&:focus {
outline: 0;
}
}
.crumb {
display: inline-block;
.transition(all 0.2s ease-in-out);
}
.sep {
width: 24px;
height: 24px;
padding: 12px 0;
line-height: 48px;
display: inline-block;
vertical-align: top;
}
.label {
line-height: 48px;
display: inline-block;
vertical-align: top;
padding: 0 8px;
}
.hint {
width: 16px;
height: 16px;
padding: 16px 4px 16px 0;
line-height: 48px;
display: inline-block;
vertical-align: top;
}
}

View File

@@ -1,149 +0,0 @@
html.drag-select, html.drag-select * {
cursor: move !important;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#selection-rect {
display: none;
position: absolute;
left: 0;
top: 0;
z-index: 2;
border: 1px dashed @col-border-strong;
background: rgba(0,0,0,0.1);
}
#view {
display: none;
a, a:active, a:visited {
display: block;
color: inherit;
cursor: pointer;
text-decoration: none;
}
ul {
margin: 0;
padding: 0;
list-style: none;
}
.header {
display: none;
}
.item {
position: relative;
white-space: nowrap;
background: #fff;
&:hover {
color: @col-hover;
background: @col-lightgray;
border-color: @col-border;
.selector {
display: block;
}
}
&.selected:not(.selecting), &.selecting:not(.selected) {
color: @col-text-selected;
background: @col-back-selected;
&:hover {
color: @col-text-selected;
background: @col-back-selected;
}
.selector {
display: block;
opacity: 1;
}
}
}
.folder-parent {
.date, .size {
display: none;
}
}
.icon {
display: none;
text-align: center;
img {
max-width: @max-icon-size;
max-height: @max-icon-size;
position: relative;
top: 50%;
transform: translateY(-50%);
}
.thumb {
max-width: none;
max-height: none;
}
}
.label {
display: block;
overflow: hidden;
text-align: left;
text-overflow: ellipsis;
}
.date {
text-align: right;
width: 130px;
}
.size {
text-align: right;
width: 80px;
}
.selector {
display: none;
position: absolute;
left: 0;
top: 0;
width: 22px;
height: 22px;
background: @col-back-selected;
cursor: pointer;
border-radius: 0 0 2px 0;
opacity: 0.6;
&:hover {
opacity: 0.8;
}
img {
width: 100%;
height: 100%;
}
}
.empty, .no-match {
display: none;
margin-top: 36px;
text-align: center;
color: @col-border;
font-size: 5em;
font-weight: bold;
}
}

View File

@@ -1,172 +0,0 @@
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Image replacement
*/
.ir {
background-color: transparent;
border: 0;
overflow: hidden;
/* IE 6/7 fallback */
*text-indent: -9999px;
}
.ir:before {
content: "";
display: block;
width: 0;
height: 150%;
}
/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
display: none !important;
visibility: hidden;
}
/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
/*
* Extends the .visuallyhidden class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
/*
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.clearfix {
*zoom: 1;
}
/* ==========================================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
@media print {
* {
background: transparent !important;
color: #000 !important; /* Black prints faster: h5bp.com/s */
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links for images, or javascript/internal links
*/
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group; /* h5bp.com/t */
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page {
margin: 0.5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}

View File

@@ -1,87 +0,0 @@
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */
html,
button,
input,
select,
textarea {
color: #222;
}
body {
font-size: 1em;
line-height: 1.4;
}
/*
* Remove text-shadow in selection highlight: h5bp.com/i
* These selection rule sets have to be separate.
* Customize the background color to match your design.
*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/*
* Remove the gap between images, videos, audio and canvas and the bottom of
* their containers: h5bp.com/i/440
*/
audio,
canvas,
img,
video {
vertical-align: middle;
}
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
/* ==========================================================================
Author's custom styles
========================================================================== */

View File

@@ -1,527 +0,0 @@
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
* Known issue: no IE 6 support.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
* `em` units.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-size: 100%; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Address `font-family` inconsistency between `textarea` and other form
* elements.
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
/**
* Address margins handled incorrectly in IE 6/7.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address font sizes and margins set differently in IE 6/7.
* Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
* and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
h6 {
font-size: 0.67em;
margin: 2.33em 0;
}
/**
* Address styling not present in IE 7/8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
* Known issue: no IE 6/7 normalization.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 6/7/8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address margins set differently in IE 6/7.
*/
p,
pre {
margin: 1em 0;
}
/**
* Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/**
* Address CSS quotes not supported in IE 6/7.
*/
q {
quotes: none;
}
/**
* Address `quotes` property not supported in Safari 4.
*/
q:before,
q:after {
content: '';
content: none;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Lists
========================================================================== */
/**
* Address margins set differently in IE 6/7.
*/
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
/**
* Address paddings set differently in IE 6/7.
*/
menu,
ol,
ul {
padding: 0 0 0 40px;
}
/**
* Correct list images handled incorrectly in IE 7.
*/
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
* 2. Improve image quality when scaled in IE 7.
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Correct margin displayed oddly in IE 6/7.
*/
form {
margin: 0;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct color not being inherited in IE 6/7/8/9.
* 2. Correct text not wrapping in Firefox 3.
* 3. Correct alignment displayed oddly in IE 6/7.
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/**
* 1. Correct font size not being inherited in all browsers.
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
* and Chrome.
* 3. Improve appearance and consistency in all browsers.
*/
button,
input,
select,
textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/**
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE 6.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to content-box in IE 8/9.
* 2. Remove excess padding in IE 8/9.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 3+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@@ -1,33 +0,0 @@
@import "lib/h5bp-normalize";
@import "lib/h5bp-main-header";
@import "inc/general";
@import "inc/topbar";
@import "inc/sidebar";
@import "inc/download";
@import "inc/filter";
@import "inc/tree";
@import "inc/info";
@import "inc/preview";
@import "inc/preview-aud";
@import "inc/preview-img";
@import "inc/preview-txt";
@import "inc/preview-vid";
@import "inc/notify";
@import "inc/content";
@import "inc/view";
@import "inc/view-details";
@import "inc/view-icons";
@import "inc/view-grid";
@import "inc/contextmenu";
@import "inc/fallback";
@import "inc/responsive";
@import "inc/h5ai-info";
@import "lib/h5bp-main-footer";
@import url(//fonts.googleapis.com/css?family=Roboto:300,400,700);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M5 3C3.9 3 3 3.9 3 5L3 19C3 20.1 3.9 21 5 21L19 21C20.1 21 21 20.1 21 19L21 5C21 3.9 20.1 3 19 3L5 3zM10 5L14 5 14 11 10 11 10 5z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 299 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M6 2C4.9 2 4 2.9 4 4L4 20C4 21.1 4.9 22 6 22L18 22C19.1 22 20 21.1 20 20L20 4C20 2.9 19.1 2 18 2L6 2zM13.1 7.1C15.4 7.6 17 9.6 17 12 17 14.4 15.4 16.4 13.1 16.9L13.1 15.7C14.7 15.2 15.9 13.8 15.9 12 15.9 10.2 14.7 8.8 13.1 8.3L13.1 7.1zM12 7.6L12 16.4 9.2 13.7 7 13.7 7 10.3 9.2 10.3 12 7.6zM13.1 9.8C13.9 10.2 14.5 11 14.5 12 14.5 13 13.9 13.8 13.1 14.2L13.1 9.8z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 534 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M5 3C3.9 3 3 3.9 3 5L3 19C3 20.1 3.9 21 5 21L19 21C20.1 21 21 20.1 21 19L21 5C21 3.9 20.1 3 19 3L5 3zM10.8 6L13.2 6C13.4 6 13.5 6.1 13.5 6.3L13.8 7.8C14.1 8 14.4 8.2 14.7 8.4L16.2 7.8C16.4 7.8 16.5 7.8 16.6 8L17.8 10C17.9 10.2 17.8 10.3 17.7 10.4L16.5 11.4C16.5 11.6 16.5 11.8 16.5 12 16.5 12.2 16.5 12.4 16.5 12.6L17.7 13.6C17.8 13.7 17.9 13.8 17.8 14L16.6 16C16.5 16.2 16.4 16.3 16.2 16.2L14.7 15.6C14.4 15.8 14.1 16 13.8 16.2L13.5 17.8C13.5 17.9 13.4 18 13.2 18L10.8 18C10.6 18 10.5 17.9 10.5 17.8L10.3 16.2C9.9 16 9.6 15.8 9.3 15.6L7.8 16.2C7.6 16.2 7.5 16.2 7.4 16L6.2 14C6.1 13.8 6.2 13.7 6.3 13.6L7.6 12.6C7.5 12.4 7.5 12.2 7.5 12 7.5 11.8 7.5 11.6 7.6 11.4L6.3 10.4C6.2 10.3 6.1 10.2 6.2 10L7.4 8C7.5 7.8 7.6 7.7 7.8 7.8L9.3 8.4C9.6 8.2 9.9 8 10.3 7.8L10.5 6.3C10.5 6.1 10.6 6 10.8 6zM12 9.9C10.8 9.9 9.9 10.8 9.9 12 9.9 13.2 10.8 14.1 12 14.1 13.2 14.1 14.1 13.2 14.1 12 14.1 10.8 13.2 9.9 12 9.9z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="m14 2-8 0c-1.1 0-2 0.9-2 2L4 20c0 1.1 0.9 2 2 2L18 22c1.1 0 2-0.9 2-2L20 8zm-1 7 0-5.5 5.5 5.5z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 265 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M4 4C2.9 4 2 4.9 2 6L2 18C2 19.1 2.9 20 4 20L20 20C21.1 20 22 19.1 22 18L22 8C22 6.9 21.1 6 20 6L12 6 10 4 4 4zM19 9L19 17 11 17C11 12.6 14.6 9 19 9z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 319 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" version="1.1">
<path d="m10 4-6 6 6 6 1.4-1.4L7.8 11 15 11c1.6 0 3 1.3 3 3 0 1.7-1.4 3-3 3l0 2c2.6 0 5-2.2 5-5 0-2.8-2.4-5-5-5l-7.2 0 3.6-3.6z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 288 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M4 4C2.9 4 2 4.9 2 6l0 2 0 1 0 9c0 1.1 0.9 2 2 2l16 0c1.1 0 2-0.9 2-2L22 8C22 6.9 21.1 6 20 6L12 6 10 4z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 274 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M4 4C2.9 4 2 4.9 2 6l0 12c0 1.1 0.9 2 2 2l16 0c1.1 0 2-0.9 2-2L22 6C22 4.9 21.1 4 20 4zm5 6 4 5 3-2 3 4-14 0z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 279 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M14 2H6c-1.1 0-2 0.9-2 2L4 20c0 1.1 0.9 2 2 2H18c1.1 0 2-0.9 2-2V8l-6-6zM16 18H8v-2h8v2zm0-4H8v-2h8v2zM13 9v-5.5l5.5 5.5H13z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 294 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="M4 4C2.9 4 2 4.9 2 6l0 12c0 1.1 0.9 2 2 2l16 0c1.1 0 2-0.9 2-2L22 6C22 4.9 21.1 4 20 4zM4 7 6 7 6 9 4 9zm14 0 2 0 0 2-2 0zm-14 4 2 0 0 2-2 0zm14 0 2 0 0 2-2 0zm-14 4 2 0 0 2-2 0zm14 0 2 0 0 2-2 0z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 366 B

View File

@@ -1,3 +0,0 @@
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" version="1.1">
<path d="m14 2-8 0c-1.1 0-2 0.9-2 2L4 20c0 1.1 0.9 2 2 2L18 22c1.1 0 2-0.9 2-2L20 8zm-1 7 0-5.5 5.5 5.5z" fill="#555"/>
</svg>

Before

Width:  |  Height:  |  Size: 265 B

View File

@@ -1,46 +0,0 @@
modulejs.define('core/event', ['_'], function (_) {
var slice = Array.prototype.slice;
var subscriptions = {};
function sub(topic, callback) {
if (_.isString(topic) && _.isFunction(callback)) {
if (!subscriptions[topic]) {
subscriptions[topic] = [];
}
subscriptions[topic].push(callback);
}
}
function unsub(topic, callback) {
if (_.isString(topic) && _.isFunction(callback) && subscriptions[topic]) {
subscriptions[topic] = _.without(subscriptions[topic], callback);
}
}
function pub(topic, data) {
var args = slice.call(arguments, 1);
// console.log('EVENT PUB', topic, args);
if (_.isString(topic) && subscriptions[topic]) {
_.each(subscriptions[topic], function (callback) {
callback.apply(topic, args);
});
}
}
return {
sub: sub,
unsub: unsub,
pub: pub
};
});

View File

@@ -1,57 +0,0 @@
modulejs.define('core/format', ['_', 'moment'], function (_, moment) {
var decimalMetric = {
t: 1000.0,
k: 1000.0,
u: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
};
var binaryMetric = {
t: 1024.0,
k: 1024.0,
u: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
};
var defaultMetric = decimalMetric;
var defaultDateFormat = 'YYYY-MM-DD HH:mm';
function setDefaultMetric(useBinaryMetric) {
defaultMetric = useBinaryMetric ? binaryMetric : decimalMetric;
}
function formatSize(size, metric) {
metric = metric || defaultMetric;
if (!_.isNumber(size) || size < 0) {
return '';
}
var i = 0;
var maxI = metric.u.length - 1;
while (size >= metric.t && i < maxI) {
size /= metric.k;
i += 1;
}
return (i <= 1 ? Math.round(size) : size.toFixed(1)).toString() + ' ' + metric.u[i];
}
function setDefaultDateFormat(dateFormat) {
defaultDateFormat = dateFormat;
}
function formatDate(millis) {
return _.isNumber(millis) && millis ? moment(millis).format(defaultDateFormat) : '';
}
return {
setDefaultMetric: setDefaultMetric,
formatSize: formatSize,
setDefaultDateFormat: setDefaultDateFormat,
formatDate: formatDate
};
});

View File

@@ -1,4 +0,0 @@
modulejs.define('core/langs', ['config', '_'], function (config, _) {
return _.extend({}, config.langs);
});

View File

@@ -1,204 +0,0 @@
modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event', 'core/notify'], function (_, modernizr, allsettings, event, notify) {
var settings = _.extend({
smartBrowsing: true,
unmanagedInNewWindow: true
}, allsettings.view);
var doc = document;
var history = settings.smartBrowsing && modernizr.history ? window.history : null;
var reUriToPathname = /^.*:\/\/[^\/]*|[^\/]*$/g;
var absHref = null;
function forceEncoding(href) {
return href
.replace(/\/+/g, '/')
.replace(/ /g, '%20')
.replace(/!/g, '%21')
.replace(/#/g, '%23')
.replace(/\$/g, '%24')
.replace(/&/g, '%26')
.replace(/'/g, '%27')
.replace(/\(/g, '%28')
.replace(/\)/g, '%29')
.replace(/\*/g, '%2A')
.replace(/\+/g, '%2B')
.replace(/\,/g, '%2C')
// .replace(/\//g, '%2F')
.replace(/:/g, '%3A')
.replace(/;/g, '%3B')
.replace(/=/g, '%3D')
.replace(/\?/g, '%3F')
.replace(/@/g, '%40')
.replace(/\[/g, '%5B')
.replace(/\]/g, '%5D');
}
function uriToPathname(uri) {
return uri.replace(reUriToPathname, '');
}
var hrefsAreDecoded = (function () {
var testpathname = '/a b';
var a = doc.createElement('a');
a.href = testpathname;
return uriToPathname(a.href) === testpathname;
}());
function encodedHref(href) {
var a = doc.createElement('a');
var location;
a.href = href;
location = uriToPathname(a.href);
if (hrefsAreDecoded) {
location = encodeURIComponent(location).replace(/%2F/ig, '/');
}
return forceEncoding(location);
}
function getDomain() {
return doc.domain;
}
function getAbsHref() {
return absHref;
}
function getItem() {
return modulejs.require('model/item').get(absHref);
}
function load(callback) {
modulejs.require('core/server').request({action: 'get', items: true, itemsHref: absHref, itemsWhat: 1}, function (json) {
var Item = modulejs.require('model/item');
var item = Item.get(absHref);
if (json) {
var found = {};
_.each(json.items, function (jsonItem) {
var e = Item.get(jsonItem.absHref, jsonItem.time, jsonItem.size, jsonItem.is_managed, jsonItem.content, jsonItem.md5, jsonItem.sha1);
found[e.absHref] = true;
});
_.each(item.content, function (e) {
if (!found[e.absHref]) {
Item.remove(e.absHref);
}
});
}
if (_.isFunction(callback)) {
callback(item);
}
});
}
function setLocation(newAbsHref, keepBrowserUrl) {
event.pub('location.beforeChange');
newAbsHref = encodedHref(newAbsHref);
if (absHref !== newAbsHref) {
absHref = newAbsHref;
if (history) {
if (keepBrowserUrl) {
history.replaceState({absHref: absHref}, '', absHref);
} else {
history.pushState({absHref: absHref}, '', absHref);
}
}
}
var item = getItem();
if (item.isLoaded) {
event.pub('location.changed', item);
refresh();
} else {
notify.set('loading...');
load(function () {
item.isLoaded = true;
notify.set();
event.pub('location.changed', item);
});
}
}
function refresh() {
var item = getItem();
var oldItems = _.values(item.content);
event.pub('location.beforeRefresh');
load(function () {
var newItems = _.values(item.content);
var added = _.difference(newItems, oldItems);
var removed = _.difference(oldItems, newItems);
event.pub('location.refreshed', item, added, removed);
});
}
function setLink($el, item) {
$el.attr('href', item.absHref);
if (history && item.isFolder() && item.isManaged) {
$el.on('click', function () {
setLocation(item.absHref);
return false;
});
}
if (settings.unmanagedInNewWindow && !item.isManaged) {
$el.attr('target', '_blank');
}
}
if (history) {
window.onpopstate = function (e) {
if (e.state && e.state.absHref) {
setLocation(e.state.absHref, true);
}
};
}
event.sub('ready', function () {
setLocation(document.location.href, true);
});
return {
forceEncoding: forceEncoding,
getDomain: getDomain,
getAbsHref: getAbsHref,
getItem: getItem,
setLocation: setLocation,
refresh: refresh,
setLink: setLink
};
});

View File

@@ -1,19 +0,0 @@
modulejs.define('core/notify', ['$'], function ($) {
var template = '<div id="notify"/>';
function set(content) {
if (content) {
$('#notify').stop(true, true).html(content).fadeIn(400);
} else {
$('#notify').stop(true, true).fadeOut(400);
}
}
$(template).hide().appendTo('body');
return {
set: set
};
});

View File

@@ -1,40 +0,0 @@
modulejs.define('core/resource', ['_', 'config', 'core/settings'], function (_, config, settings) {
var imagesHref = settings.appHref + 'client/images/';
var uiHref = imagesHref + 'ui/';
var themesHref = imagesHref + 'themes/';
var defaultThemeHref = themesHref + 'default/';
var defaultIcons = ['file', 'folder', 'folder-page', 'folder-parent', 'ar', 'aud', 'bin', 'img', 'txt', 'vid', 'x'];
function image(id) {
return uiHref + id + '.svg';
}
function icon(id) {
var baseId = id.split('-')[0];
var href = config.theme[id] || config.theme[baseId];
if (href) {
return themesHref + href;
}
if (_.indexOf(defaultIcons, id) >= 0) {
return defaultThemeHref + id + '.svg';
}
if (_.indexOf(defaultIcons, baseId) >= 0) {
return defaultThemeHref + baseId + '.svg';
}
return defaultThemeHref + 'file.svg';
}
return {
image: image,
icon: icon
};
});

View File

@@ -1,55 +0,0 @@
modulejs.define('core/server', ['$', '_', 'config', 'core/location'], function ($, _, config, location) {
var hasApi = config.setup.API === true;
function request(data, callback) {
if (hasApi) {
$.ajax({
url: location.getAbsHref(),
data: data,
type: 'POST',
dataType: 'json'
})
.done(function (json) {
callback(json);
})
.fail(function () {
callback();
});
} else {
callback();
}
}
function formRequest(data) {
if (hasApi) {
var $form = $('<form method="post" style="display:none;"/>')
.attr('action', location.getAbsHref());
_.each(data, function (val, key) {
$('<input type="hidden"/>')
.attr('name', key)
.attr('value', val)
.appendTo($form);
});
$form.appendTo('body').submit().remove();
}
}
return {
backend: config.setup.BACKEND,
api: hasApi,
name: config.setup.SERVER_NAME,
version: config.setup.SERVER_VERSION,
request: request,
formRequest: formRequest
};
});

View File

@@ -1,8 +0,0 @@
modulejs.define('core/settings', ['config', '_'], function (config, _) {
return _.extend({}, config.options, {
appHref: config.setup.APP_HREF,
rootHref: config.setup.ROOT_HREF,
currentHref: config.setup.CURRENT_HREF
});
});

View File

@@ -1,41 +0,0 @@
modulejs.define('core/store', ['modernizr'], function (modernizr) {
var store = modernizr.localstorage ? window.localStorage : null;
var key = '_h5ai';
function load() {
if (store) {
try {
return JSON.parse(store[key]);
} catch (e) {}
}
return {};
}
function save(obj) {
if (store) {
store[key] = JSON.stringify(obj);
}
}
function put(key, value) {
var obj = load();
obj[key] = value;
return save(obj);
}
function get(key) {
return load()[key];
}
return {
put: put,
get: get
};
});

View File

@@ -1,48 +0,0 @@
modulejs.define('core/types', ['config', '_'], function (config, _) {
var reEndsWithSlash = /\/$/;
var regexps = {};
function escapeRegExp(sequence) {
return sequence.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$]/g, "\\$&");
// return sequence.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
function parse(types) {
_.each(types, function (patterns, type) {
var pattern = '^(' + _.map(patterns, function (p) { return '(' + escapeRegExp(p).replace(/\*/g, '.*') + ')'; }).join('|') + ')$';
regexps[type] = new RegExp(pattern, 'i');
});
}
function getType(sequence) {
if (reEndsWithSlash.test(sequence)) {
return 'folder';
}
var slashidx = sequence.lastIndexOf('/');
var name = slashidx >= 0 ? sequence.substr(slashidx + 1) : sequence;
for (var type in regexps) {
if (regexps.hasOwnProperty(type)) {
if (regexps[type].test(name)) {
return type;
}
}
}
return 'file';
}
parse(_.extend({}, config.types));
return {
getType: getType
};
});

View File

@@ -1,71 +0,0 @@
modulejs.define('core/util', [], function () {
function regularCmpFn(val1, val2) {
if (val1 < val2) {
return -1;
}
if (val1 > val2) {
return 1;
}
return 0;
}
// Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license
// Author: Jim Palmer (based on chunking idea from Dave Koelle)
//
// Modified to make it work with h5ai
function naturalCmpFn(val1, val2) {
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi;
var sre = /(^[ ]*|[ ]*$)/g;
var dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/;
var hre = /^0x[0-9a-f]+$/i;
var ore = /^0/;
// convert all to strings strip whitespace
var x = ('' + val1).replace(sre, '');
var y = ('' + val2).replace(sre, '');
// chunk/tokenize
var xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0');
var yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0');
// numeric, hex or date detection
var xD = parseInt(x.match(hre), 10) || (xN.length !== 1 && x.match(dre) && Date.parse(x));
var yD = parseInt(y.match(hre), 10) || xD && y.match(dre) && Date.parse(y) || null;
var oFxNcL, oFyNcL;
// first try and sort Hex codes or Dates
if (yD) {
if (xD < yD) {
return -1;
} else if (xD > yD) {
return 1;
}
}
// natural sorting through split numeric strings and default strings
for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc += 1) {
// find floats not starting with '0', string or 0 if not defined (Clint Priest)
oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
// handle numeric vs string comparison - number < string - (Kyle Adams)
if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { return (isNaN(oFxNcL)) ? 1 : -1; }
// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
else if (typeof oFxNcL !== typeof oFyNcL) {
oFxNcL += '';
oFyNcL += '';
}
if (oFxNcL < oFyNcL) {
return -1;
}
if (oFxNcL > oFyNcL) {
return 1;
}
}
return 0;
}
return {
regularCmpFn: regularCmpFn,
naturalCmpFn: naturalCmpFn
};
});

View File

@@ -1,42 +0,0 @@
modulejs.define('ext/autorefresh', ['_', '$', 'core/settings', 'core/event', 'core/location'], function (_, $, allsettings, event, location) {
var settings = _.extend({
enabled: false,
interval: 5000
}, allsettings.autorefresh);
var timeoutId = null;
function heartbeat() {
location.refresh();
}
function before() {
clearTimeout(timeoutId);
}
function after() {
clearTimeout(timeoutId);
timeoutId = setTimeout(heartbeat, settings.interval);
}
function init() {
if (!settings.enabled) {
return;
}
settings.interval = Math.max(1000, settings.interval);
event.sub('location.beforeChange', before);
event.sub('location.beforeRefresh', before);
event.sub('location.changed', after);
event.sub('location.refreshed', after);
}
init();
});

View File

@@ -1,179 +0,0 @@
modulejs.define('ext/contextmenu', ['_', '$', 'core/settings', 'core/resource'], function (_, $, allsettings, resource) {
var settings = _.extend({
enabled: false
}, allsettings.contextmenu);
var templateOverlay = '<div class="cm-overlay"/>';
var templatePanel = '<div class="cm-panel"><ul/></div>';
var templateSep = '<li class="cm-sep"/>';
var templateEntry = '<li class="cm-entry"><span class="cm-icon"><img/></span><span class="cm-text"/></li>';
var templateLabel = '<li class="cm-label"><span class="cm-text"/></li>';
function createOverlay(callback) {
var $overlay = $(templateOverlay);
$overlay
.on('click contextmenu', function (ev) {
ev.stopPropagation();
ev.preventDefault();
var cmId = $(ev.target).closest('.cm-entry').data('cm-id');
if (ev.target === $overlay[0] || cmId !== undefined) {
$overlay.remove();
callback(cmId);
}
});
return $overlay;
}
function createPanel(menu) {
var $panel = $(templatePanel);
var $ul = $panel.find('ul');
var $li;
_.each(menu, function (entry) {
if (entry.type === '-') {
$(templateSep).appendTo($ul);
}
else if (entry.type === 'l') {
$(templateLabel)
.find('.cm-text').text(entry.text).end()
.appendTo($ul);
}
else if (entry.type === 'e') {
$li = $(templateEntry)
.data('cm-id', entry.id)
.find('.cm-text').text(entry.text).end()
.appendTo($ul);
if (entry.icon) {
$li.find('.cm-icon img').attr('src', resource.icon(entry.icon));
} else {
$li.find('.cm-icon').addClass('no-icon');
}
}
});
return $panel;
}
function positionPanel($overlay, $panel, x, y) {
var margin = 4;
$panel.css({
left: 0,
top: 0,
opacity: 0
});
$overlay.show();
var overlayOffset = $overlay.offset();
var overlayLeft = overlayOffset.left;
var overlayTop = overlayOffset.top;
var overlayWidth = $overlay.outerWidth(true);
var overlayHeight = $overlay.outerHeight(true);
var panelOffset = $panel.offset();
var panelLeft = panelOffset.left;
var panelTop = panelOffset.top;
var panelWidth = $panel.outerWidth(true);
var panelHeight = $panel.outerHeight(true);
var posLeft = x;
var posTop = y;
if (panelWidth > overlayWidth - 2 * margin) {
posLeft = margin;
panelWidth = overlayWidth - 2 * margin;
}
if (panelHeight > overlayHeight - 2 * margin) {
posTop = margin;
panelHeight = overlayHeight - 2 * margin;
}
if (posLeft < overlayLeft + margin) {
posLeft = overlayLeft + margin;
}
if (posLeft + panelWidth > overlayLeft + overlayWidth - margin) {
posLeft = overlayLeft + overlayWidth - margin - panelWidth;
}
if (posTop < overlayTop + margin) {
posTop = overlayTop + margin;
}
if (posTop + panelHeight > overlayTop + overlayHeight - margin) {
posTop = overlayTop + overlayHeight - margin - panelHeight;
}
$panel.css({
left: posLeft,
top: posTop,
width: panelWidth,
height: panelHeight,
opacity: 1
});
}
function showMenuAt(x, y, menu, callback) {
var $overlay = createOverlay(callback);
var $panel = createPanel(menu);
$overlay.append($panel).appendTo('body');
positionPanel($overlay, $panel, x, y);
}
function init() {
if (!settings.enabled) {
return;
}
$(document).on('contextmenu', function (ev) {
ev.stopPropagation();
ev.preventDefault();
$(ev.target).trigger($.Event('h5ai-contextmenu', {
originalEvent: ev,
showMenu: function (menu, callback) {
showMenuAt(ev.pageX, ev.pageY, menu, callback);
}
}));
});
// var menu = [
// {type: 'e', id: 'e1', text: 'testing context menus'},
// {type: 'e', id: 'e2', text: 'another entry'},
// {type: 'e', id: 'e3', text: 'one with icon', icon: 'folder'},
// {type: '-'},
// {type: 'e', id: 'e4', text: 'one with icon', icon: 'x'},
// {type: 'e', id: 'e5', text: 'one with icon', icon: 'img'}
// ];
// var callback = function (res) {
// window.console.log('>> CB-RESULT >> ' + res);
// };
// $(document).on('h5ai-contextmenu', '#items .item.folder', function (ev) {
// window.console.log('CM', ev);
// ev.showMenu(menu, callback);
// });
}
init();
});

View File

@@ -1,86 +0,0 @@
modulejs.define('ext/crumb', ['_', '$', 'core/settings', 'core/resource', 'core/event', 'core/location'], function (_, $, allsettings, resource, event, location) {
var settings = _.extend({
enabled: false
}, allsettings.crumb);
var template =
'<a class="crumb">' +
'<img class="sep" src="' + resource.image('crumb') + '" alt=">"/>' +
'<span class="label"/>' +
'</a>';
var pageHintTemplate = '<img class="hint" src="' + resource.icon('folder-page') + '" alt="has index page"/>';
function update(item, force) {
if (!force && item.$crumb) {
return item.$crumb;
}
var $html = $(template);
$html
.addClass(item.isFolder() ? 'folder' : 'file')
.data('item', item);
location.setLink($html, item);
$html.find('.label').text(item.label).end();
if (item.isDomain() || item.isRoot()) {
$html.find('.sep').width(0);
}
if (item.isCurrentFolder()) {
$html.addClass('active');
}
if (!item.isManaged) {
$html.append($(pageHintTemplate));
}
if (item.$crumb) {
item.$crumb.replaceWith($html);
}
item.$crumb = $html;
return $html;
}
function onLocationChanged(item) {
var crumb = item.getCrumb();
var $crumbbar = $('#crumbbar');
var found = false;
$crumbbar.find('.crumb').each(function () {
var $html = $(this);
if ($html.data('item') === item) {
found = true;
$html.addClass('active');
} else {
$html.removeClass('active');
}
});
if (!found) {
$crumbbar.find('.crumb').remove();
_.each(crumb, function (e) {
$crumbbar.append(update(e, true));
});
}
}
function init() {
if (!settings.enabled) {
return;
}
event.sub('location.changed', onLocationChanged);
}
init();
});

View File

@@ -1,61 +0,0 @@
modulejs.define('ext/custom', ['_', '$', 'marked', 'core/settings', 'core/server', 'core/event', 'core/resource'], function (_, $, marked, allsettings, server, event, resource) {
var settings = _.extend({
enabled: false
}, allsettings.custom);
var $header, $footer;
var duration = 200;
function onLocationChanged(item) {
server.request({action: 'get', custom: true, customHref: item.absHref}, function (response) {
var has_header, has_footer, data, content;
if (response) {
data = response.custom;
if (data.header) {
content = data.header;
if (data.header_type === 'md') {
content = marked(content);
}
$header.html(content).stop().slideDown(duration);
has_header = true;
}
if (data.footer) {
content = data.footer;
if (data.footer_type === 'md') {
content = marked(content);
}
$footer.html(content).stop().slideDown(duration);
has_footer = true;
}
}
if (!has_header) {
$header.stop().slideUp(duration);
}
if (!has_footer) {
$footer.stop().slideUp(duration);
}
});
}
function init() {
if (!settings.enabled) {
return;
}
$header = $('<div id="content-header"/>').hide().prependTo('#content');
$footer = $('<div id="content-footer"/>').hide().appendTo('#content');
event.sub('location.changed', onLocationChanged);
}
init();
});

View File

@@ -1,71 +0,0 @@
modulejs.define('ext/download', ['_', '$', 'core/settings', 'core/resource', 'core/event', 'core/location', 'core/server'], function (_, $, allsettings, resource, event, location, server) {
var settings = _.extend({
enabled: false,
type: 'php-tar',
packageName: 'package',
alwaysVisible: false
}, allsettings.download);
var downloadBtnTemplate =
'<div id="download" class="tool">' +
'<img src="' + resource.image('download') + '" alt="download"/>' +
'</div>';
var selectedItems = [];
function onSelection(items) {
var $download = $('#download');
selectedItems = items.slice(0);
if (selectedItems.length) {
$download.show();
} else if (!settings.alwaysVisible) {
$download.hide();
}
}
function onClick(event) {
var type = settings.type;
var name = settings.packageName;
var extension = (type === 'shell-zip') ? 'zip' : 'tar';
if (!name) {
if (selectedItems.length === 1) {
name = selectedItems[0].label;
} else {
name = location.getItem().label;
}
}
var query = {
action: 'download',
as: name + '.' + extension,
type: type,
hrefs: _.pluck(selectedItems, 'absHref').join('|:|')
};
server.formRequest(query);
}
function init() {
if (!settings.enabled) {
return;
}
$(downloadBtnTemplate)
.on('click', onClick)
.appendTo('#toolbar');
if (settings.alwaysVisible) {
$('#download').show();
}
event.sub('selection', onSelection);
}
init();
});

View File

@@ -1,110 +0,0 @@
modulejs.define('ext/filter', ['_', '$', 'core/settings', 'core/resource', 'core/event'], function (_, $, allsettings, resource, event) {
var settings = _.extend({
enabled: false
}, allsettings.filter);
var template =
'<div id="filter" class="tool">' +
'<img src="' + resource.image('filter') + '" alt="filter"/>' +
'<input type="text" value="" placeholder="filter"/>' +
'</div>';
var noMatchTemplate = '<div class="no-match l10n-noMatch"/>';
var inputIsVisible = false;
var $filter, $input, $noMatch;
function filter(re) {
var match = [];
var noMatch = [];
var duration = 200;
if (re) {
$('#items .item').not('.folder-parent').each(function () {
var label = $(this).find('.label').text();
if (label.match(re)) {
match.push(this);
} else {
noMatch.push(this);
}
});
} else {
match = $('#items .item').not('.folder-parent');
}
if (match.length) {
$noMatch.hide();
} else if (noMatch.length) {
setTimeout(function () { $noMatch.show(); }, duration);
}
$(match).fadeIn(duration);
$(noMatch).fadeOut(duration);
}
function escapeRegExp(sequence) {
return sequence.replace(/[\-\[\]{}()*+?.,\\$\^|#\s]/g, '\\$&');
}
function parseFilterSequence(sequence) {
if (sequence.substr(0, 3) === 're:') {
return new RegExp(sequence.substr(3));
}
sequence = $.map($.trim(sequence).split(/\s+/), function (part) {
return _.map(part.split(''), function (character) {
return escapeRegExp(character);
}).join('.*?');
}).join('|');
return new RegExp(sequence, 'i');
}
function update() {
if (inputIsVisible) {
var val = $input.val();
filter(parseFilterSequence(val));
$filter.addClass('active');
$input.focus();
} else {
filter();
$filter.removeClass('active');
}
}
function toggle() {
inputIsVisible = !inputIsVisible;
update();
}
function reset() {
$input.val('');
update();
}
function init() {
if (!settings.enabled) {
return;
}
$filter = $(template).appendTo('#toolbar');
$input = $filter.find('input');
$noMatch = $(noMatchTemplate).appendTo('#view');
$filter.on('click', 'img', toggle);
$input.on('keyup', update);
event.sub('location.changed', reset);
}
init();
});

View File

@@ -1,48 +0,0 @@
modulejs.define('ext/google-analytics-ua', ['_', 'core/settings', 'core/event'], function (_, allsettings, event) {
var settings = _.extend({
enabled: false,
id: 'UA-000000-0'
}, allsettings['google-analytics-ua']);
var win = window;
var doc = document;
var scriptLiteral = 'script';
var id = 'h5ai-ga';
function init() {
if (!settings.enabled) {
return;
}
var el, firstScriptElement;
win.GoogleAnalyticsObject = id;
win[id] = win[id] || function () {
(win[id].q = win[id].q || []).push(arguments);
};
win[id].l = 1 * new Date();
el = doc.createElement(scriptLiteral);
el.async = true;
el.src = '//www.google-analytics.com/analytics.js';
firstScriptElement = doc.getElementsByTagName(scriptLiteral)[0];
firstScriptElement.parentNode.insertBefore(el, firstScriptElement);
win[id]('create', settings.id, 'auto');
event.sub('location.changed', function (item) {
var loc = win.location;
win[id]('send', 'pageview', {
location: loc.protocol + '//' + loc.host + item.absHref,
title: _.pluck(item.getCrumb(), 'label').join(' > ')
});
});
}
init();
});

View File

@@ -1,158 +0,0 @@
modulejs.define('ext/info', ['_', '$', 'modernizr', 'core/settings', 'core/resource', 'core/store', 'core/event', 'core/format'], function (_, $, modernizr, allsettings, resource, store, event, format) {
var settings = _.extend({
enabled: false,
show: false,
qrcode: true,
qrColor: "#999"
}, allsettings.info);
var template =
'<div id="info">' +
'<div class="icon"><img/></div>' +
'<div class="block">' +
'<div class="label"/>' +
'<div class="time"/>' +
'<div class="size"/>' +
'<div class="content">' +
'<span class="folders"/> <span class="l10n-folders"/>, ' +
'<span class="files"/> <span class="l10n-files"/>' +
'</div>' +
'</div>' +
'<div class="qrcode"/>' +
'</div>';
var settingsTemplate =
'<div class="block">' +
'<h1 class="l10n-info">Info</h1>' +
'<div id="view-info" class="button view">' +
'<img src="' + resource.image('info-toggle') + '" alt="view-info"/>' +
'</div>' +
'</div>';
var sepTemplate = '<span class="sep"/>';
var storekey = 'ext/info';
var $img, $label, $time, $size, $content, $folders, $files, $qrcode;
var currentFolder;
// <span class="l10n-folders"/>
// <span class="l10n-files"/>
function updateSettings() {
if (store.get(storekey)) {
$('#view-info').addClass('active');
$('#info').show();
} else {
$('#view-info').removeClass('active');
$('#info').hide();
}
}
function update(item) {
var src = item.thumbRational || item.icon;
var isThumb = !!item.thumbRational;
if (item.isCurrentFolder() || !src) {
src = resource.icon('folder');
}
$img.attr('src', src);
if (isThumb) {
$img.addClass('thumb');
} else {
$img.removeClass('thumb');
}
$label.text(item.label);
if (_.isNumber(item.time)) {
$time.text(format.formatDate(item.time));
} else {
$time.text('.');
}
if (_.isNumber(item.size)) {
$size.text(format.formatSize(item.size));
$size.show();
} else {
$size.hide();
}
if (item.isContentFetched) {
var stats = item.getStats();
$folders.text(stats.folders);
$files.text(stats.files);
$content.show();
} else {
$content.hide();
}
if (settings.qrcode) {
$qrcode.empty().qrcode({
render: modernizr.canvas ? 'canvas' : 'div',
size: 200,
fill: settings.qrColor,
background: null,
text: window.location.protocol + '//' + window.location.host + item.absHref
});
}
}
function onMouseenter(item) {
update(item);
}
function onMouseleave(item) {
update(currentFolder);
}
function onLocationChanged(item) {
currentFolder = item;
update(currentFolder);
}
function init() {
if (!settings.enabled) {
return;
}
var $info = $(template).appendTo('#main-row');
$img = $info.find('.icon img');
$label = $info.find('.label');
$time = $info.find('.time');
$size = $info.find('.size');
$content = $info.find('.content');
$folders = $info.find('.folders');
$files = $info.find('.files');
$qrcode = $info.find('.qrcode');
if (!settings.qrcode) {
$qrcode.remove();
}
$(settingsTemplate)
.appendTo('#settings')
.find('#view-info')
.on('click', function (ev) {
store.put(storekey, !store.get(storekey));
updateSettings();
ev.preventDefault();
});
// ensure stored value is boolean, otherwise set default
if (typeof(store.get(storekey)) !== 'boolean') {
store.put(storekey, settings.show);
}
updateSettings();
event.sub('location.changed', onLocationChanged);
event.sub('item.mouseenter', onMouseenter);
event.sub('item.mouseleave', onMouseleave);
}
init();
});

View File

@@ -1,139 +0,0 @@
modulejs.define('ext/l10n', ['_', '$', 'core/settings', 'core/langs', 'core/format', 'core/store', 'core/event', 'core/server'], function (_, $, allsettings, langs, format, store, event, server) {
var settings = _.extend({
enabled: false,
lang: 'en',
useBrowserLang: true
}, allsettings.l10n);
var defaultTranslations = {
isoCode: 'en',
lang: 'english',
details: 'details',
grid: 'grid',
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',
view: 'View',
language: 'Language'
};
var blockTemplate = '<div class="block"><h1 class="l10n-language">Language</h1><div class="select"><select id="langs"/></div></div>';
var optionTemplate = '<option/>';
var storekey = 'ext/l10n';
var loaded = {
en: _.extend({}, defaultTranslations)
};
var currentLang = loaded.en;
function update(lang) {
if (lang) {
currentLang = lang;
}
$('#langs option')
.removeAttr('selected').removeProp('selected')
.filter('.' + currentLang.isoCode)
.attr('selected', 'selected').prop('selected', 'selected');
$.each(currentLang, function (key, value) {
$('.l10n-' + key).text(value);
});
format.setDefaultDateFormat(currentLang.dateFormat);
$('#items .item .date').each(function () {
var $this = $(this);
$this.text(format.formatDate($this.data('time')));
});
$('#filter input').attr('placeholder', currentLang.filter);
}
function loadLanguage(isoCode, callback) {
if (loaded[isoCode]) {
callback(loaded[isoCode]);
} else {
server.request({action: 'get', l10n: true, l10nCodes: isoCode}, function (response) {
var json = response.l10n && response.l10n[isoCode] ? response.l10n[isoCode] : {};
loaded[isoCode] = _.extend({}, defaultTranslations, json, {isoCode: isoCode});
callback(loaded[isoCode]);
});
}
}
function localize(langs, isoCode, useBrowserLang) {
var storedIsoCode = store.get(storekey);
if (langs[storedIsoCode]) {
isoCode = storedIsoCode;
} else if (useBrowserLang) {
var browserLang = navigator.language || navigator.browserLanguage;
if (browserLang) {
if (langs[browserLang]) {
isoCode = browserLang;
} else if (browserLang.length > 2 && langs[browserLang.substr(0, 2)]) {
isoCode = browserLang.substr(0, 2);
}
}
}
if (!langs[isoCode]) {
isoCode = 'en';
}
loadLanguage(isoCode, update);
}
function initLangSelector(langs) {
var isoCodes = _.keys(langs).sort();
var $block = $(blockTemplate);
var $select = $block.find('select')
.on('change', function (event) {
var isoCode = event.target.value;
store.put(storekey, isoCode);
localize(langs, isoCode, false);
});
$.each(isoCodes, function (idx, isoCode) {
$(optionTemplate)
.attr('value', isoCode)
.addClass(isoCode)
.text(isoCode + ' - ' + (_.isString(langs[isoCode]) ? langs[isoCode] : langs[isoCode].lang))
.appendTo($select);
});
$block.appendTo('#settings');
}
function init() {
if (settings.enabled) {
initLangSelector(langs);
}
event.sub('location.changed', function () {
localize(langs, settings.lang, settings.useBrowserLang);
});
}
init();
});

View File

@@ -1,41 +0,0 @@
modulejs.define('ext/peer5', ['_', '$', 'core/settings'], function (_, $, allsettings) {
var settings = _.extend({
enabled: false,
id: 'z142i5n5qypq4cxr'
}, allsettings.peer5);
function init() {
if (!settings.enabled) {
return;
}
var peer5js = '//api.peer5.com/peer5.js?id=' + settings.id;
// load peer5 with caching
$.ajax({
url: peer5js,
dataType: 'script',
cache:true
});
// attach to file items, once the DOM is ready
$(function() {
$('body').on('click', '.item.file > a', function (e) {
if (window.peer5) {
e.preventDefault();
var url = e.currentTarget.href;
window.peer5.download(url);
return false;
}
});
});
}
init();
});

View File

@@ -1,32 +0,0 @@
modulejs.define('ext/piwik-analytics', ['_', '$', 'core/settings'], function (_, $, allsettings) {
var settings = _.extend({
enabled: false,
baseURL: 'not-set',
idSite: 0
}, allsettings['piwik-analytics']);
function init() {
if (!settings.enabled) {
return;
}
// reference: http://piwik.org/docs/javascript-tracking/
var pkBaseURL = (("https:" === document.location.protocol) ? "https://" : "http://") + settings.baseURL + '/';
$('<script/>').attr('src', pkBaseURL + 'piwik.js').appendTo('body');
$(window).load(function () {
/*global Piwik */
var piwikTracker = Piwik.getTracker(pkBaseURL + 'piwik.php', settings.idSite);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
});
}
init();
});

View File

@@ -1,123 +0,0 @@
modulejs.define('ext/preview-audio', ['_', '$', 'moment', 'core/settings', 'core/event', 'ext/preview'], function (_, $, moment, allsettings, event, preview) {
var settings = _.extend({
enabled: false,
types: []
}, allsettings['preview-aud']);
function preloadAudio(src, callback) {
var $audio = $('<audio/>')
.one('loadedmetadata', function () {
callback($audio);
// setTimeout(function () { callback($img); }, 1000); // for testing
})
.attr('autoplay', 'autoplay')
.attr('controls', 'controls')
.attr('src', src);
}
function onEnter(items, idx) {
var currentItems = items;
var currentIdx = idx;
var currentItem = items[idx];
function onAdjustSize() {
var $content = $('#pv-content');
var $audio = $('#pv-aud-audio');
if ($audio.length) {
$audio.css({
'left': '' + (($content.width()-$audio.width())*0.5) + 'px',
'top': '' + (($content.height()-$audio.height())*0.5) + 'px'
});
preview.setLabels([
currentItem.label,
moment(0).add('seconds', $audio[0].duration).format('m:ss')
]);
}
}
function onIdxChange(rel) {
currentIdx = (currentIdx + rel + currentItems.length) % currentItems.length;
currentItem = currentItems[currentIdx];
var spinnerTimeout = setTimeout(function () { preview.showSpinner(true); }, 200);
if ($('#pv-aud-audio').length) {
$('#pv-aud-audio')[0].pause();
}
preloadAudio(currentItem.absHref, function ($preloaded_audio) {
clearTimeout(spinnerTimeout);
preview.showSpinner(false);
$('#pv-content').fadeOut(100, function () {
$('#pv-content').empty().append($preloaded_audio.attr('id', 'pv-aud-audio')).fadeIn(200);
// small timeout, so $preloaded_audio is visible and therefore $preloaded_audio.width is available
setTimeout(function () {
onAdjustSize();
preview.setIndex(currentIdx + 1, currentItems.length);
preview.setRawLink(currentItem.absHref);
}, 10);
});
});
}
onIdxChange(0);
preview.setOnIndexChange(onIdxChange);
preview.setOnAdjustSize(onAdjustSize);
preview.enter();
}
function initItem(item) {
if (item.$view && _.indexOf(settings.types, item.type) >= 0) {
item.$view.find('a').on('click', function (event) {
event.preventDefault();
var matchedEntries = _.compact(_.map($('#items .item'), function (item) {
item = $(item).data('item');
return _.indexOf(settings.types, item.type) >= 0 ? item : null;
}));
onEnter(matchedEntries, _.indexOf(matchedEntries, item));
});
}
}
function onLocationChanged(item) {
_.each(item.content, initItem);
}
function onLocationRefreshed(item, added, removed) {
_.each(added, initItem);
}
function init() {
if (!settings.enabled) {
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
}
init();
});

View File

@@ -1,172 +0,0 @@
modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/event', 'core/server', 'ext/preview'], function (_, $, allsettings, event, server, preview) {
var settings = _.extend({
enabled: false,
size: null,
types: []
}, allsettings['preview-img']);
var templateLoading = '<img id="pv-img-image" class="loading"/>';
var spinnerThreshold = 200;
var currentItems, currentIdx, currentItem;
function requestSample(href, callback) {
if (!settings.size) {
callback(href);
return;
}
server.request({
action: 'getThumbHref',
type: 'img',
href: href,
width: settings.size,
height: 0
}, function (json) {
callback(json && json.code === 0 ? json.absHref : null);
});
}
function showSpinner(item) {
var timeoutId;
function start() {
$('#pv-content')
.empty()
.append($(templateLoading).attr('src', item.thumbSquare))
.show();
onAdjustSize();
preview.setLabels([item.label]);
preview.showSpinner(true);
}
function stop() {
clearTimeout(timeoutId);
preview.showSpinner(false);
}
timeoutId = setTimeout(start, spinnerThreshold);
return stop;
}
function preloadImg(item, callback) {
var hide = showSpinner(item);
requestSample(item.absHref, function (src) {
$('<img/>')
.one('load', function (ev) {
hide();
callback(item, ev.target);
// for testing
// setTimeout(function () { hide(); callback(item, ev.target); }, 1000);
})
.attr('src', src);
});
}
function onAdjustSize() {
var $content = $('#pv-content');
var $img = $('#pv-img-image');
if ($img.length === 0) {
return;
}
$img.css({
left: ($content.width() - $img.width()) * 0.5,
top: ($content.height() - $img.height()) * 0.5
});
var labels = [currentItem.label];
if (!settings.size) {
labels.push('' + $img[0].naturalWidth + 'x' + $img[0].naturalHeight);
labels.push('' + (100 * $img.width() / $img[0].naturalWidth).toFixed(0) + '%');
}
preview.setLabels(labels);
}
function onIdxChange(rel) {
currentIdx = (currentIdx + rel + currentItems.length) % currentItems.length;
currentItem = currentItems[currentIdx];
preview.setIndex(currentIdx + 1, currentItems.length);
preview.setRawLink(currentItem.absHref);
preloadImg(currentItem, function (item, preloaded_img) {
if (item !== currentItem) {
return;
}
$('#pv-content')
.empty()
.append($(preloaded_img).attr('id', 'pv-img-image'))
.show();
onAdjustSize();
});
}
function onEnter(items, idx) {
currentItems = items;
currentIdx = idx;
onIdxChange(0);
preview.setOnIndexChange(onIdxChange);
preview.setOnAdjustSize(onAdjustSize);
preview.enter();
}
function initItem(item) {
if (item.$view && _.indexOf(settings.types, item.type) >= 0) {
item.$view.find('a').on('click', function (ev) {
ev.preventDefault();
var matchedEntries = _.compact(_.map($('#items .item'), function (item) {
item = $(item).data('item');
return _.indexOf(settings.types, item.type) >= 0 ? item : null;
}));
onEnter(matchedEntries, _.indexOf(matchedEntries, item));
});
}
}
function onLocationChanged(item) {
_.each(item.content, initItem);
}
function onLocationRefreshed(item, added, removed) {
_.each(added, initItem);
}
function init() {
if (!settings.enabled) {
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
}
init();
});

View File

@@ -1,138 +0,0 @@
modulejs.define('ext/preview-txt', ['_', '$', 'marked', 'prism', 'core/settings', 'core/event', 'ext/preview'], function (_, $, marked, prism, allsettings, event, preview) {
var settings = _.extend({
enabled: false,
types: {}
}, allsettings['preview-txt']);
var templateText = '<pre id="pv-txt-text" class="highlighted"/>';
var templateMarkdown = '<div id="pv-txt-text" class="markdown"/>';
function preloadText(absHref, callback) {
$.ajax({
url: absHref,
dataType: 'text'
})
.done(function (content) {
callback(content);
// setTimeout(function () { callback(content); }, 1000); // for testing
})
.fail(function (jqXHR, textStatus, errorThrown) {
callback('[ajax error] ' + textStatus);
});
}
function onEnter(items, idx) {
var currentItems = items;
var currentIdx = idx;
var currentItem = items[idx];
function onAdjustSize() {
var $content = $('#pv-content');
var $text = $('#pv-txt-text');
if ($text.length) {
$text.height($content.height() - 16);
}
}
function onIdxChange(rel) {
currentIdx = (currentIdx + rel + currentItems.length) % currentItems.length;
currentItem = currentItems[currentIdx];
var spinnerTimeout = setTimeout(function () { preview.showSpinner(true); }, 200);
preloadText(currentItem.absHref, function (textContent) {
clearTimeout(spinnerTimeout);
preview.showSpinner(false);
$('#pv-content').fadeOut(100, function () {
var type = settings.types[currentItem.type];
var $text, $code;
if (type === 'none') {
$text = $(templateMarkdown).text(textContent);
} else if (type === 'fixed') {
$text = $(templateText).text(textContent);
} else if (type === 'markdown') {
$text = $(templateMarkdown).html(marked(textContent));
} else {
$text = $(templateText);
$code = $('<code/>').appendTo($text);
if (textContent.length < 20000) {
$code.empty().html(prism.highlight(textContent, prism.languages[type]));
} else {
$code.empty().text(textContent);
setTimeout(function () { $code.empty().html(prism.highlight(textContent, prism.languages[type])); }, 300);
}
}
$('#pv-content').empty().append($text).fadeIn(200);
onAdjustSize();
preview.setIndex(currentIdx + 1, currentItems.length);
preview.setLabels([
currentItem.label,
'' + currentItem.size + ' bytes'
]);
preview.setRawLink(currentItem.absHref);
});
});
}
onIdxChange(0);
preview.setOnIndexChange(onIdxChange);
preview.setOnAdjustSize(onAdjustSize);
preview.enter();
}
function initItem(item) {
if (item.$view && _.indexOf(_.keys(settings.types), item.type) >= 0) {
item.$view.find('a').on('click', function (event) {
event.preventDefault();
var matchedEntries = _.compact(_.map($('#items .item'), function (item) {
item = $(item).data('item');
return _.indexOf(_.keys(settings.types), item.type) >= 0 ? item : null;
}));
onEnter(matchedEntries, _.indexOf(matchedEntries, item));
});
}
}
function onLocationChanged(item) {
_.each(item.content, initItem);
}
function onLocationRefreshed(item, added, removed) {
_.each(added, initItem);
}
function init() {
if (!settings.enabled) {
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
}
init();
});

View File

@@ -1,124 +0,0 @@
modulejs.define('ext/preview-vid', ['_', '$', 'core/settings', 'core/event', 'ext/preview'], function (_, $, allsettings, event, preview) {
var settings = _.extend({
enabled: false,
types: []
}, allsettings['preview-vid']);
function preloadVid(src, callback) {
var $video = $('<video/>')
.one('loadedmetadata', function () {
callback($video);
// setTimeout(function () { callback($video); }, 1000); // for testing
})
.attr('autoplay', 'autoplay')
.attr('controls', 'controls')
.attr('src', src);
}
function onEnter(items, idx) {
var currentItems = items;
var currentIdx = idx;
var currentItem = items[idx];
function onAdjustSize() {
var $content = $('#pv-content'),
$vid = $('#pv-vid-video');
if ($vid.length) {
$vid.css({
'left': '' + (($content.width()-$vid.width())*0.5) + 'px',
'top': '' + (($content.height()-$vid.height())*0.5) + 'px'
});
preview.setLabels([
currentItem.label,
'' + $vid[0].videoWidth + 'x' + $vid[0].videoHeight,
'' + (100 * $vid.width() / $vid[0].videoWidth).toFixed(0) + '%'
]);
}
}
function onIdxChange(rel) {
currentIdx = (currentIdx + rel + currentItems.length) % currentItems.length;
currentItem = currentItems[currentIdx];
var spinnerTimeout = setTimeout(function () { preview.showSpinner(true); }, 200);
if ($('#pv-vid-video').length) {
$('#pv-vid-video')[0].pause();
}
preloadVid(currentItem.absHref, function ($preloaded_vid) {
clearTimeout(spinnerTimeout);
preview.showSpinner(false);
$('#pv-content').fadeOut(100, function () {
$('#pv-content').empty().append($preloaded_vid.attr('id', 'pv-vid-video')).fadeIn(200);
// small timeout, so $preloaded_vid is visible and therefore $preloaded_vid.width is available
setTimeout(function () {
onAdjustSize();
preview.setIndex(currentIdx + 1, currentItems.length);
preview.setRawLink(currentItem.absHref);
}, 10);
});
});
}
onIdxChange(0);
preview.setOnIndexChange(onIdxChange);
preview.setOnAdjustSize(onAdjustSize);
preview.enter();
}
function initItem(item) {
if (item.$view && _.indexOf(settings.types, item.type) >= 0) {
item.$view.find('a').on('click', function (event) {
event.preventDefault();
var matchedEntries = _.compact(_.map($('#items .item'), function (item) {
item = $(item).data('item');
return _.indexOf(settings.types, item.type) >= 0 ? item : null;
}));
onEnter(matchedEntries, _.indexOf(matchedEntries, item));
});
}
}
function onLocationChanged(item) {
_.each(item.content, initItem);
}
function onLocationRefreshed(item, added, removed) {
_.each(added, initItem);
}
function init() {
if (!settings.enabled) {
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
}
init();
});

View File

@@ -1,241 +0,0 @@
modulejs.define('ext/preview', ['_', '$', 'core/settings', 'core/resource', 'core/store'], function (_, $, allsettings, resource, store) {
var settings = _.extend({
enabled: true
}, allsettings.preview);
var $window = $(window);
var template =
'<div id="pv-overlay">' +
'<div id="pv-content"/>' +
'<div id="pv-spinner"><img src="' + resource.image('spinner') + '"/></div>' +
'<div id="pv-prev-area" class="hof"><img src="' + resource.image('preview-prev') + '"/></div>' +
'<div id="pv-next-area" class="hof"><img src="' + resource.image('preview-next') + '"/></div>' +
'<div id="pv-bottombar" class="clearfix hof">' +
'<ul id="pv-buttons">' +
'<li id="pv-bar-close" class="bar-right bar-button"><img src="' + resource.image('preview-close') + '"/></li>' +
'<li id="pv-bar-raw" class="bar-right"><a class="bar-button" target="_blank"><img src="' + resource.image('preview-raw') + '"/></a></li>' +
'<li id="pv-bar-fullscreen" class="bar-right bar-button"><img src="' + resource.image('preview-fullscreen') + '"/></li>' +
'<li id="pv-bar-next" class="bar-right bar-button"><img src="' + resource.image('preview-next') + '"/></li>' +
'<li id="pv-bar-idx" class="bar-right bar-label"/>' +
'<li id="pv-bar-prev" class="bar-right bar-button"><img src="' + resource.image('preview-prev') + '"/></li>' +
'</ul>' +
'</div>' +
'</div>';
var storekey = 'ext/preview';
var currentEntries = [];
var currentIdx = 0;
var isFullscreen = store.get(storekey) || false;
var userAliveTimeoutId = null;
var onIndexChange = null;
var onAdjustSize = null;
function adjustSize() {
var winWidth = $window.width();
var winHeight = $window.height();
var $container = $('#pv-content');
var $spinner = $('#pv-spinner');
var margin = isFullscreen ? 0 : 20;
var barHeight = isFullscreen ? 0 : 48;
$container.css({
width: winWidth - 2 * margin,
height: winHeight - 2 * margin - barHeight,
left: margin,
top: margin
});
$spinner.css({
left: winWidth * 0.5,
top: winHeight * 0.5
});
if (isFullscreen) {
$('#pv-overlay').addClass('fullscreen');
$('#pv-bar-fullscreen').find('img').attr('src', resource.image('preview-no-fullscreen'));
} else {
$('#pv-overlay').removeClass('fullscreen');
$('#pv-bar-fullscreen').find('img').attr('src', resource.image('preview-fullscreen'));
}
if (_.isFunction(onAdjustSize)) {
onAdjustSize(1);
}
}
function onEnter() {
$('#pv-content').empty();
setLabels([]);
$('#pv-overlay').stop(true, true).fadeIn(200);
$window.on('keydown', onKeydown);
adjustSize();
}
function onExit() {
$window.off('keydown', onKeydown);
$('#pv-overlay').stop(true, true).fadeOut(200, function () {
$('#pv-content').empty();
setLabels([]);
});
}
function onNext() {
if (_.isFunction(onIndexChange)) {
onIndexChange(1);
}
}
function onPrevious() {
if (_.isFunction(onIndexChange)) {
onIndexChange(-1);
}
}
function userAlive() {
clearTimeout(userAliveTimeoutId);
$('#pv-overlay .hof').stop(true, true).fadeIn(200);
if (isFullscreen) {
userAliveTimeoutId = setTimeout(function () {
$('#pv-overlay .hof').stop(true, true).fadeOut(2000);
}, 2000);
}
}
function onFullscreen() {
isFullscreen = !isFullscreen;
store.put(storekey, isFullscreen);
userAlive();
adjustSize();
}
function onKeydown(ev) {
var key = ev.which;
if (key === 27) { // esc
ev.preventDefault();
ev.stopImmediatePropagation();
onExit();
} else if (key === 8 || key === 37) { // backspace, left
ev.preventDefault();
ev.stopImmediatePropagation();
onPrevious();
} else if (key === 13 || key === 32 || key === 39) { // enter, space, right
ev.preventDefault();
ev.stopImmediatePropagation();
onNext();
} else if (key === 70) { // f
ev.preventDefault();
ev.stopImmediatePropagation();
onFullscreen();
}
}
function setIndex(idx, total) {
if (_.isNumber(idx)) {
$('#pv-bar-idx').text('' + idx + (_.isNumber(total) ? '/' + total : '')).show();
} else {
$('#pv-bar-idx').text('').hide();
}
}
function setRawLink(href) {
if (href) {
$('#pv-bar-raw').find('a').attr('href', href).end().show();
} else {
$('#pv-bar-raw').find('a').attr('href', '#').end().hide();
}
}
function setLabels(labels) {
$('#pv-buttons .bar-left').remove();
_.each(labels, function (label) {
$('<li/>')
.addClass('bar-left bar-label')
.text(label)
.appendTo('#pv-buttons');
});
}
function setOnIndexChange(fn) {
onIndexChange = fn;
}
function setOnAdjustSize(fn) {
onAdjustSize = fn;
}
function showSpinner(show, millis) {
if (!_.isNumber(millis)) {
millis = 400;
}
if (show) {
$('#pv-spinner').stop(true, true).fadeIn(millis);
} else {
$('#pv-spinner').stop(true, true).fadeOut(millis);
}
}
function init() {
if (!settings.enabled) {
return;
}
$(template).appendTo('body');
$('#pv-spinner').hide();
$('#pv-bar-prev, #pv-prev-area').on('click', onPrevious);
$('#pv-bar-next, #pv-next-area').on('click', onNext);
$('#pv-bar-close, #pv-close-area').on('click', onExit);
$('#pv-bar-fullscreen').on('click', onFullscreen);
$('#pv-overlay')
.on('keydown', onKeydown)
.on('mousemove mousedown', userAlive)
.on('click mousedown mousemove keydown keypress', function (ev) {
if (ev.type === 'click') {
if (ev.target.id === 'pv-overlay' || ev.target.id === 'pv-content') {
onExit();
}
}
ev.stopImmediatePropagation();
});
$window.on('resize load', adjustSize);
}
init();
return {
enter: onEnter,
exit: onExit,
setIndex: setIndex,
setRawLink: setRawLink,
setLabels: setLabels,
setOnIndexChange: setOnIndexChange,
setOnAdjustSize: setOnAdjustSize,
showSpinner: showSpinner
};
});

View File

@@ -1,216 +0,0 @@
modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/resource', 'core/event'], function (_, $, allsettings, resource, event) {
var settings = _.extend({
enabled: false,
clickndrag: false,
checkboxes: false
}, allsettings.select);
var template = '<span class="selector"><img src="' + resource.image('selected') + '" alt="selected"/></span>';
var x = 0, y = 0;
var l = 0, t = 0, w = 0, h = 0;
var isDragSelect, isCtrlPressed;
var shrink = 1/3;
var $document = $(document);
var $html = $('html');
var $selectionRect = $('<div id="selection-rect"/>');
function publish() {
var items = _.map($('#items .item.selected'), function (itemElement) {
return $(itemElement).data('item');
});
event.pub('selection', items);
}
function elementRect($element) {
if (!$element.is(':visible')) {
return null;
}
var offset = $element.offset();
var l = offset.left;
var t = offset.top;
var w = $element.outerWidth();
var h = $element.outerHeight();
return {l: l, t: t, w: w, h: h, r: l + w, b: t + h};
}
function doOverlap(rect1, rect2) {
if (!rect1 || !rect2) {
return false;
}
var left = Math.max(rect1.l, rect2.l);
var right = Math.min(rect1.r, rect2.r);
var top = Math.max(rect1.t, rect2.t);
var bottom = Math.min(rect1.b, rect2.b);
var width = right - left;
var height = bottom - top;
return (width >= 0 && height >= 0);
}
function selectionUpdate(ev) {
l = Math.min(x, ev.pageX);
t = Math.min(y, ev.pageY);
w = Math.abs(x - ev.pageX);
h = Math.abs(y - ev.pageY);
if (!isDragSelect && w < 4 && h < 4) {
return;
}
if (!isDragSelect && !isCtrlPressed) {
$('#items .item').removeClass('selected');
publish();
}
isDragSelect = true;
$html.addClass('drag-select');
ev.preventDefault();
$selectionRect
.stop(true, true)
.css({left: l, top: t, width: w, height: h, opacity: 1})
.show();
var selRect = elementRect($selectionRect);
$('#items .item').removeClass('selecting').each(function () {
var $item = $(this);
var inter = doOverlap(selRect, elementRect($item.find('a')));
if (inter && !$item.hasClass('folder-parent')) {
$item.addClass('selecting');
}
});
}
function selectionEnd(ev) {
$document.off('mousemove', selectionUpdate);
if (!isDragSelect) {
return;
}
ev.preventDefault();
$('#items .item.selecting.selected').removeClass('selecting').removeClass('selected');
$('#items .item.selecting').removeClass('selecting').addClass('selected');
publish();
$html.removeClass('drag-select');
$selectionRect
.stop(true, true)
.animate(
{
left: l + w * 0.5 * shrink,
top: t + h * 0.5 * shrink,
width: w * (1 - shrink),
height: h * (1 - shrink),
opacity: 0
},
300,
function () {
$selectionRect.hide();
}
);
}
function selectionStart(ev) {
// only on left button and don't block scrollbar
if (ev.button !== 0 || ev.offsetX >= $('#content').width() - 14) {
return;
}
isDragSelect = false;
isCtrlPressed = ev.ctrlKey || ev.metaKey;
x = ev.pageX;
y = ev.pageY;
$document
.on('mousemove', selectionUpdate)
.one('mouseup', selectionEnd);
}
function initItem(item) {
if (item.$view) {
$(template)
.appendTo(item.$view.find('a'))
.on('click', function (ev) {
ev.stopImmediatePropagation();
ev.preventDefault();
item.$view.toggleClass('selected');
publish();
});
}
}
function onLocationChanged(item) {
if (settings.checkboxes) {
_.each(item.content, initItem);
}
publish();
}
function onLocationRefreshed(item, added, removed) {
var selectionChanged = false;
if (settings.checkboxes) {
_.each(added, initItem);
}
_.each(removed, function (item) {
if (item.$view && item.$view.hasClass('selected')) {
item.$view.removeClass('selected');
selectionChanged = true;
}
});
if (selectionChanged) {
publish();
}
}
function init() {
if (!settings.enabled || (!settings.clickndrag && !settings.checkboxes)) {
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
if (settings.clickndrag) {
$selectionRect.hide().appendTo('body');
$('#content')
.on('mousedown', selectionStart)
.on('drag dragstart', function (ev) {
ev.stopImmediatePropagation();
ev.preventDefault();
})
.on('click', function (ev) {
$('#items .item').removeClass('selected');
publish();
});
}
}
init();
});

View File

@@ -1,158 +0,0 @@
modulejs.define('ext/sort', ['_', '$', 'core/settings', 'core/resource', 'core/event', 'core/store', 'core/util'], function (_, $, allsettings, resource, event, store, util) {
var settings = _.extend({
enabled: false,
column: 0,
reverse: false,
ignorecase: true,
natural: false,
folders: 0
}, allsettings.sort);
var storekey = 'ext/sort';
var template = '<img src="' + resource.image('sort') + '" class="sort" alt="sort order" />';
function getType(item) {
var $item = $(item);
if ($item.hasClass('folder-parent')) {
return 0;
}
if ($item.hasClass('folder')) {
if (settings.folders === 1) {
return 2;
} else if (settings.folders === 2) {
return 3;
}
return 1;
}
return 2;
}
function getName(item) {
return $(item).find('.label').text();
}
function getTime(item) {
return $(item).find('.date').data('time');
}
function getSize(item) {
return $(item).find('.size').data('bytes');
}
var columnGetters = {
0: getName,
1: getTime,
2: getSize
};
var columnClasses = {
0: 'label',
1: 'date',
2: 'size'
};
function cmpFn(getValue, reverse, ignorecase, natural) {
return function (item1, item2) {
var res, val1, val2;
res = getType(item1) - getType(item2);
if (res !== 0) {
return res;
}
val1 = getValue(item1);
val2 = getValue(item2);
if (isNaN(val1) || isNaN(val2)) {
val1 = '' + val1;
val2 = '' + val2;
if (ignorecase) {
val1 = val1.toLowerCase();
val2 = val2.toLowerCase();
}
}
res = natural ? util.naturalCmpFn(val1, val2) : util.regularCmpFn(val1, val2);
return reverse ? -res : res;
};
}
function sortItems(column, reverse) {
var headers = $('#items li.header a');
var header = $('#items li.header a.' + columnClasses[column]);
var fn = cmpFn(columnGetters[column], reverse, settings.ignorecase, column === 0 && settings.natural);
var current = $('#items .item');
var sorted = $('#items .item').sort(fn);
store.put(storekey, {column: column, reverse: reverse});
headers.removeClass('ascending descending');
header.addClass(reverse ? 'descending' : 'ascending');
for (var i = 0, l = current.length; i < l; i += 1) {
if (current[i] !== sorted[i]) {
sorted.detach().sort(fn).appendTo('#items');
break;
}
}
}
function onContentChanged(item) {
var order = store.get(storekey);
var column = order && order.column || settings.column;
var reverse = order && order.reverse || settings.reverse;
sortItems(column, reverse);
}
function init() {
if (!settings.enabled) {
return;
}
$('#items li.header')
.find('a.label')
.append(template)
.click(function (ev) {
sortItems(0, $(this).hasClass('ascending'));
ev.preventDefault();
})
.end()
.find('a.date')
.prepend(template)
.click(function (ev) {
sortItems(1, $(this).hasClass('ascending'));
ev.preventDefault();
})
.end()
.find('a.size')
.prepend(template)
.click(function (ev) {
sortItems(2, $(this).hasClass('ascending'));
ev.preventDefault();
})
.end();
event.sub('location.changed', onContentChanged);
event.sub('location.refreshed', onContentChanged);
}
init();
});

View File

@@ -1,91 +0,0 @@
modulejs.define('ext/thumbnails', ['_', 'core/settings', 'core/event', 'core/server', 'core/resource'], function (_, allsettings, event, server, resource) {
var settings = _.extend({
enabled: false,
img: ['img-bmp', 'img-gif', 'img-ico', 'img-jpg', 'img-png'],
mov: ['vid-avi', 'vid-flv', 'vid-mkv', 'vid-mov', 'vid-mp4', 'vid-mpg', 'vid-webm'],
doc: ['x-pdf', 'x-ps'],
delay: 1,
size: 100,
exif: true
}, allsettings.thumbnails);
function requestThumb(type, href, ratio, callback) {
server.request({
action: 'getThumbHref',
type: type,
href: href,
width: Math.round(settings.size * ratio),
height: settings.size
}, function (json) {
callback(json && json.code === 0 ? json.absHref : null);
});
}
function checkItem(item) {
var type = null;
if (_.contains(settings.img, item.type)) {
type = 'img';
} else if (_.contains(settings.mov, item.type)) {
type = 'mov';
} else if (_.contains(settings.doc, item.type)) {
type = 'doc';
}
if (type) {
if (item.thumbSquare) {
item.$view.find('.icon.square img').addClass('thumb').attr('src', item.thumbSquare);
} else {
requestThumb(type, item.absHref, 1, function (src) {
if (src && item.$view) {
item.thumbSquare = src;
item.$view.find('.icon.square img').addClass('thumb').attr('src', src);
}
});
}
if (item.thumbRational) {
item.$view.find('.icon.landscape img').addClass('thumb').attr('src', item.thumbRational);
} else {
requestThumb(type, item.absHref, 4/3, function (src) {
if (src && item.$view) {
item.thumbRational = src;
item.$view.find('.icon.landscape img').addClass('thumb').attr('src', src);
}
});
}
}
}
function onLocationChanged(item) {
setTimeout(function () {
_.each(item.content, checkItem);
}, settings.delay);
}
function onLocationRefreshed(item, added, removed) {
_.each(added, checkItem);
}
function init() {
if (!settings.enabled || !server.api) {
return;
}
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
}
init();
});

View File

@@ -1,29 +0,0 @@
modulejs.define('ext/title', ['_', 'core/settings', 'core/event'], function (_, allsettings, event) {
var settings = _.extend({
enabled: false
}, allsettings.title);
function onLocationChanged(item) {
var labels = _.pluck(item.getCrumb(), 'label'),
title = labels.join(' > ');
if (labels.length > 1) {
title = labels[labels.length - 1] + ' - ' + title;
}
document.title = title;
}
function init() {
if (!settings.enabled) {
return;
}
event.sub('location.changed', onLocationChanged);
}
init();
});

View File

@@ -1,218 +0,0 @@
modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/event', 'core/location', 'core/util'], function (_, $, allsettings, resource, store, event, location, util) {
var settings = _.extend({
enabled: false,
show: true,
maxSubfolders: 50,
naturalSort: false
}, allsettings.tree);
var template =
'<div class="item">' +
'<span class="indicator none">' +
'<img src="' + resource.image('tree-indicator') + '"/>' +
'</span>' +
'<a>' +
'<span class="icon"><img/></span>' +
'<span class="label"/>' +
'</a>' +
'</span>';
var settingsTemplate =
'<div class="block">' +
'<h1 class="l10n-tree">Tree</h1>' +
'<div id="view-tree" class="button view">' +
'<img src="' + resource.image('tree-toggle') + '" alt="view-tree"/>' +
'</div>' +
'</div>';
var storekey = 'ext/tree';
function cmpFn(item1, item2) {
var val1 = item1.label;
var val2 = item2.label;
return settings.natural ? util.naturalCmpFn(val1, val2) : util.regularCmpFn(val1, val2);
}
function update(item) {
var $html = $(template);
var $indicator = $html.find('.indicator');
var $a = $html.find('a');
var $img = $html.find('.icon img');
var $label = $html.find('.label');
$html
.addClass(item.isFolder() ? 'folder' : 'file')
.data('item', item);
location.setLink($a, item);
$img.attr('src', resource.icon('folder'));
$label.text(item.label);
if (item.isFolder()) {
var subfolders = item.getSubfolders();
// indicator
if ((item.isManaged && !item.isContentFetched) || subfolders.length) {
$indicator.removeClass('none');
if ((item.isManaged && !item.isContentFetched)) {
$indicator.addClass('unknown');
} else if (item.isContentVisible) {
$indicator.addClass('open');
} else {
$indicator.addClass('close');
}
}
// is it the current folder?
if (item.isCurrentFolder()) {
$html.addClass('active');
}
// does it have subfolders?
if (subfolders.length) {
subfolders.sort(cmpFn);
var $ul = $('<ul class="content"/>').appendTo($html);
var counter = 0;
_.each(subfolders, function (e) {
counter += 1;
if (counter <= settings.maxSubfolders) {
$('<li/>').append(update(e)).appendTo($ul);
}
});
if (subfolders.length > settings.maxSubfolders) {
$('<li class="summary">… ' + (subfolders.length - settings.maxSubfolders) + ' more subfolders</li>').appendTo($ul);
}
if (!item.isContentVisible) {
$ul.hide();
}
}
// reflect folder status
if (!item.isManaged) {
$img.attr('src', resource.icon('folder-page'));
}
}
if (item.$tree) {
item.$tree.replaceWith($html);
}
item.$tree = $html;
return $html;
}
function createOnIndicatorClick() {
var $tree = $('#tree');
function slide(item, $indicator, $content, down) {
item.isContentVisible = down;
$indicator.removeClass('open close').addClass(down ? 'open' : 'close');
$content[down ? 'slideDown' : 'slideUp']();
}
return function () {
var $indicator = $(this);
var $item = $indicator.closest('.item');
var item = $item.data('item');
var $content = $item.find('> ul.content');
if ($indicator.hasClass('unknown')) {
item.fetchContent(function (item) {
item.isContentVisible = false;
var $item = update(item);
var $indicator = $item.find('> .indicator');
var $content = $item.find('> ul.content');
if (!$indicator.hasClass('none')) {
slide(item, $indicator, $content, true);
}
});
} else if ($indicator.hasClass('open')) {
slide(item, $indicator, $content, false);
} else if ($indicator.hasClass('close')) {
slide(item, $indicator, $content, true);
}
};
}
function fetchTree(item, callback) {
item.isContentVisible = true;
item.fetchContent(function (item) {
if (item.parent) {
fetchTree(item.parent, callback);
} else {
callback(item);
}
});
}
function updateSettings() {
if (store.get(storekey)) {
$('#view-tree').addClass('active');
$('#tree').show();
} else {
$('#view-tree').removeClass('active');
$('#tree').hide();
}
}
function onLocationChanged(item) {
fetchTree(item, function (root) {
$('#tree').append(update(root));
updateSettings();
});
}
function init() {
if (!settings.enabled) {
return;
}
$('<div id="tree"/>')
.appendTo('#main-row')
.on('click', '.indicator', createOnIndicatorClick());
$(settingsTemplate)
.appendTo('#settings')
.find('#view-tree')
.on('click', function (ev) {
store.put(storekey, !store.get(storekey));
updateSettings();
ev.preventDefault();
});
// ensure stored value is boolean, otherwise set default
if (typeof(store.get(storekey)) !== 'boolean') {
store.put(storekey, settings.show);
}
updateSettings();
event.sub('location.changed', onLocationChanged);
}
init();
});

View File

@@ -1,179 +0,0 @@
modulejs.define('info', ['$', 'config'], function ($, config) {
var testsTemp =
'<ul id="tests">';
var testTemp =
'<li class="test">' +
'<span class="label"></span>' +
'<span class="result"></span>' +
'<div class="info"></div>' +
'</li>';
var loginTemp =
'<div id="login-wrapper">' +
'<input id="pass" type="password" placeholder="password"/>' +
'<span id="login">login</span>' +
'<span id="logout">logout</span>' +
'<div id="hint">' +
'The preset password is the empty string, so just hit login. ' +
'You might change it in the index file to keep this information private.' +
'</div>' +
'</div>';
var setup = config.setup;
function addTest(label, info, passed, result) {
$(testTemp)
.find('.label')
.text(label)
.end()
.find('.result')
.addClass(passed ? 'passed' : 'failed')
.text(result ? result : (passed ? 'yes' : 'no'))
.end()
.find('.info')
.html(info)
.end()
.appendTo('#tests');
}
function addTests() {
$(testsTemp).appendTo('#content');
addTest(
'h5ai version', 'Only green if this is an official h5ai release',
setup.VERSION.indexOf('+') < 0, setup.VERSION
);
addTest(
'Index file found', 'Add <code>' + setup.INDEX_HREF + '</code> to your index file list',
setup.INDEX_HREF
);
addTest(
'Options parsable', 'File <code>options.json</code> is readable and syntax is correct',
config.options !== null
);
addTest(
'Types parsable', 'File <code>types.json</code> is readable and syntax is correct',
config.types !== null
);
addTest(
'Server software', 'Server is one of apache, lighttpd, nginx or cherokee',
setup.HAS_SERVER, setup.SERVER_NAME + ' ' + setup.SERVER_VERSION
);
addTest(
'PHP version', 'PHP version &gt;= ' + setup.MIN_PHP_VERSION,
setup.HAS_PHP_VERSION, setup.PHP_VERSION
);
addTest(
'Cache directory', 'Web server has write access',
setup.HAS_WRITABLE_CACHE
);
addTest(
'Image thumbs', 'PHP GD extension with JPEG support available',
setup.HAS_PHP_JPG
);
addTest(
'Use EXIF thumbs', 'PHP EXIF extension available',
setup.HAS_PHP_EXIF
);
addTest(
'Movie thumbs', 'Command line program <code>avconv</code> or <code>ffmpeg</code> available',
setup.HAS_CMD_AVCONV || setup.HAS_CMD_FFMPEG
);
addTest(
'PDF thumbs', 'Command line program <code>convert</code> available',
setup.HAS_CMD_CONVERT
);
addTest(
'Shell tar', 'Command line program <code>tar</code> available',
setup.HAS_CMD_TAR
);
addTest(
'Shell zip', 'Command line program <code>zip</code> available',
setup.HAS_CMD_ZIP
);
addTest(
'Shell du', 'Command line program <code>du</code> available',
setup.HAS_CMD_DU
);
}
function request(data) {
$.ajax({
url: 'server/php/index.php',
type: 'POST',
dataType: 'JSON',
data: data
})
.always(function () {
window.location.reload();
});
}
function onLogin() {
request({
'action': 'login',
'pass': $('#pass').val()
});
}
function onLogout() {
request({
'action': 'logout'
});
}
function onKeydown(event) {
if (event.which === 13) {
onLogin();
}
}
function addLogin() {
$(loginTemp).appendTo('#content');
if (setup.AS_ADMIN) {
$('#pass').remove();
$('#login').remove();
$('#logout').on('click', onLogout);
} else {
$('#pass').on('keydown', onKeydown).focus();
$('#login').on('click', onLogin);
$('#logout').remove();
}
if (setup.HAS_CUSTOM_PASSHASH) {
$('#hint').remove();
}
}
function init() {
addLogin();
if (setup.AS_ADMIN) {
addTests();
}
}
init();
});

View File

@@ -1,16 +0,0 @@
modulejs.define('main', ['_', 'core/event'], function (_, event) {
modulejs.require('view/ensure');
modulejs.require('view/items');
modulejs.require('view/sidebar');
modulejs.require('view/viewmode');
_.each(modulejs.state(), function (state, id) {
if (id.indexOf('ext/') === 0) {
modulejs.require(id);
}
});
event.pub('ready');
});

View File

@@ -1,242 +0,0 @@
modulejs.define('model/item', ['_', 'core/types', 'core/event', 'core/settings', 'core/server', 'core/location'], function (_, types, event, settings, server, location) {
var reEndsWithSlash = /\/$/;
var reSplitPath = /^(.*\/)([^\/]+\/?)$/;
var cache = {};
function startsWith(sequence, part) {
return sequence.slice && part.length && sequence.slice(0, part.length) === part;
}
function createLabel(sequence) {
sequence = sequence.replace(reEndsWithSlash, '');
try { sequence = decodeURIComponent(sequence); } catch (e) {}
return sequence;
}
function splitPath(sequence) {
if (sequence === '/') {
return { parent: null, name: '/' };
}
var match = reSplitPath.exec(sequence);
if (match) {
var split = { parent: match[1], name: match[2] };
if (split.parent && !startsWith(split.parent, settings.rootHref)) {
split.parent = null;
}
return split;
}
}
function getItem(absHref, time, size, isManaged, isContentFetched, md5, sha1) {
absHref = location.forceEncoding(absHref);
if (!startsWith(absHref, settings.rootHref)) {
return null;
}
var self = cache[absHref] || new Item(absHref);
if (_.isNumber(time)) {
self.time = time;
}
if (_.isNumber(size)) {
self.size = size;
}
if (isManaged) {
self.isManaged = true;
}
if (isContentFetched) {
self.isContentFetched = true;
}
if (md5) {
self.md5 = md5;
}
if (sha1) {
self.sha1 = sha1;
}
return self;
}
function removeItem(absHref) {
absHref = location.forceEncoding(absHref);
var self = cache[absHref];
if (self) {
delete cache[absHref];
if (self.parent) {
delete self.parent.content[self.absHref];
}
_.each(self.content, function (item) {
removeItem(item.absHref);
});
}
}
function fetchContent(absHref, callback) {
var self = getItem(absHref);
if (!_.isFunction(callback)) {
callback = function () {};
}
if (self.isContentFetched) {
callback(self);
} else {
server.request({action: 'get', items: true, itemsHref: self.absHref, itemsWhat: 1}, function (response) {
if (response.items) {
_.each(response.items, function (item) {
getItem(item.absHref, item.time, item.size, item.is_managed, item.content, item.md5, item.sha1);
});
}
callback(self);
});
}
}
function Item(absHref) {
var split = splitPath(absHref);
cache[absHref] = this;
this.absHref = absHref;
this.type = types.getType(absHref);
this.label = createLabel(absHref === '/' ? location.getDomain() : split.name);
this.time = null;
this.size = null;
this.parent = null;
this.isManaged = null;
this.content = {};
if (split.parent) {
this.parent = getItem(split.parent);
this.parent.content[this.absHref] = this;
if (_.keys(this.parent.content).length > 1) {
this.parent.isContentFetched = true;
}
}
}
_.extend(Item.prototype, {
isFolder: function () {
return reEndsWithSlash.test(this.absHref);
},
isCurrentFolder: function () {
return this.absHref === location.getAbsHref();
},
isInCurrentFolder: function () {
return !!this.parent && this.parent.isCurrentFolder();
},
isCurrentParentFolder: function () {
return this === getItem(location.getAbsHref()).parent;
},
isDomain: function () {
return this.absHref === '/';
},
isRoot: function () {
return this.absHref === settings.rootHref;
},
isH5ai: function () {
return this.absHref === settings.appHref;
},
isEmpty: function () {
return _.keys(this.content).length === 0;
},
fetchContent: function (callback) {
return fetchContent(this.absHref, callback);
},
getCrumb: function () {
var item = this;
var crumb = [item];
while (item.parent) {
item = item.parent;
crumb.unshift(item);
}
return crumb;
},
getSubfolders: function () {
return _.sortBy(_.filter(this.content, function (item) {
return item.isFolder();
}), function (item) {
return item.label.toLowerCase();
});
},
getStats: function () {
var folders = 0;
var files = 0;
_.each(this.content, function (item) {
if (item.isFolder()) {
folders += 1;
} else {
files += 1;
}
});
var depth = 0;
var item = this;
while (item.parent) {
depth += 1;
item = item.parent;
}
return {
folders: folders,
files: files,
depth: depth
};
}
});
return {
get: getItem,
remove: removeItem
};
});

View File

@@ -1,31 +0,0 @@
modulejs.define('view/ensure', ['$', 'config', 'core/event'], function ($, config, event) {
var templateTopbar =
'<div id="topbar">' +
'<div id="toolbar"/>' +
'<div id="crumbbar"/>' +
'</div>';
var templateMainRow =
'<div id="main-row">' +
'<div id="sidebar">' +
'<div id="settings"/>' +
'</div>' +
'</div>';
var templateBacklink =
'<a id="backlink" href="http://larsjung.de/h5ai/" title="powered by h5ai ' + config.setup.VERSION + '">' +
'<div>powered</div>' +
'<div>by h5ai</div>' +
'</a>';
function init() {
$('#fallback, #fallback-hints').remove();
$(templateTopbar).appendTo('body');
$(templateMainRow).appendTo('body');
$(templateBacklink).appendTo('#topbar');
}
init();
});

View File

@@ -1,169 +0,0 @@
modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core/format', 'core/event', 'core/location'], function (_, $, allsettings, resource, format, event, location) {
var settings = _.extend({
binaryPrefix: false,
hideFolders: false,
hideParentFolder: false,
setParentFolderLabels: false
}, allsettings.view);
var itemTemplate =
'<li class="item">' +
'<a>' +
'<span class="icon square"><img/></span>' +
'<span class="icon landscape"><img/></span>' +
'<span class="label"/>' +
'<span class="date"/>' +
'<span class="size"/>' +
'</a>' +
'</li>';
var hintTemplate = '<span class="hint"/>';
var contentTemplate =
'<div id="content">' +
'<div id="view">' +
'<ul id="items" class="clearfix">' +
'<li class="header">' +
'<a class="icon"/>' +
'<a class="label" href="#"><span class="l10n-name"/></a>' +
'<a class="date" href="#"><span class="l10n-lastModified"/></a>' +
'<a class="size" href="#"><span class="l10n-size"/></a>' +
'</li>' +
'</ul>' +
'<div class="empty l10n-empty"/>' +
'</div>' +
'</div>';
function update(item, force) {
if (!force && item.$view) {
return item.$view;
}
var $html = $(itemTemplate);
var $a = $html.find('a');
var $iconImg = $html.find('.icon img');
var $label = $html.find('.label');
var $date = $html.find('.date');
var $size = $html.find('.size');
$html
.addClass(item.isFolder() ? 'folder' : 'file')
.data('item', item);
location.setLink($a, item);
$label.text(item.label).attr('title', item.label);
$date.data('time', item.time).text(format.formatDate(item.time));
$size.data('bytes', item.size).text(format.formatSize(item.size));
item.icon = resource.icon(item.type);
if (item.isFolder() && !item.isManaged) {
$html.addClass('page');
item.icon = resource.icon('folder-page');
}
if (item.isCurrentParentFolder()) {
item.icon = resource.icon('folder-parent');
if (!settings.setParentFolderLabels) {
$label.addClass('l10n-parentDirectory');
}
$html.addClass('folder-parent');
}
$iconImg.attr('src', item.icon).attr('alt', item.type);
if (item.$view) {
item.$view.replaceWith($html);
}
item.$view = $html;
return $html;
}
function onMouseenter() {
var item = $(this).closest('.item').data('item');
event.pub('item.mouseenter', item);
}
function onMouseleave() {
var item = $(this).closest('.item').data('item');
event.pub('item.mouseleave', item);
}
function onLocationChanged(item) {
var $items = $('#items');
var $empty = $('#view').find('.empty');
$items.find('.item').remove();
if (item.parent && !settings.hideParentFolder) {
$items.append(update(item.parent, true));
}
_.each(item.content, function (e) {
if (!(e.isFolder() && settings.hideFolders)) {
$items.append(update(e, true));
}
});
if (item.isEmpty()) {
$empty.show();
} else {
$empty.hide();
}
$('html,body').scrollLeft(0).scrollTop(0);
}
function onLocationRefreshed(item, added, removed) {
var $items = $('#items');
var $empty = $('#view').find('.empty');
_.each(added, function (item) {
if (!(item.isFolder() && settings.hideFolders)) {
update(item, true).hide().appendTo($items).fadeIn(400);
}
});
_.each(removed, function (item) {
item.$view.fadeOut(400, function () {
item.$view.remove();
});
});
if (item.isEmpty()) {
setTimeout(function () { $empty.show(); }, 400);
} else {
$empty.hide();
}
}
function init() {
var $content = $(contentTemplate);
var $view = $content.find('#view');
var $items = $view.find('#items');
var $emtpy = $view.find('.empty').hide();
format.setDefaultMetric(settings.binaryPrefix);
$items
.on('mouseenter', '.item a', onMouseenter)
.on('mouseleave', '.item a', onMouseleave);
event.sub('location.changed', onLocationChanged);
event.sub('location.refreshed', onLocationRefreshed);
// $content.appendTo('body');
$content.appendTo('#main-row');
}
init();
});

View File

@@ -1,48 +0,0 @@
modulejs.define('view/sidebar', ['$', 'core/resource', 'core/store'], function ($, resource, store) {
var storekey = 'sidebarIsVisible';
var toggleTemplate =
'<div id="sidebar-toggle" class="tool">' +
'<img alt="settings"/>' +
'</div>';
function update(toggle) {
var $toggle = $('#sidebar-toggle');
var $img = $toggle.find('img');
var $sidebar = $('#sidebar');
var isVisible = store.get(storekey);
if (toggle) {
isVisible = !isVisible;
store.put(storekey, isVisible);
}
if (isVisible) {
$toggle.addClass('current');
$img.attr('src', resource.image('back'));
$sidebar.show();
} else {
$toggle.removeClass('current');
$img.attr('src', resource.image('settings'));
$sidebar.hide();
}
}
function init() {
$(toggleTemplate)
.appendTo('#toolbar')
.on('click', function (ev) {
update(true);
ev.preventDefault();
});
update(false);
}
init();
});

View File

@@ -1,147 +0,0 @@
modulejs.define('view/viewmode', ['_', '$', 'core/settings', 'core/resource', 'core/store', 'core/event'], function (_, $, allsettings, resource, store, event) {
var modes = ['details', 'grid', 'icons'];
var settings = _.extend({}, {
modes: modes,
sizes: [20, 40, 60, 80, 100, 150, 200],
}, allsettings.view);
var storekey = 'viewmode';
var modeTemplate =
'<div id="view-[MODE]" class="button view">' +
'<img src="' + resource.image('view-[MODE]') + '" alt="view-[MODE]"/>' +
'</div>';
var sizeTemplate =
'<input id="view-size" type="range" min="0" max="0" value="0">';
var sortedSizes = settings.sizes.sort(function (a, b) { return a-b; });
var dynamicStyleTag = null;
function adjustSpacing() {
// kept here for later use
}
function applyCss(rules) {
if (dynamicStyleTag) {
document.head.removeChild(dynamicStyleTag);
}
dynamicStyleTag = document.createElement('style');
dynamicStyleTag.appendChild(document.createTextNode('')); // fix webkit
document.head.appendChild(dynamicStyleTag);
_.each(rules, function (rule, i) {
dynamicStyleTag.sheet.insertRule(rule, i);
});
}
function cropSize(size, min, max) {
return Math.min(max, Math.max(min, size));
}
function applyCssSizes(size) {
var dsize = cropSize(size, 20, 80);
var gsize = cropSize(size, 40, 150);
var isize = cropSize(size, 80, 2000);
var ilsize = Math.round(isize*4/3);
var rules = [
'#view.view-details .item .label { line-height: ' + (dsize+14) + 'px !important; }',
'#view.view-details .item .date { line-height: ' + (dsize+14) + 'px !important; }',
'#view.view-details .item .size { line-height: ' + (dsize+14) + 'px !important; }',
'#view.view-details .square { width: ' + dsize + 'px !important; height: ' + dsize + 'px !important; }',
'#view.view-details .square img { width: ' + dsize + 'px !important; height: ' + dsize + 'px !important; }',
'#view.view-details .label { margin: 0 246px 0 ' + (dsize+32) + 'px !important; }',
'#view.view-grid .item .label { line-height: ' + gsize + 'px !important; }',
'#view.view-grid .square { width: ' + gsize + 'px !important; height: ' + gsize + 'px !important; }',
'#view.view-grid .square img { width: ' + gsize + 'px !important; height: ' + gsize + 'px !important; }',
'#view.view-icons .item { width: ' + ilsize + 'px !important; }',
'#view.view-icons .landscape { width: ' + ilsize + 'px !important; height: ' + isize + 'px !important; }',
'#view.view-icons .landscape img { width: ' + isize + 'px !important; height: ' + isize + 'px !important; }',
'#view.view-icons .landscape .thumb { width: ' + ilsize + 'px !important; }'
];
applyCss(rules);
}
function update(mode, size) {
var $view = $('#view');
var stored = store.get(storekey);
mode = mode || stored && stored.mode;
size = size || stored && stored.size;
mode = _.contains(settings.modes, mode) ? mode : settings.modes[0];
size = _.contains(settings.sizes, size) ? size : settings.sizes[0];
store.put(storekey, {mode: mode, size: size});
_.each(modes, function (m) {
if (m === mode) {
$('#view-' + m).addClass('active');
$view.addClass('view-' + m).show();
} else {
$('#view-' + m).removeClass('active');
$view.removeClass('view-' + m);
}
});
applyCssSizes(size);
$('#view-size').val(_.indexOf(sortedSizes, size));
adjustSpacing();
}
function addViewSettings() {
if (settings.modes.length < 2 && settings.sizes.length < 2) {
return;
}
var $viewBlock = $('<div class="block"><h1 class="l10n-view">View</h1></div>');
var max;
settings.modes = _.intersection(settings.modes, modes);
if (settings.modes.length > 1) {
_.each(modes, function (mode) {
if (_.contains(settings.modes, mode)) {
$(modeTemplate.replace(/\[MODE\]/g, mode))
.appendTo($viewBlock)
.on('click', function (ev) {
update(mode);
ev.preventDefault();
});
}
});
}
if (settings.sizes.length > 1) {
max = settings.sizes.length-1;
$(sizeTemplate)
.prop('max', max).attr('max', max)
.on('input change', function (ev) {
update(null, settings.sizes[parseInt(ev.target.value, 10)]);
})
.appendTo($viewBlock);
}
$viewBlock.appendTo('#settings');
}
function init() {
addViewSettings();
update();
event.sub('location.changed', adjustSpacing);
$(window).on('resize', adjustSpacing);
}
init();
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,33 +0,0 @@
/**
* @license
* lodash 3.6.0 (Custom Build) lodash.com/license | Underscore.js 1.8.2 underscorejs.org/LICENSE
* Build: `lodash exports="global" include="compact,contains,difference,each,extend,filter,indexOf,intersection,isFunction,isNumber,isString,keys,map,pluck,sortBy,values,without"`
*/
;(function(){function n(n,r,t){if(r!==r){n:{for(r=n.length,t+=-1;++t<r;){var e=n[t];if(e!==e){n=t;break n}}n=-1}return n}for(t-=1,e=n.length;++t<e;)if(n[t]===r)return t;return-1}function r(n){return typeof n=="function"||false}function t(n,r){var t;n:{t=n.a;var e=r.a;if(t!==e){var u=t===t,o=e===e;if(t>e||!u||typeof t=="undefined"&&o){t=1;break n}if(t<e||!o||typeof e=="undefined"&&u){t=-1;break n}}t=0}return t||n.b-r.b}function e(n){return!!n&&typeof n=="object"}function u(){}function o(n){var r=n?n.length:0;
for(this.data={hash:tt(null),set:new Qr};r--;)this.push(n[r])}function c(n,r){var t=n.data;return(typeof r=="string"||G(r)?t.set.has(r):t.hash[r])?0:-1}function f(n,r){var t=-1,e=n.length;for(r||(r=Array(e));++t<e;)r[t]=n[t];return r}function a(n,r){for(var t=-1,e=n.length;++t<e&&false!==r(n[t],t,n););return n}function i(n,r){for(var t=-1,e=n.length,u=-1,o=[];++t<e;){var c=n[t];r(c,t,n)&&(o[++u]=c)}return o}function l(n,r){for(var t=-1,e=n.length,u=Array(e);++t<e;)u[t]=r(n[t],t,n);return u}function s(n,r,t){t||(t=r,r={});
for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function p(n,r,t){var e=typeof n;return"function"==e?typeof r=="undefined"?n:O(n,r,t):null==n?tr:"object"==e?A(n):typeof r=="undefined"?x(n+""):w(n+"",r)}function y(n,r,t,e,u,o,c){var i;if(t&&(i=u?t(n,e,u):t(n)),typeof i!="undefined")return i;if(!G(n))return n;if(e=jt(n)){if(i=F(n),!r)return f(n,i)}else{var l=qr.call(n),p=l==sr;if(l!=yr&&l!=cr&&(!p||u))return Fr[l]?T(n,l,r):u?n:{};if(Br(n))return u?n:{};if(i=U(p?{}:n),!r)return s(n,i,xt(n))
}for(o||(o=[]),c||(c=[]),u=o.length;u--;)if(o[u]==n)return c[u];return o.push(n),c.push(i),(e?a:b)(n,function(e,u){i[u]=y(e,r,t,u,n,o,c)}),i}function h(r,t){var e=r?r.length:0,u=[];if(!e)return u;var o=-1,f=P(),a=f==n,i=a&&200<=t.length?vt(t):null,l=t.length;i&&(f=c,a=false,t=i);n:for(;++o<e;)if(i=r[o],a&&i===i){for(var s=l;s--;)if(t[s]===i)continue n;u.push(i)}else 0>f(t,i,0)&&u.push(i);return u}function g(n,r){var t=[];return ht(n,function(n,e,u){r(n,e,u)&&t.push(n)}),t}function v(n,r,t){for(var u=-1,o=n.length,c=-1,f=[];++u<o;){var a=n[u];
if(e(a)&&$(a.length)&&(jt(a)||z(a))){r&&(a=v(a,r,t));var i=-1,l=a.length;for(f.length+=l;++i<l;)f[++c]=a[i]}else t||(f[++c]=a)}return f}function b(n,r){return gt(n,r,xt)}function d(n,r,t,e,u,o){if(n===r)return 0!==n||1/n==1/r;var c=typeof n,f=typeof r;return"function"!=c&&"object"!=c&&"function"!=f&&"object"!=f||null==n||null==r?n!==n&&r!==r:m(n,r,d,t,e,u,o)}function m(n,r,t,e,u,o,c){var f=jt(n),a=jt(r),i=fr,l=fr;f||(i=qr.call(n),i==cr?i=yr:i!=yr&&(f=K(n))),a||(l=qr.call(r),l==cr?l=yr:l!=yr&&K(r));
var s=(i==yr||u&&i==sr)&&!Br(n),a=(l==yr||u&&l==sr)&&!Br(r);if((l=i==l)&&!f&&!s)return I(n,r,i);if(u){if(!(l||s&&a))return false}else{if(i=s&&Yr.call(n,"__wrapped__"),a=a&&Yr.call(r,"__wrapped__"),i||a)return t(i?n.value():n,a?r.value():r,e,u,o,c);if(!l)return false}for(o||(o=[]),c||(c=[]),i=o.length;i--;)if(o[i]==n)return c[i]==r;return o.push(n),c.push(r),n=(f?k:_)(n,r,t,e,u,o,c),o.pop(),c.pop(),n}function j(n,r){var t=[];return ht(n,function(n,e,u){t.push(r(n,e,u))}),t}function A(n){var r=xt(n),t=r.length;
if(!t)return rr(true);if(1==t){var e=r[0],u=n[e];if(B(u))return function(n){return null!=n&&n[e]===u&&(typeof u!="undefined"||e in L(n))}}for(var o=Array(t),c=Array(t);t--;)u=n[r[t]],o[t]=u,c[t]=B(u);return function(n){var t;if(t=null!=n)n:{n=L(n),t=-1;for(var e=r.length;++t<e;)if(c[t]?o[t]!==n[r[t]]:!(r[t]in n)){t=false;break n}for(t=-1;++t<e;){var u=r[t],f=n[u],a=o[t];if(c[t]?u=typeof f!="undefined"||u in n:(u=ur,typeof u=="undefined"&&(u=d(a,f,void 0,true))),!u){t=false;break n}}t=true}return t}}function w(n,r){return B(r)?function(t){return null!=t&&t[n]===r&&(typeof r!="undefined"||n in L(t))
}:function(t){return null!=t&&d(r,t[n],null,true)}}function x(n){return function(r){return null==r?ur:r[n]}}function E(n,r){var t=n.length;for(n.sort(r);t--;)n[t]=n[t].c;return n}function O(n,r,t){if(typeof n!="function")return tr;if(typeof r=="undefined")return n;switch(t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)};case 5:return function(t,e,u,o,c){return n.call(r,t,e,u,o,c)}}return function(){return n.apply(r,arguments)
}}function S(n){return Hr.call(n,0)}function k(n,r,t,e,u,o,c){var f=-1,a=n.length,i=r.length,l=true;if(a!=i&&(!u||i<=a))return false;for(;l&&++f<a;){var s=n[f],p=r[f],l=ur;if(e&&(l=u?e(p,s,f):e(s,p,f)),typeof l=="undefined")if(u)for(var y=i;y--&&(p=r[y],!(l=s&&s===p||t(s,p,e,u,o,c))););else l=s&&s===p||t(s,p,e,u,o,c)}return!!l}function I(n,r,t){switch(t){case ar:case ir:return+n==+r;case lr:return n.name==r.name&&n.message==r.message;case pr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case hr:case gr:return n==r+""
}return false}function _(n,r,t,e,u,o,c){var f=xt(n),a=f.length,i=xt(r).length;if(a!=i&&!u)return false;for(var i=u,l=-1;++l<a;){var s=f[l],p=u?s in r:Yr.call(r,s);if(p){var y=n[s],h=r[s],p=ur;e&&(p=u?e(h,y,s):e(y,h,s)),typeof p=="undefined"&&(p=y&&y===h||t(y,h,e,u,o,c))}if(!p)return false;i||(i="constructor"==s)}return i||(t=n.constructor,e=r.constructor,!(t!=e&&"constructor"in n&&"constructor"in r)||typeof t=="function"&&t instanceof t&&typeof e=="function"&&e instanceof e)?true:false}function M(n,r,t){var e=u.callback||nr,e=e===nr?p:e;
return t?e(n,r,t):e}function P(r,t,e){var o=u.indexOf||D,o=o===D?n:o;return r?o(r,t,e):o}function F(n){var r=n.length,t=new n.constructor(r);return r&&"string"==typeof n[0]&&Yr.call(n,"index")&&(t.index=n.index,t.input=n.input),t}function U(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Object),new n}function T(n,r,t){var e=n.constructor;switch(r){case vr:return S(n);case ar:case ir:return new e(+n);case br:case dr:case mr:case jr:case Ar:case wr:case xr:case Er:case Or:return e instanceof e&&(e=st[r]),r=n.buffer,new e(t?S(r):r,n.byteOffset,n.length);
case pr:case gr:return new e(n);case hr:var u=new e(n.source,Sr.exec(n));u.lastIndex=n.lastIndex}return u}function N(n,r){return n=+n,r=null==r?lt:r,-1<n&&0==n%1&&n<r}function R(n,r,t){if(!G(t))return false;var e=typeof r;return"number"==e?(e=t.length,e=$(e)&&N(r,e)):e="string"==e&&r in t,e?(r=t[r],n===n?n===r:r!==r):false}function $(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=lt}function B(n){return n===n&&(0===n?0<1/n:!G(n))}function C(n){for(var r=Q(n),t=r.length,e=t&&n.length,o=u.support,o=e&&$(e)&&(jt(n)||o.nonEnumStrings&&J(n)||o.nonEnumArgs&&z(n)),c=-1,f=[];++c<t;){var a=r[c];
(o&&N(a,e)||Yr.call(n,a))&&f.push(a)}return f}function L(n){if(u.support.unindexedChars&&J(n)){for(var r=-1,t=n.length,e=Object(n);++r<t;)e[r]=n.charAt(r);return e}return G(n)?n:Object(n)}function D(r,t,e){var u=r?r.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ut(u+e,0):e;else if(e){if(e=0,u=r?r.length:e,typeof t!="number"||t!==t||u>at){u=tr,e=u(t);for(var o=0,c=r?r.length:0,f=e!==e,a=typeof e=="undefined";o<c;){var i=Jr((o+c)/2),l=u(r[i]),s=l===l;(f?s:a?s&&typeof l!="undefined":l<e)?o=i+1:c=i
}e=ot(c,ft)}else{for(;e<u;){var o=e+u>>>1;r[o]<t?e=o+1:u=o}e=u}return r=r[e],(t===t?t===r:r!==r)?e:-1}return n(r,t,e||0)}function W(n,r,t){var e=jt(n)?i:g;return r=M(r,t,3),e(n,r)}function V(n,r,t,e){var u=n?n.length:0;return $(u)||(n=X(n),u=n.length),u?(t=typeof t!="number"||e&&R(r,t,e)?0:0>t?ut(u+t,0):t||0,typeof n=="string"||!jt(n)&&J(n)?t<u&&-1<n.indexOf(r,t):-1<P(n,r,t)):false}function Y(n,r,t){var e=jt(n)?l:j;return r=M(r,t,3),e(n,r)}function q(n,r){if(typeof n!="function")throw new TypeError(or);
return r=ut(typeof r=="undefined"?n.length-1:+r||0,0),function(){for(var t=arguments,e=-1,u=ut(t.length-r,0),o=Array(u);++e<u;)o[e]=t[r+e];switch(r){case 0:return n.call(this,o);case 1:return n.call(this,t[0],o);case 2:return n.call(this,t[0],t[1],o)}for(u=Array(r+1),e=-1;++e<r;)u[e]=t[e];return u[r]=o,n.apply(this,u)}}function z(n){var r=e(n)?n.length:ur;return $(r)&&qr.call(n)==cr}function G(n){var r=typeof n;return"function"==r||!!n&&"object"==r}function H(n){return null==n?false:qr.call(n)==sr?zr.test(Vr.call(n)):e(n)&&(Br(n)?zr:kr).test(n)
}function J(n){return typeof n=="string"||e(n)&&qr.call(n)==gr}function K(n){return e(n)&&$(n.length)&&!!Pr[qr.call(n)]}function Q(n){if(null==n)return[];G(n)||(n=Object(n));for(var r=n.length,t=u.support,r=r&&$(r)&&(jt(n)||t.nonEnumStrings&&J(n)||t.nonEnumArgs&&z(n))&&r||0,e=n.constructor,o=-1,e=At(e)&&e.prototype||Dr,c=e===n,f=Array(r),a=0<r,i=t.enumErrorProps&&(n===Lr||n instanceof Error),l=t.enumPrototypes&&At(n);++o<r;)f[o]=o+"";for(var s in n)l&&"prototype"==s||i&&("message"==s||"name"==s)||a&&N(s,r)||"constructor"==s&&(c||!Yr.call(n,s))||f.push(s);
if(t.nonEnumShadows&&n!==Dr)for(r=n===Wr?gr:n===Lr?lr:qr.call(n),t=pt[r]||pt[yr],r==yr&&(e=Dr),r=Mr.length;r--;)s=Mr[r],o=t[s],c&&o||(o?!Yr.call(n,s):n[s]===e[s])||f.push(s);return f}function X(n){for(var r=xt(n),t=-1,e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function Z(n){return typeof n!="string"&&(n=null==n?"":n+""),n&&_r.test(n)?n.replace(Ir,"\\$&"):n}function nr(n,r,t){return t&&R(n,r,t)&&(r=null),e(n)?er(n):p(n,r)}function rr(n){return function(){return n}}function tr(n){return n}function er(n){return A(y(n,true))
}var ur,or="Expected a function",cr="[object Arguments]",fr="[object Array]",ar="[object Boolean]",ir="[object Date]",lr="[object Error]",sr="[object Function]",pr="[object Number]",yr="[object Object]",hr="[object RegExp]",gr="[object String]",vr="[object ArrayBuffer]",br="[object Float32Array]",dr="[object Float64Array]",mr="[object Int8Array]",jr="[object Int16Array]",Ar="[object Int32Array]",wr="[object Uint8Array]",xr="[object Uint8ClampedArray]",Er="[object Uint16Array]",Or="[object Uint32Array]",Sr=/\w*$/,kr=/^\[object .+?Constructor\]$/,Ir=/[.*+?^${}()|[\]\/\\]/g,_r=RegExp(Ir.source),Mr="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Pr={};
Pr[br]=Pr[dr]=Pr[mr]=Pr[jr]=Pr[Ar]=Pr[wr]=Pr[xr]=Pr[Er]=Pr[Or]=true,Pr[cr]=Pr[fr]=Pr[vr]=Pr[ar]=Pr[ir]=Pr[lr]=Pr[sr]=Pr["[object Map]"]=Pr[pr]=Pr[yr]=Pr[hr]=Pr["[object Set]"]=Pr[gr]=Pr["[object WeakMap]"]=false;var Fr={};Fr[cr]=Fr[fr]=Fr[vr]=Fr[ar]=Fr[ir]=Fr[br]=Fr[dr]=Fr[mr]=Fr[jr]=Fr[Ar]=Fr[pr]=Fr[yr]=Fr[hr]=Fr[gr]=Fr[wr]=Fr[xr]=Fr[Er]=Fr[Or]=true,Fr[lr]=Fr[sr]=Fr["[object Map]"]=Fr["[object Set]"]=Fr["[object WeakMap]"]=false;var Ur={"function":true,object:true},Tr=Ur[typeof module]&&module&&!module.nodeType&&module,Nr=Ur[typeof self]&&self&&self.Object&&self,Rr=Ur[typeof window]&&window&&window.Object&&window,$r=Ur[typeof exports]&&exports&&!exports.nodeType&&exports&&Tr&&typeof global=="object"&&global||Rr!==(this&&this.window)&&Rr||Nr||this,Br=function(){try{Object({toString:0}+"")
}catch(n){return function(){return false}}return function(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Cr=Array.prototype,Lr=Error.prototype,Dr=Object.prototype,Wr=String.prototype,Vr=Function.prototype.toString,Yr=Dr.hasOwnProperty,qr=Dr.toString,zr=RegExp("^"+Z(qr).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=H(Gr=$r.ArrayBuffer)&&Gr,Hr=H(Hr=Gr&&new Gr(0).slice)&&Hr,Jr=Math.floor,Kr=Dr.propertyIsEnumerable,Qr=H(Qr=$r.Set)&&Qr,Xr=Cr.splice,Zr=H(Zr=$r.Uint8Array)&&Zr,nt=function(){try{var n=H(n=$r.Float64Array)&&n,r=new n(new Gr(10),0,1)&&n
}catch(t){}return r}(),rt=H(rt=Array.isArray)&&rt,tt=H(tt=Object.create)&&tt,et=H(et=Object.keys)&&et,ut=Math.max,ot=Math.min,ct=Math.pow(2,32)-1,ft=ct-1,at=ct>>>1,it=nt?nt.BYTES_PER_ELEMENT:0,lt=Math.pow(2,53)-1,st={};st[br]=$r.Float32Array,st[dr]=$r.Float64Array,st[mr]=$r.Int8Array,st[jr]=$r.Int16Array,st[Ar]=$r.Int32Array,st[wr]=$r.Uint8Array,st[xr]=$r.Uint8ClampedArray,st[Er]=$r.Uint16Array,st[Or]=$r.Uint32Array;var pt={};pt[fr]=pt[ir]=pt[pr]={constructor:true,toLocaleString:true,toString:true,valueOf:true},pt[ar]=pt[gr]={constructor:true,toString:true,valueOf:true},pt[lr]=pt[sr]=pt[hr]={constructor:true,toString:true},pt[yr]={constructor:true},a(Mr,function(n){for(var r in pt)if(Yr.call(pt,r)){var t=pt[r];
t[n]=Yr.call(t,n)}});var yt=u.support={};!function(n){var r=function(){this.x=1},t={0:1,length:1},e=[];r.prototype={valueOf:1,y:1};for(var u in new r)e.push(u);yt.argsTag=qr.call(arguments)==cr,yt.enumErrorProps=Kr.call(Lr,"message")||Kr.call(Lr,"name"),yt.enumPrototypes=Kr.call(r,"prototype"),yt.funcDecomp=/\bthis\b/.test(function(){return this}),yt.funcNames=typeof Function.name=="string",yt.nonEnumStrings=!Kr.call("x",0),yt.nonEnumShadows=!/valueOf/.test(e),yt.spliceObjects=(Xr.call(t,0,1),!t[0]),yt.unindexedChars="xx"!="x"[0]+Object("x")[0];
try{yt.nonEnumArgs=!Kr.call(arguments,1)}catch(o){yt.nonEnumArgs=true}}(0,0);var ht=function(n,r){return function(t,e){var u=t?t.length:0;if(!$(u))return n(t,e);for(var o=r?u:-1,c=L(t);(r?o--:++o<u)&&false!==e(c[o],o,c););return t}}(b),gt=function(n){return function(r,t,e){var u=L(r);e=e(r);for(var o=e.length,c=n?o:-1;n?c--:++c<o;){var f=e[c];if(false===t(u[f],f,u))break}return r}}();Hr||(S=Gr&&Zr?function(n){var r=n.byteLength,t=nt?Jr(r/it):0,e=t*it,u=new Gr(r);if(t){var o=new nt(u,0,t);o.set(new nt(n,0,t))
}return r!=e&&(o=new Zr(u,e),o.set(new Zr(n,e))),u}:rr(null));var vt=tt&&Qr?function(n){return new o(n)}:rr(null),bt=q(function(n,r){return jt(n)||z(n)?h(n,v(r,false,true)):[]}),dt=q(function(n,r){return jt(n)||z(n)?h(n,r):[]}),mt=function(n,r){return function(t,e,u){return typeof e=="function"&&typeof u=="undefined"&&jt(t)?n(t,e):r(t,O(e,u,3))}}(a,ht);yt.argsTag||(z=function(n){var r=e(n)?n.length:ur;return $(r)&&Yr.call(n,"callee")&&!Kr.call(n,"callee")});var jt=rt||function(n){return e(n)&&$(n.length)&&qr.call(n)==fr
},At=r(/x/)||Zr&&!r(Zr)?function(n){return qr.call(n)==sr}:r,wt=function(n){return function(){var r=arguments,t=r.length,e=r[0];if(2>t||null==e)return e;var u=r[t-2],o=r[t-1],c=r[3];for(3<t&&typeof u=="function"?(u=O(u,o,5),t-=2):(u=2<t&&typeof o=="function"?o:null,t-=u?1:0),c&&R(r[1],r[2],c)&&(u=3==t?null:u,t=2),o=0;++o<t;)(c=r[o])&&n(e,c,u);return e}}(function(n,r,t){var e=xt(r);if(!t)return s(r,n,e);for(var u=-1,o=e.length;++u<o;){var c=e[u],f=n[c],a=t(f,r[c],c,n,r);(a===a?a===f:f!==f)&&(typeof f!="undefined"||c in n)||(n[c]=a)
}return n}),xt=et?function(n){if(n)var r=n.constructor,t=n.length;return typeof r=="function"&&r.prototype===n||(typeof n=="function"?u.support.enumPrototypes:t&&$(t))?C(n):G(n)?et(n):[]}:C;o.prototype.push=function(n){var r=this.data;typeof n=="string"||G(n)?r.set.add(n):r.hash[n]=true},u.assign=wt,u.callback=nr,u.compact=function(n){for(var r=-1,t=n?n.length:0,e=-1,u=[];++r<t;){var o=n[r];o&&(u[++e]=o)}return u},u.constant=rr,u.difference=bt,u.filter=W,u.forEach=mt,u.intersection=function(){for(var r=[],t=-1,e=arguments.length,u=[],o=P(),f=o==n;++t<e;){var a=arguments[t];
(jt(a)||z(a))&&(r.push(a),u.push(f&&120<=a.length?vt(t&&a):null))}var e=r.length,f=r[0],i=-1,l=f?f.length:0,s=[],p=u[0];n:for(;++i<l;)if(a=f[i],0>(p?c(p,a):o(s,a,0))){for(t=e;--t;){var y=u[t];if(0>(y?c(y,a):o(r[t],a,0)))continue n}p&&p.push(a),s.push(a)}return s},u.keys=xt,u.keysIn=Q,u.map=Y,u.matches=er,u.pluck=function(n,r){return Y(n,x(r))},u.restParam=q,u.sortBy=function(n,r,e){if(null==n)return[];var u=-1,o=n.length,c=$(o)?Array(o):[];return e&&R(n,r,e)&&(r=null),r=M(r,e,3),ht(n,function(n,t,e){c[++u]={a:r(n,t,e),b:u,c:n}
}),E(c,t)},u.values=X,u.without=dt,u.collect=Y,u.each=mt,u.extend=wt,u.iteratee=nr,u.select=W,u.escapeRegExp=Z,u.identity=tr,u.includes=V,u.indexOf=D,u.isArguments=z,u.isArray=jt,u.isFunction=At,u.isNative=H,u.isNumber=function(n){return typeof n=="number"||e(n)&&qr.call(n)==pr},u.isObject=G,u.isString=J,u.isTypedArray=K,u.contains=V,u.include=V,u.VERSION="3.6.0",$r._=u}).call(this);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
/* modulejs 1.4.0 - http://larsjung.de/modulejs/ */
!function(n){"use strict";function r(n){return function(r){return h.toString.call(r)==="[object "+n+"]"}}function t(n){return n===new Object(n)}function e(n,r){return h.hasOwnProperty.call(n,r)}function i(n,r,t){if(v&&n.forEach===v)n.forEach(r,t);else if(n.length===+n.length)for(var i=0,o=n.length;o>i;i+=1)r.call(t,n[i],i,n);else for(var u in n)e(n,u)&&r.call(t,n[u],u,n)}function o(n,r){for(var t=0,e=n.length;e>t;t+=1)if(n[t]===r)return!0;return!1}function u(n){var r={},t=[];return i(n,function(n){e(r,n)||(t.push(n),r[n]=1)}),t}function c(n,r,t){if(n)throw{code:r,msg:t,toString:function(){return p+" error "+r+": "+t}}}function f(r,t,a){if(c(!g(r),31,'id must be a string "'+r+'"'),!t&&e(q,r))return q[r];var s=j[r];c(!s,32,'id not defined "'+r+'"'),a=(a||[]).slice(0),a.push(r);var d=[];if(i(s.deps,function(n){c(o(a,n),33,"circular dependencies: "+a+" & "+n),t?(d=d.concat(f(n,t,a)),d.push(n)):d.push(f(n,t,a))}),t)return u(d);var l=s.fn.apply(n,d);return q[r]=l,l}function a(n,r,e){void 0===e&&(e=r,r=[]),c(!g(n),11,'id must be a string "'+n+'"'),c(j[n],12,'id already defined "'+n+'"'),c(!b(r),13,'dependencies for "'+n+'" must be an array "'+r+'"'),c(!t(e)&&!y(e),14,'arg for "'+n+'" must be object or function "'+e+'"'),j[n]={id:n,deps:r,fn:y(e)?e:function(){return e}}}function s(n){return f(n)}function d(){var n={};return i(j,function(r,t){n[t]={deps:r.deps.slice(0),reqs:f(t,!0),init:e(q,t)}}),i(j,function(r,t){var e=[];i(j,function(r,i){o(n[i].reqs,t)&&e.push(i)}),n[t].reqd=e}),n}function l(n){var r="\n";return i(d(),function(t,e){var i=n?t.reqd:t.reqs;r+=(t.init?"* ":" ")+e+" -> [ "+i.join(", ")+" ]\n"}),r}var p="modulejs",h=Object.prototype,v=Array.prototype.forEach,g=r("String"),y=r("Function"),b=Array.isArray||r("Array"),j={},q={};n[p]={define:a,require:s,state:d,log:l,_private:{isString:g,isFunction:y,isArray:b,isObject:t,has:e,each:i,contains:o,uniq:u,err:c,definitions:j,instances:q,resolve:f}}}(this);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,52 +0,0 @@
// @include "lib/modernizr-*.js"
// @include "lib/jquery-*.js"
// @include "lib/jquery.*.js"
// @include "lib/lodash-*.js"
// @include "lib/marked-*.js"
// @include "lib/modulejs-*.js"
// @include "lib/moment-*.js"
// @include "lib/prism-*.js"
(function () {
'use strict';
/*global jQuery, marked, Modernizr, moment, Prism, _ */
modulejs.define('$', function () { return jQuery; });
modulejs.define('marked', function () { return marked; });
modulejs.define('modernizr', function () { return Modernizr; });
modulejs.define('moment', function () { return moment; });
modulejs.define('prism', function () { return Prism; });
modulejs.define('_', function () { return _; });
// @include "inc/**/*.js"
var $ = jQuery;
if ($('html').hasClass('no-browser')) {
return;
}
var module = $('script[data-module]').data('module');
var data = {action: 'get', setup: true, options: true, types: true, theme: true, langs: true};
var url;
if (module === 'main') {
url = '.';
} else if (module === 'info') {
data.updatecmds = true;
url = 'server/php/index.php';
} else {
return;
}
$.ajax({
url: url,
data: data,
type: 'POST',
dataType: 'json'
}).done(function (config) {
modulejs.define('config', config);
$(function () { modulejs.require(module); });
});
}());

View File

@@ -1,10 +0,0 @@
{
"lang": "nederlands",
"details": "details",
"icons": "iconen",
"name": "Naam",
"lastModified": "Laatste wijziging",
"size": "Grootte",
"parentDirectory": "Bovenliggende map",
"empty": "lege"
}

View File

@@ -1,39 +0,0 @@
doctype html
<!--[if lt IE 10]><html class="no-js no-browser" lang="en"><![endif]-->
<!--[if gt IE 9]><!--><html class="no-js browser" lang="en"><!--<![endif]-->
head
meta( charset="utf-8" )
title #{pkg.name} #{pkg.version} Server Setup
meta( name="description", content="#{pkg.name} #{pkg.version} Server Setup" )
meta( name="viewport", content="width=device-width, initial-scale=1" )
link( rel="shortcut icon", href="client/images/favicon/favicon-16-32.ico" )
link( rel="apple-touch-icon-precomposed", type="image/png", href="client/images/favicon/favicon-152.png" )
link( rel="stylesheet", href="client/css/styles.css" )
script( src="client/js/scripts.js", data-module="info" )
body#h5ai-info
div#fallback-hints
span.noJsMsg
| Works best with JavaScript enabled!
span.noBrowserMsg
| Works best in
a( href="http://browsehappy.com" ) modern browsers
| !
span.backlink
a( href="#{pkg.homepage}", title="#{pkg.name} #{pkg.version} · #{pkg.description}" ) powered by #{pkg.name}
div#content
h1#header
a( href="#{pkg.homepage}" ) #{pkg.name}
div#support
| Show your support with a donation!
div.paypal
form( action="https://www.paypal.com/cgi-bin/webscr", method="post", target="_top" )
input( type="hidden", name="cmd", value="_s-xclick" )
input( type="hidden", name="hosted_button_id", value="8WSPKWT7YBTSQ" )
input( type="image", src="client/images/ui/paypal.svg", width="100px", border="0", name="submit", alt="PayPal - The safer, easier way to pay online!" )
</html>

9
src/_h5ai/private/cache/README.md vendored Normal file
View File

@@ -0,0 +1,9 @@
# Cache
Private cache.
This directory is used for server side caching. To use caching make this
directory writable for your webserver.
There is no critical data in here. You can savely remove any content. This
will clear the cache.

View File

@@ -1,19 +1,18 @@
{
"lang": "afrikaans",
"dateFormat": "YYYY-MM-DD HH:mm",
"details": "besonderhede",
"list": "lys",
"download": "aflaai",
"empty": "leeg",
"files": "lêers",
"filter": "filter",
"folders": "gidse",
"grid": "rooster",
"icons": "ikone",
"name": "Naam",
"lastModified": "Laas verander",
"size": "Grootte",
"parentDirectory": "Hoër Vlak",
"empty": "leeg",
"folders": "gidse",
"files": "lêers",
"download": "aflaai",
"name": "Naam",
"noMatch": "geen resultaat",
"dateFormat": "YYYY-MM-DD HH:mm",
"filter": "filter",
"delete": "verwyder"
"parentDirectory": "Hoër Vlak",
"size": "Grootte"
}

View File

@@ -1,17 +1,18 @@
{
"lang": "български",
"dateFormat": "DD-MM-YYYY HH:mm",
"details": "детайли",
"download": "изтегляне",
"empty": "празна",
"files": "файлове",
"filter": "филтър",
"folders": "директории",
"grid": "мрежа",
"icons": "икони",
"name": "Име",
"lastModified": "Последна промяна",
"size": "Размер",
"parentDirectory": "Предходна директория",
"empty": "празна",
"folders": "директории",
"files": "файлове",
"download": "изтегляне",
"name": "Име",
"noMatch": "няма съвпадение",
"dateFormat": "DD-MM-YYYY HH:mm",
"filter": "филтър"
"parentDirectory": "Предходна директория",
"size": "Размер"
}

View File

@@ -1,17 +1,18 @@
{
"lang": "čeština",
"dateFormat": "DD.MM.YYYY HH:mm",
"details": "Podrobnosti",
"download": "Stáhnout",
"empty": "Prázdná složka",
"files": "souborů",
"filter": "Filtr",
"folders": "složek",
"grid": "Seznam",
"icons": "Velké ikony",
"name": "Název",
"lastModified": "Datum změny",
"size": "Velikost",
"parentDirectory": "Nadřazený adresář",
"empty": "Prázdná složka",
"folders": "složek",
"files": "souborů",
"download": "Stáhnout",
"name": "Název",
"noMatch": "Žádná shoda",
"dateFormat": "DD.MM.YYYY HH:mm",
"filter": "Filtr"
"parentDirectory": "Nadřazený adresář",
"size": "Velikost"
}

View File

@@ -1,17 +1,18 @@
{
"lang": "dansk",
"dateFormat": "DD-MM-YYYY HH:mm",
"details": "detaljer",
"download": "download",
"empty": "tom",
"files": "filer",
"filter": "filter",
"folders": "mapper",
"grid": "grid",
"icons": "ikoner",
"name": "Navn",
"lastModified": "Sidst ændret",
"size": "Størrelse",
"parentDirectory": "Overordnet mappe",
"empty": "tom",
"folders": "mapper",
"files": "filer",
"download": "download",
"name": "Navn",
"noMatch": "ingen match",
"dateFormat": "DD-MM-YYYY HH:mm",
"filter": "filter"
"parentDirectory": "Overordnet mappe",
"size": "Størrelse"
}

View File

@@ -1,19 +1,22 @@
{
"lang": "deutsch",
"dateFormat": "DD.MM.YYYY HH:mm",
"details": "Details",
"download": "Download",
"empty": "leer",
"files": "Dateien",
"filter": "filtern",
"folders": "Ordner",
"grid": "Gitter",
"icons": "Icons",
"name": "Name",
"language": "Sprache",
"lastModified": "Geändert",
"size": "Größe",
"parentDirectory": "Übergeordnetes Verzeichnis",
"empty": "leer",
"folders": "Ordner",
"files": "Dateien",
"download": "Download",
"name": "Name",
"noMatch": "keine Treffer",
"dateFormat": "DD.MM.YYYY HH:mm",
"filter": "Filter",
"view": "Ansicht",
"language": "Sprache"
"parentDirectory": "Übergeordnetes Verzeichnis",
"search": "suchen",
"size": "Größe",
"tree": "Baum",
"view": "Ansicht"
}

View File

@@ -1,17 +1,18 @@
{
"lang": "ελληνικά",
"dateFormat": "DD/MM/YYYY HH:mm",
"details": "λεπτομέρειες",
"download": "μεταμόρφωση",
"empty": "κενό",
"files": "αρχεία",
"filter": "φίλτρο",
"folders": "φάκελοι",
"grid": "πλέγμα",
"icons": "εικονίδια",
"name": "Όνομα",
"lastModified": "Τελευταία τροποποίηση",
"size": "Μέγεθος",
"parentDirectory": "Προηγούμενος Κατάλογος",
"empty": "κενό",
"folders": "φάκελοι",
"files": "αρχεία",
"download": "μεταμόρφωση",
"name": "Όνομα",
"noMatch": "κανένα αποτέλεσμα",
"dateFormat": "DD/MM/YYYY HH:mm",
"filter": "φίλτρο"
"parentDirectory": "Προηγούμενος Κατάλογος",
"size": "Μέγεθος"
}

View File

@@ -1,20 +1,23 @@
/* only here as a reference, these values are the hardcoded defaults */
{
"lang": "english",
"dateFormat": "YYYY-MM-DD HH:mm",
"details": "details",
"download": "download",
"empty": "empty",
"files": "files",
"filter": "filter",
"folders": "folders",
"grid": "grid",
"icons": "icons",
"name": "Name",
"language": "Language",
"lastModified": "Last modified",
"size": "Size",
"parentDirectory": "Parent Directory",
"empty": "empty",
"folders": "folders",
"files": "files",
"download": "download",
"name": "Name",
"noMatch": "no match",
"dateFormat": "YYYY-MM-DD HH:mm", /* syntax as specified on http://momentjs.com */
"filter": "filter",
"view": "View",
"language": "Language"
"parentDirectory": "Parent Directory",
"search": "search",
"size": "Size",
"tree": "Tree",
"view": "View"
}

View File

@@ -1,17 +1,22 @@
{
"lang": "español",
"dateFormat": "DD/MM/YYYY HH:mm",
"details": "Detalles",
"download": "Descargar",
"empty": "vacío",
"files": "Archivos",
"filter": "Filtrar",
"folders": "Directorios",
"grid": "Cuadrícula",
"icons": "Íconos",
"name": "Nombre",
"language": "Idioma",
"lastModified": "Última modificación",
"size": "Tamaño",
"parentDirectory": "Directorio superior",
"empty": "vacío",
"folders": "Directorios",
"files": "Archivos",
"download": "Descargar",
"name": "Nombre",
"noMatch": "Sin coincidencias",
"dateFormat": "DD/MM/YYYY HH:mm",
"filter": "Filtar"
"parentDirectory": "Directorio superior",
"search": "buscar",
"size": "Tamaño",
"tree": "Arbol",
"view": "Vista"
}

View File

@@ -0,0 +1,22 @@
{
"lang": "estonian",
"dateFormat": "DD-MM-YYYY HH.mm",
"details": "täpsem info",
"download": "laadi alla",
"empty": "tühi",
"files": "failid",
"filter": "filter",
"folders": "kataloogid",
"grid": "võre",
"icons": "ikoonid",
"language": "Keel",
"lastModified": "Viimati muudetud",
"name": "Nimi",
"noMatch": "ei leitud sobivat",
"parentDirectory": "Emakataloog",
"search": "otsi",
"size": "Suurus",
"tree": "Puu",
"view": "Vaade"
}

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