Compare commits
917 Commits
v0.9-13.12
...
ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d21ecac16 | ||
|
|
2d777ec061 | ||
|
|
5d20d57be9 | ||
|
|
3f14d6e138 | ||
|
|
1ee18ad532 | ||
|
|
419183ae2f | ||
|
|
0916631ae2 | ||
|
|
4186cdec6a | ||
|
|
cbb270ea89 | ||
|
|
d839f390ee | ||
|
|
26e8077e0a | ||
|
|
b5167dbe5d | ||
|
|
a1bf3d037b | ||
|
|
ed30a99655 | ||
|
|
bf2cb07e4b | ||
|
|
729dcf729a | ||
|
|
58cb9105d4 | ||
|
|
eb77897ab6 | ||
|
|
4ad930a31d | ||
|
|
fa222ba7a2 | ||
|
|
519e84e74c | ||
|
|
57106d85c9 | ||
|
|
a4883be588 | ||
|
|
96eb56fc35 | ||
|
|
a3d698c09e | ||
|
|
9bd4eaeae8 | ||
|
|
a31da6880d | ||
|
|
0759a9414a | ||
|
|
ee00fc567f | ||
|
|
5303124431 | ||
|
|
74b0f45a72 | ||
|
|
0f3f15c0ca | ||
|
|
cbfe180d8b | ||
|
|
d24a16ad23 | ||
|
|
6123f3ae62 | ||
|
|
89649522c7 | ||
|
|
675efe1e43 | ||
|
|
f40c5c178e | ||
|
|
5a2833c5aa | ||
|
|
c279ef1443 | ||
|
|
6cedf6a0a1 | ||
|
|
7068b2bbe1 | ||
|
|
4791cd978e | ||
|
|
403f96fdc0 | ||
|
|
86587d40ce | ||
|
|
7bd37f7d8c | ||
|
|
ecd21c2557 | ||
|
|
50dea3fc24 | ||
|
|
7db5f3c873 | ||
|
|
4f13adcadd | ||
|
|
ba0bfd3551 | ||
|
|
2fad7cc398 | ||
|
|
49eed7b437 | ||
|
|
d72d4ea2ab | ||
|
|
7ca696ce90 | ||
|
|
806409496a | ||
|
|
e2ca6a1fa7 | ||
|
|
e15c2966a9 | ||
|
|
93b5656109 | ||
|
|
539ef5e111 | ||
|
|
7a1b74b351 | ||
|
|
540fba3122 | ||
|
|
28f687e7fe | ||
|
|
91a970521c | ||
|
|
926ec3e117 | ||
|
|
23d52d44a1 | ||
|
|
cf9776ee43 | ||
|
|
a2e784113a | ||
|
|
38184ba5ba | ||
|
|
c422952c89 | ||
|
|
75672fe259 | ||
|
|
82fe09cf52 | ||
|
|
b0df985d66 | ||
|
|
09a320bf5d | ||
|
|
5163c43610 | ||
|
|
e20e6804e9 | ||
|
|
eeb893485b | ||
|
|
80746465c7 | ||
|
|
0e4391006c | ||
|
|
c84fa39c4f | ||
|
|
687a4c8e26 | ||
|
|
92cb7834e2 | ||
|
|
88fff899b8 | ||
|
|
5d2aef0dac | ||
|
|
75d5677d7d | ||
|
|
687ab6260a | ||
|
|
30baad977c | ||
|
|
c8c4d9e079 | ||
|
|
92debef3e3 | ||
|
|
1c189588db | ||
|
|
0177a0557a | ||
|
|
6855e9f1f3 | ||
|
|
478ec92491 | ||
|
|
256fff6b24 | ||
|
|
31ed159312 | ||
|
|
b3b9255c69 | ||
|
|
22cadcc884 | ||
|
|
df854a3bf0 | ||
|
|
5b58d71b61 | ||
|
|
fc0485c891 | ||
|
|
78a4cc9f84 | ||
|
|
29cf8a070d | ||
|
|
45c8b22ba7 | ||
|
|
d0cedde7c0 | ||
|
|
efc5bf5c51 | ||
|
|
24bd3ab367 | ||
|
|
954e710013 | ||
|
|
4b97110087 | ||
|
|
3d0b5d5f6c | ||
|
|
44aef6c707 | ||
|
|
8f61e2155c | ||
|
|
467471c9c3 | ||
|
|
423c99f3bd | ||
|
|
7f3cd2b9e8 | ||
|
|
12bd32babf | ||
|
|
3dabb7b8d8 | ||
|
|
10dd9344b8 | ||
|
|
3ad7b06c6f | ||
|
|
e157b47336 | ||
|
|
63dc87e7e3 | ||
|
|
2731e34db0 | ||
|
|
0d4299d99e | ||
|
|
bac7340c2a | ||
|
|
21a57903a9 | ||
|
|
39fcd8d513 | ||
|
|
371b88f9f8 | ||
|
|
a1168057a8 | ||
|
|
a38571bc64 | ||
|
|
79179fb65a | ||
|
|
27e6801e15 | ||
|
|
3dd592ae59 | ||
|
|
454302b3a1 | ||
|
|
3da4d660ec | ||
|
|
cb4778d6c4 | ||
|
|
d7a48ce086 | ||
|
|
ca1dcbf8da | ||
|
|
98bf0a3b6c | ||
|
|
70068ed5a1 | ||
|
|
db6825a33d | ||
|
|
f6d0627a77 | ||
|
|
50c23c44c5 | ||
|
|
ac74c6e0cb | ||
|
|
4861a40b9e | ||
|
|
0e49d186f5 | ||
|
|
13ac6f1c70 | ||
|
|
6164d92173 | ||
|
|
2f6a0c6f36 | ||
|
|
b2f1f46528 | ||
|
|
54af368084 | ||
|
|
0dbc14da02 | ||
|
|
60fdcae8e5 | ||
|
|
27ebdf09f0 | ||
|
|
6558fd5e03 | ||
|
|
5afcfbf3df | ||
|
|
b80bce520c | ||
|
|
cc078d6f6a | ||
|
|
a85c242e09 | ||
|
|
714e8788e8 | ||
|
|
bd4ffc5e1d | ||
|
|
95ef1d562e | ||
|
|
3fdaed97e3 | ||
|
|
f775a3e490 | ||
|
|
eba20a69f0 | ||
|
|
452be71d87 | ||
|
|
99df2bae64 | ||
|
|
834e4722a0 | ||
|
|
3b7d2dc319 | ||
|
|
e563687451 | ||
|
|
ab6284abf7 | ||
|
|
63b71df244 | ||
|
|
f8d39927ce | ||
|
|
f9dfb1bb85 | ||
|
|
1cc3066569 | ||
|
|
cee119eb4d | ||
|
|
269832aa85 | ||
|
|
74c8143825 | ||
|
|
bba332531b | ||
|
|
06876225c1 | ||
|
|
a26e2d5a33 | ||
|
|
cacb854d42 | ||
|
|
a387458fc6 | ||
|
|
b8f8c4c489 | ||
|
|
d8fe9e0463 | ||
|
|
0b68fa8b14 | ||
|
|
65455bc67e | ||
|
|
a4bcd37dae | ||
|
|
31072a0726 | ||
|
|
75227b3bac | ||
|
|
38f959890d | ||
|
|
77ef00e1a0 | ||
|
|
09a81d394c | ||
|
|
78e2dfbde8 | ||
|
|
3413dfd7ce | ||
|
|
371e6c9884 | ||
|
|
6398551ac3 | ||
|
|
beeeab869d | ||
|
|
408cb56ce1 | ||
|
|
029579be4d | ||
|
|
5ba2f03206 | ||
|
|
691b43bc48 | ||
|
|
3cc75893da | ||
|
|
3afd22c12c | ||
|
|
3bba7cd9dd | ||
|
|
0020814e18 | ||
|
|
8d2aa236b1 | ||
|
|
d695ce3ce5 | ||
|
|
ac1527ce43 | ||
|
|
9948a62557 | ||
|
|
75237e6a44 | ||
|
|
c17bdaf606 | ||
|
|
147f7ede98 | ||
|
|
5abd915678 | ||
|
|
64a66be475 | ||
|
|
71c72c7926 | ||
|
|
6d27a24fb8 | ||
|
|
2e2835ce6b | ||
|
|
664d8bcb23 | ||
|
|
4df129b01c | ||
|
|
32c2f8217d | ||
|
|
91d83d40b1 | ||
|
|
0cf11bb933 | ||
|
|
4155491719 | ||
|
|
8045a0d403 | ||
|
|
57a5857c1f | ||
|
|
632ac977ee | ||
|
|
247aa9e043 | ||
|
|
9f8491076f | ||
|
|
f4a34e0d7b | ||
|
|
b6626e42d8 | ||
|
|
26b70e2af8 | ||
|
|
586492e1b8 | ||
|
|
430649df81 | ||
|
|
3050aa98ab | ||
|
|
1e7e7e7997 | ||
|
|
235888cc3e | ||
|
|
0b1096c588 | ||
|
|
ad10000aca | ||
|
|
a6fe58e5b2 | ||
|
|
e492f9df4d | ||
|
|
350b2edb2b | ||
|
|
b70d240d3a | ||
|
|
6fbb65487c | ||
|
|
b497004516 | ||
|
|
a920bffd77 | ||
|
|
df7aeda761 | ||
|
|
2a8b11f48b | ||
|
|
c2a71c2f19 | ||
|
|
94ddb69311 | ||
|
|
27dce21870 | ||
|
|
e942452197 | ||
|
|
d93af07d31 | ||
|
|
3303b435ad | ||
|
|
03f237b32f | ||
|
|
cbc08861f4 | ||
|
|
df5f747975 | ||
|
|
02929ea4f5 | ||
|
|
ee409f1ee1 | ||
|
|
1d56948c4d | ||
|
|
8d4c8698de | ||
|
|
e72e723c1e | ||
|
|
68db3cd2ab | ||
|
|
a2d21f1042 | ||
|
|
c0965ad200 | ||
|
|
6530443e41 | ||
|
|
93a4bbdc20 | ||
|
|
92a40c87a5 | ||
|
|
d745863e54 | ||
|
|
717a3b1afa | ||
|
|
dd2876f484 | ||
|
|
10593d8172 | ||
|
|
7900c1b740 | ||
|
|
13c1986f02 | ||
|
|
76c7eb757b | ||
|
|
09d9c3a944 | ||
|
|
1e0b2bca4b | ||
|
|
9e78add245 | ||
|
|
143eeaa7b5 | ||
|
|
a622aa41d7 | ||
|
|
307f0e0823 | ||
|
|
04ff4b4c9c | ||
|
|
b04996d917 | ||
|
|
eae806390b | ||
|
|
96570e93b9 | ||
|
|
4ce7490b3b | ||
|
|
3848176990 | ||
|
|
02dd3f997f | ||
|
|
82212edba0 | ||
|
|
2ff40c4869 | ||
|
|
8c5f967f86 | ||
|
|
c3abcccf35 | ||
|
|
42495b36a3 | ||
|
|
2e9f64a7f7 | ||
|
|
72ebc723b7 | ||
|
|
b59785563f | ||
|
|
88b1aa465c | ||
|
|
1e82962b37 | ||
|
|
f2731b7263 | ||
|
|
f3dab3996d | ||
|
|
dd79918d2e | ||
|
|
c57f34b3eb | ||
|
|
19450df26b | ||
|
|
1a2dd1a812 | ||
|
|
1faf5b2199 | ||
|
|
d70998ac81 | ||
|
|
ab180aa385 | ||
|
|
b8788c9e7e | ||
|
|
452fac4099 | ||
|
|
97390a2af5 | ||
|
|
77df79871b | ||
|
|
f180e8452d | ||
|
|
5f3620e058 | ||
|
|
abcecb124d | ||
|
|
4a5f1aece1 | ||
|
|
10a40c4683 | ||
|
|
dabbdc8af9 | ||
|
|
72c236f651 | ||
|
|
36742a6fdb | ||
|
|
fee8bcc63c | ||
|
|
cf002bb0c0 | ||
|
|
425add976d | ||
|
|
5da128b0c7 | ||
|
|
20732c1e89 | ||
|
|
5c2276c73f | ||
|
|
f2dc80592e | ||
|
|
79dfede306 | ||
|
|
827a085c5e | ||
|
|
bf4408d6da | ||
|
|
a48f7ea48b | ||
|
|
b68c45ca93 | ||
|
|
adfbc6ca28 | ||
|
|
b3dbef1377 | ||
|
|
9e1b61e0f0 | ||
|
|
c056f6c895 | ||
|
|
ac1c62a07d | ||
|
|
93bcd46d55 | ||
|
|
a214977c83 | ||
|
|
01d3badc9b | ||
|
|
9884a2fc76 | ||
|
|
7a2b374526 | ||
|
|
92f81b3004 | ||
|
|
95e62ce30a | ||
|
|
3517eff4de | ||
|
|
8191c8fcea | ||
|
|
ed0af49767 | ||
|
|
adafe05caf | ||
|
|
da1e1b8d3b | ||
|
|
ef4ee2f9b0 | ||
|
|
f955076905 | ||
|
|
fefedb3866 | ||
|
|
7d229b55ee | ||
|
|
e277141c97 | ||
|
|
242fc1a4cb | ||
|
|
eeedef972a | ||
|
|
0e7b399ba8 | ||
|
|
eaa7d28823 | ||
|
|
b97289f7eb | ||
|
|
6005d80b20 | ||
|
|
55c676d6a5 | ||
|
|
b1c0185d85 | ||
|
|
ed8a847ae6 | ||
|
|
f3a28f38e2 | ||
|
|
ae684c3a82 | ||
|
|
3c171785d2 | ||
|
|
949b487445 | ||
|
|
d953e32003 | ||
|
|
c3c6723d7b | ||
|
|
bcfbc07bac | ||
|
|
0ba45f1006 | ||
|
|
13fc1b7169 | ||
|
|
ac11ff4cc9 | ||
|
|
a5c3e5aca7 | ||
|
|
f2ba3071fd | ||
|
|
c1584509e2 | ||
|
|
aa2eac4dcc | ||
|
|
3d8fbc8a61 | ||
|
|
43995a346d | ||
|
|
4ac142ce9e | ||
|
|
2849cc089d | ||
|
|
2627638192 | ||
|
|
43653242ed | ||
|
|
d486a30a6d | ||
|
|
80b5323fe2 | ||
|
|
41751a3625 | ||
|
|
eb68b52800 | ||
|
|
24cc1f5a5e | ||
|
|
9bcfc8141a | ||
|
|
776e45473c | ||
|
|
62d0013d41 | ||
|
|
3bf5d07fa2 | ||
|
|
597ff5ec11 | ||
|
|
a1b1915dfb | ||
|
|
56dfd2f093 | ||
|
|
8043d96d03 | ||
|
|
f88cd44d52 | ||
|
|
98ed395962 | ||
|
|
966ecf74f1 | ||
|
|
5cb34a6e82 | ||
|
|
16a74d5cc9 | ||
|
|
b3ce12c575 | ||
|
|
a159292173 | ||
|
|
93a3229c6d | ||
|
|
9122d2ab49 | ||
|
|
7cdc244d95 | ||
|
|
1366f44ada | ||
|
|
47e10dcf53 | ||
|
|
9b03f1b5a2 | ||
|
|
909145058f | ||
|
|
b008bfbc96 | ||
|
|
2f2c2d5910 | ||
|
|
8ac2087abc | ||
|
|
694a22a295 | ||
|
|
44497599f6 | ||
|
|
14f75b001c | ||
|
|
cca12d16e3 | ||
|
|
3a438d1084 | ||
|
|
2fe30b0837 | ||
|
|
e241ff09b0 | ||
|
|
e39183915b | ||
|
|
43f3e686c6 | ||
|
|
3b9ae9c498 | ||
|
|
f2ebf4b10a | ||
|
|
b9dc6a61ad | ||
|
|
03f928d4d9 | ||
|
|
8ac87dd5b2 | ||
|
|
c5e1e3c6df | ||
|
|
1372cc4242 | ||
|
|
6bcae91008 | ||
|
|
134a300861 | ||
|
|
8150e1a6a0 | ||
|
|
42eb5c4744 | ||
|
|
7653c5e0ff | ||
|
|
325f0e3486 | ||
|
|
cca53464df | ||
|
|
f28e909987 | ||
|
|
e25022ecc1 | ||
|
|
820828757a | ||
|
|
a40767a01d | ||
|
|
12c4b8fe98 | ||
|
|
627e5cf54e | ||
|
|
cc8449b67e | ||
|
|
280bc71c0c | ||
|
|
d2631fde2b | ||
|
|
c968abae08 | ||
|
|
b675161c79 | ||
|
|
0a04ab9924 | ||
|
|
cd65eaf6cb | ||
|
|
89293e80aa | ||
|
|
437ba872c1 | ||
|
|
8d04c20ed5 | ||
|
|
a2e519beeb | ||
|
|
37ab647895 | ||
|
|
0464ad729c | ||
|
|
7195666f09 | ||
|
|
1ab9e68f0f | ||
|
|
8553a8b6b9 | ||
|
|
0d371d4816 | ||
|
|
0082816f53 | ||
|
|
26745edeb5 | ||
|
|
394b93bbd2 | ||
|
|
2903f6a191 | ||
|
|
59bc86ff46 | ||
|
|
ed974cd9fe | ||
|
|
87a0479324 | ||
|
|
93a3bc5c4c | ||
|
|
30cbefc453 | ||
|
|
2613916d15 | ||
|
|
55dff6347a | ||
|
|
86ae20bfbb | ||
|
|
44141c5727 | ||
|
|
d6fc7f182f | ||
|
|
2200d86e8a | ||
|
|
1c140a563a | ||
|
|
c58a9530b1 | ||
|
|
eca450855e | ||
|
|
43087d6370 | ||
|
|
d10701f743 | ||
|
|
3955ccd85b | ||
|
|
50b2b9c591 | ||
|
|
32249ab897 | ||
|
|
e311837418 | ||
|
|
35d2908934 | ||
|
|
925daaeb63 | ||
|
|
a498669ad8 | ||
|
|
e3cdc44edc | ||
|
|
1d1b79b6cf | ||
|
|
1ccd804a40 | ||
|
|
6f6cf15674 | ||
|
|
a98472c1bb | ||
|
|
cc622f9ccc | ||
|
|
6ad6511762 | ||
|
|
fe76665687 | ||
|
|
2666641560 | ||
|
|
37be2afa98 | ||
|
|
b257d053f6 | ||
|
|
ce8bb8c349 | ||
|
|
9e2a8214a9 | ||
|
|
ae7b2f49b0 | ||
|
|
f5944fa138 | ||
|
|
6ef4219b2a | ||
|
|
3d4b7babb4 | ||
|
|
53a2ce64b4 | ||
|
|
e4e0ace9a9 | ||
|
|
5f72999a44 | ||
|
|
2aaaf9df05 | ||
|
|
e6e3cec3f1 | ||
|
|
65637a33d1 | ||
|
|
5c0ed25684 | ||
|
|
a867645e45 | ||
|
|
bcbb02b81e | ||
|
|
b54c3fb085 | ||
|
|
a0dedafc10 | ||
|
|
4bb88fa79b | ||
|
|
8fa7ddca6d | ||
|
|
b0c4cc77a7 | ||
|
|
c904005498 | ||
|
|
8fd7492840 | ||
|
|
59f4604eb6 | ||
|
|
2b120ded77 | ||
|
|
f062a78768 | ||
|
|
6e8c0f6c89 | ||
|
|
cd971ea91e | ||
|
|
63b5e48805 | ||
|
|
9d84c8f596 | ||
|
|
11bb981c99 | ||
|
|
2b2a7e907b | ||
|
|
93be22e596 | ||
|
|
57947d05e4 | ||
|
|
49cae68578 | ||
|
|
381574c1c9 | ||
|
|
ac47e05b93 | ||
|
|
72eedcdf14 | ||
|
|
1225b0c0fd | ||
|
|
9c5c404c71 | ||
|
|
4fc76a4dc3 | ||
|
|
410c603cbd | ||
|
|
09ba4cdde4 | ||
|
|
f1726cf815 | ||
|
|
1e69fdbb53 | ||
|
|
04b1ef83d2 | ||
|
|
25f5e34e66 | ||
|
|
ccd87381b0 | ||
|
|
a1fad00292 | ||
|
|
c9e34420e1 | ||
|
|
9977578393 | ||
|
|
48d30730fe | ||
|
|
f0b986318a | ||
|
|
3f3812c305 | ||
|
|
56d9b46d28 | ||
|
|
e3a7f143eb | ||
|
|
889f27d119 | ||
|
|
aa6e27b95d | ||
|
|
cdc3df3890 | ||
|
|
1b4da70ee7 | ||
|
|
19251770fd | ||
|
|
698c2a7682 | ||
|
|
136cf68e04 | ||
|
|
493eb47af3 | ||
|
|
539f9fc9d0 | ||
|
|
ecc8c80664 | ||
|
|
74313b1600 | ||
|
|
b7013f3389 | ||
|
|
e49287f957 | ||
|
|
80de4900df | ||
|
|
52f7f3a29a | ||
|
|
7b95093dc5 | ||
|
|
18a4876110 | ||
|
|
29c55b43f4 | ||
|
|
3df6e1fdbd | ||
|
|
5e2fc0ae11 | ||
|
|
33df4bb3df | ||
|
|
4a50198f6e | ||
|
|
fbda6bc514 | ||
|
|
3e5a01637b | ||
|
|
146b289c42 | ||
|
|
7de46fd2b4 | ||
|
|
bc12f48ac7 | ||
|
|
25c768a630 | ||
|
|
d1fd4b2b9c | ||
|
|
6551798e70 | ||
|
|
97d4902ce0 | ||
|
|
07f93cb76b | ||
|
|
3041d50461 | ||
|
|
9a3949247d | ||
|
|
fe0807cec5 | ||
|
|
e867629ac5 | ||
|
|
cfee6a59e7 | ||
|
|
cee9dbc41e | ||
|
|
a7bcb93d75 | ||
|
|
9daa4237dc | ||
|
|
99819643dd | ||
|
|
1a1262caf5 | ||
|
|
c6a468fdcb | ||
|
|
13f6adad4d | ||
|
|
0f572bc06e | ||
|
|
48090d9d2f | ||
|
|
73ce576c53 | ||
|
|
4cb7850b42 | ||
|
|
79b5095a3f | ||
|
|
cee9c87d9e | ||
|
|
8c7fe0a72c | ||
|
|
72bdfbe6ad | ||
|
|
2e268996b1 | ||
|
|
59a6a52acf | ||
|
|
10b7d336ba | ||
|
|
d7c8b87fb6 | ||
|
|
d872574ab5 | ||
|
|
e450672333 | ||
|
|
4f22194222 | ||
|
|
10d23e0e5f | ||
|
|
d9ee03df73 | ||
|
|
5e32925a94 | ||
|
|
8c3d36d1b2 | ||
|
|
6a73282e80 | ||
|
|
c10f2f4914 | ||
|
|
4255076c44 | ||
|
|
e927f47566 | ||
|
|
bb1642c95f | ||
|
|
df63e19190 | ||
|
|
e6d5d5e7de | ||
|
|
18acb3cb27 | ||
|
|
77088e226f | ||
|
|
e6cae33061 | ||
|
|
db335cdb8f | ||
|
|
310ee3e2dc | ||
|
|
112f16ea90 | ||
|
|
764dc5b253 | ||
|
|
99f6e2f8a7 | ||
|
|
542620a9af | ||
|
|
82db829888 | ||
|
|
57c5f92877 | ||
|
|
3d5f0de968 | ||
|
|
23b87aeb1f | ||
|
|
d384348308 | ||
|
|
a33f88e078 | ||
|
|
6c8e81edfa | ||
|
|
ea3d5585a8 | ||
|
|
58afc7fc0c | ||
|
|
db5f84114e | ||
|
|
608a3c4d89 | ||
|
|
515309b11b | ||
|
|
de41a3ee17 | ||
|
|
81f46ae06f | ||
|
|
ee4e4838cd | ||
|
|
098207351b | ||
|
|
8e0b3565a3 | ||
|
|
f1b7f58ddc | ||
|
|
b4c903f82b | ||
|
|
23e1e04cd7 | ||
|
|
15927ad775 | ||
|
|
308c1beb16 | ||
|
|
c4c915bcc4 | ||
|
|
8c28fda456 | ||
|
|
5dda5a5980 | ||
|
|
625adb8395 | ||
|
|
3149169953 | ||
|
|
a64a492886 | ||
|
|
7ee9b8b60a | ||
|
|
f7cb1a1d49 | ||
|
|
90e2c08542 | ||
|
|
94e32784e1 | ||
|
|
a58e564bb7 | ||
|
|
6e92b4d7ce | ||
|
|
e4c62b85f1 | ||
|
|
4610ee8b70 | ||
|
|
1a51276b3d | ||
|
|
f4ca780f16 | ||
|
|
9f44b4bf67 | ||
|
|
bde86574b8 | ||
|
|
1dba99b74a | ||
|
|
d9746ef847 | ||
|
|
a4f93e0231 | ||
|
|
fa7bc750f0 | ||
|
|
e3095acfc3 | ||
|
|
31a59be5e6 | ||
|
|
37c67e7de2 | ||
|
|
c3e8abe333 | ||
|
|
1d77ca0ef9 | ||
|
|
98d2433620 | ||
|
|
5dc5cfb906 | ||
|
|
0d30d33aa3 | ||
|
|
da1989c6e0 | ||
|
|
51c2864fa6 | ||
|
|
a7e4a8e120 | ||
|
|
90a3f44399 | ||
|
|
97d0d11a94 | ||
|
|
bfa9fc2553 | ||
|
|
78760beeea | ||
|
|
8aa706fd49 | ||
|
|
7ccd45dd87 | ||
|
|
1f5b276d19 | ||
|
|
7b52118457 | ||
|
|
ee4d86766a | ||
|
|
930c595ae5 | ||
|
|
6de401ab49 | ||
|
|
a54c3db00f | ||
|
|
de7b57c2cb | ||
|
|
972e65d02b | ||
|
|
338ce99c7c | ||
|
|
ac14a68937 | ||
|
|
462e1b645f | ||
|
|
4cd7184b5b | ||
|
|
8e7bf64397 | ||
|
|
bb331ec8a5 | ||
|
|
12fe71654d | ||
|
|
854bfdafef | ||
|
|
dd3410f2b8 | ||
|
|
93137cf24b | ||
|
|
b4d1a3a067 | ||
|
|
7ac6ca5546 | ||
|
|
72f95bb428 | ||
|
|
273900d806 | ||
|
|
948953eb33 | ||
|
|
1e50409ce5 | ||
|
|
554124570b | ||
|
|
5be3d08bd0 | ||
|
|
502cd5f7ca | ||
|
|
85bc868760 | ||
|
|
b6121f8b75 | ||
|
|
628dda2d8d | ||
|
|
8b6f45662e | ||
|
|
a2090a3250 | ||
|
|
c056ba70fa | ||
|
|
1ee0fa0805 | ||
|
|
9b7c14e656 | ||
|
|
bf20d25984 | ||
|
|
fdf9196d58 | ||
|
|
7c1ff3029b | ||
|
|
4ddd293f3d | ||
|
|
db3bfaa08e | ||
|
|
787c143949 | ||
|
|
4e7f9a041a | ||
|
|
68c4f7b912 | ||
|
|
daf8e1ee57 | ||
|
|
8dbe128e33 | ||
|
|
1859e92e86 | ||
|
|
aa56382207 | ||
|
|
a3f17fbadb | ||
|
|
64db5b53da | ||
|
|
ee42a9550d | ||
|
|
6a838279c6 | ||
|
|
c447a3087e | ||
|
|
851eb6b57d | ||
|
|
2f1624b71b | ||
|
|
c22ecae58a | ||
|
|
a21d13d4ed | ||
|
|
9788c44819 | ||
|
|
b7ebd770f7 | ||
|
|
47e54f201e | ||
|
|
bc7fd3e097 | ||
|
|
297c77d593 | ||
|
|
8a58ab79cd | ||
|
|
a9000a7e43 | ||
|
|
f0455ec6e3 | ||
|
|
bce11f8b58 | ||
|
|
6e855f25c9 | ||
|
|
98530da07c | ||
|
|
d38e37cdf7 | ||
|
|
7c6240f341 | ||
|
|
9398c4e6ff | ||
|
|
76c9e7fd23 | ||
|
|
b42c264494 | ||
|
|
ec58adb202 | ||
|
|
45dc72970e | ||
|
|
0357cb98cc | ||
|
|
8f0125c06c | ||
|
|
c4709b8560 | ||
|
|
0970125d25 | ||
|
|
9794b8ed1b | ||
|
|
4843b2b30a | ||
|
|
ae25d095f2 | ||
|
|
e917b842bd | ||
|
|
e74abeedd6 | ||
|
|
7c4da04be1 | ||
|
|
c5541ff5c3 | ||
|
|
0fe219206e | ||
|
|
8dcb2512d8 | ||
|
|
d3382091bc | ||
|
|
785395167f | ||
|
|
4af6b4ad21 | ||
|
|
fd20c37c8f | ||
|
|
c7f30f0516 | ||
|
|
3d17d364d5 | ||
|
|
6baa5d893d | ||
|
|
20bdf918ab | ||
|
|
66626508f0 | ||
|
|
8430afcdd7 | ||
|
|
b4fd952f03 | ||
|
|
4052da2ecd | ||
|
|
bc35aa4f45 | ||
|
|
f7eddbaf79 | ||
|
|
51dbbffc6d | ||
|
|
c0930d3f31 | ||
|
|
a0bfd17ec4 | ||
|
|
2ce51dc7b2 | ||
|
|
6c9c0e0812 | ||
|
|
e93ac75aed | ||
|
|
ee73a638ba | ||
|
|
def9d487ef | ||
|
|
a4c4213ac8 | ||
|
|
26adc429ee | ||
|
|
a6c4ebb173 | ||
|
|
6c09da6bda | ||
|
|
da5fa61414 | ||
|
|
bd1c151eaa | ||
|
|
f7d49225a4 | ||
|
|
605a035b86 | ||
|
|
2b9cf7755a | ||
|
|
0f822e5bfd | ||
|
|
08bccb90fc | ||
|
|
bfd97b3a51 | ||
|
|
6b38b7f541 | ||
|
|
0f18b09ce4 | ||
|
|
a065afc55c | ||
|
|
a77eedd18f | ||
|
|
f4511ec67f | ||
|
|
0271fa729f | ||
|
|
4bc3e9d97b | ||
|
|
02b7eda2a7 | ||
|
|
f52d4c88a7 | ||
|
|
b99e7c50d0 | ||
|
|
cfa0caeb48 | ||
|
|
74e4e07da1 | ||
|
|
81b017a118 | ||
|
|
5abd03638b | ||
|
|
6997bb1b8e | ||
|
|
6c074111be | ||
|
|
b15350075c | ||
|
|
718f36caa3 | ||
|
|
fd597d5174 | ||
|
|
d2ed2217c7 | ||
|
|
81a99eb923 | ||
|
|
f6f35f221d | ||
|
|
e979895006 | ||
|
|
ae1e349647 | ||
|
|
87a2191dba | ||
|
|
b2b55e6412 | ||
|
|
59e01860d1 | ||
|
|
c773d9e6cc | ||
|
|
7002dc5576 | ||
|
|
56d586e449 | ||
|
|
d4b55a9b87 | ||
|
|
b6bbecce82 | ||
|
|
7e06a9cc2e | ||
|
|
6825bb69d9 | ||
|
|
17fb8ffd64 | ||
|
|
355301df67 | ||
|
|
c869721cca | ||
|
|
b20e12f63c | ||
|
|
41c1112c23 | ||
|
|
a644568299 | ||
|
|
45ecb0cd29 | ||
|
|
8a29052708 | ||
|
|
5ef50b7599 | ||
|
|
d48ad48e0e | ||
|
|
0adee465cc | ||
|
|
19a9ebb8a0 | ||
|
|
c21474545c | ||
|
|
8f04aeff73 | ||
|
|
e7ba0057d5 | ||
|
|
b960ecec4a | ||
|
|
c39f6f3ee5 | ||
|
|
d02097dd3d | ||
|
|
8c6eeb8b42 | ||
|
|
5b561a246c | ||
|
|
7e68a303a8 | ||
|
|
2eb5e622fb | ||
|
|
a7a7623203 | ||
|
|
5346434a2b | ||
|
|
528ed53624 | ||
|
|
4d6ee11578 | ||
|
|
1094abdd84 | ||
|
|
52751fe6e6 | ||
|
|
9314ab0ce7 | ||
|
|
aeef74372c | ||
|
|
490828caf2 | ||
|
|
a97266df06 | ||
|
|
c849cd043c | ||
|
|
6b3a81bb4d | ||
|
|
c85bb1dc24 | ||
|
|
02a913f2a0 | ||
|
|
fc292e1c0a | ||
|
|
59121c8426 | ||
|
|
97af74da0b | ||
|
|
4b2aef4596 | ||
|
|
589c20de4f | ||
|
|
511f475bdd | ||
|
|
6e1e3ac37d | ||
|
|
e78a8b69f3 | ||
|
|
0fa9e89b61 | ||
|
|
be5f4f6e8b | ||
|
|
6db990f7a4 | ||
|
|
5b39b0ff48 | ||
|
|
376c8869b7 | ||
|
|
f5b3e92e8a | ||
|
|
eaf95a24c3 | ||
|
|
31b06efc56 | ||
|
|
c1c2a2dce2 | ||
|
|
765cfd2d05 | ||
|
|
1c1957ba05 | ||
|
|
6a9d2ea5eb | ||
|
|
7da8d5a0be | ||
|
|
b9cf37d815 | ||
|
|
a8399ef1c2 | ||
|
|
9875a00221 | ||
|
|
e1ff8c5228 | ||
|
|
b47f397a26 | ||
|
|
51d31fe7cd | ||
|
|
3c00fda61c | ||
|
|
78a386ff41 | ||
|
|
5954b77a25 | ||
|
|
8e26e1f646 | ||
|
|
ed2b3590a4 | ||
|
|
55fb9e0189 | ||
|
|
8ba71ee6ac | ||
|
|
a914c2b6d3 | ||
|
|
b46b7ada11 | ||
|
|
30c6138323 |
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
||||
[*.scss]
|
||||
indent_size = 2
|
||||
|
||||
[*.php]
|
||||
insert_final_newline = true
|
||||
14
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
### 1. 该问题的重现步骤是什么?
|
||||
|
||||
### 2. 你期待的结果是什么?实际看到的又是什么?
|
||||
|
||||
### 3. 问题出现的环境
|
||||
|
||||
- 操作系统版本:
|
||||
- Apache/NGINX 版本:
|
||||
- 数据库版本:
|
||||
- PHP 版本:
|
||||
- Typecho 版本:
|
||||
- 浏览器版本:
|
||||
|
||||
[//]: # (如有图片请附上截图)
|
||||
58
.github/workflows/Typecho-dev-Ci.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Typecho Dev Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
php:
|
||||
name: PHP ${{ matrix.php }} Tests
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci')"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: ['7.2', '7.3', '7.4', '8.0']
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup PHP only
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
- name: Test
|
||||
run: |
|
||||
find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )
|
||||
build:
|
||||
name: Typecho Build
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci') && github.event_name != 'pull_request'"
|
||||
needs:
|
||||
- php
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cp -r LICENSE.txt index.php install.php admin install usr var build/
|
||||
mkdir build/usr/uploads/
|
||||
chmod 777 build/usr/uploads/
|
||||
touch build/usr/uploads/empty
|
||||
rm -rf build/admin/src
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: typecho
|
||||
path: ./build/
|
||||
- name: Trigger build
|
||||
run: |
|
||||
curl -XPOST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
-H "Content-Type: application/json" \
|
||||
https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}'
|
||||
|
||||
39
.github/workflows/Typecho-release-Ci.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Typecho Build Release Ci
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cp -r LICENSE.txt index.php install.php admin install usr var build/
|
||||
mkdir build/usr/uploads/
|
||||
chmod 777 build/usr/uploads/
|
||||
rm -rf build/admin/src
|
||||
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./typecho.zip
|
||||
asset_name: typecho.zip
|
||||
asset_content_type: application/zip
|
||||
11
.gitignore
vendored
@@ -2,7 +2,6 @@
|
||||
.*.swo
|
||||
._*
|
||||
.DS_Store
|
||||
/Debug/
|
||||
/ImgCache/
|
||||
/Backup_rar/
|
||||
/Debug/
|
||||
@@ -18,9 +17,19 @@
|
||||
*.exp
|
||||
*.pdb
|
||||
*.rar
|
||||
*.mo
|
||||
*.po
|
||||
*.pot
|
||||
.smbdelete*
|
||||
*.sublime*
|
||||
.sass-cache
|
||||
config.rb
|
||||
/config.inc.php
|
||||
/usr/uploads/
|
||||
/usr/*.db
|
||||
/usr/plugins/
|
||||
!/usr/plugins/HelloWorld
|
||||
/usr/themes/
|
||||
!/usr/themes/default
|
||||
node_modules/
|
||||
/tools/tmp/
|
||||
|
||||
0
.gitmodules
vendored
Normal file
48
.phpstorm.meta.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace PHPSTORM_META {
|
||||
override(\Typecho\Widget::widget(0), map([
|
||||
'' => '@'
|
||||
]));
|
||||
|
||||
exitPoint(\Typecho\Widget\Response::redirect());
|
||||
exitPoint(\Typecho\Widget\Response::throwContent());
|
||||
exitPoint(\Typecho\Widget\Response::throwFile());
|
||||
exitPoint(\Typecho\Widget\Response::throwJson());
|
||||
exitPoint(\Typecho\Widget\Response::throwXml());
|
||||
exitPoint(\Typecho\Widget\Response::goBack());
|
||||
|
||||
override(\Widget\Options::__get(0), map([
|
||||
'feedUrl' => string,
|
||||
'feedRssUrl' => string,
|
||||
'feedAtomUrl' => string,
|
||||
'commentsFeedUrl' => string,
|
||||
'commentsFeedRssUrl' => string,
|
||||
'commentsFeedAtomUrl' => string,
|
||||
'xmlRpcUrl' => string,
|
||||
'index' => string,
|
||||
'siteUrl' => string,
|
||||
'routingTable' => \ArrayObject::class,
|
||||
'rootUrl' => string,
|
||||
'themeUrl' => string,
|
||||
'pluginUrl' => string,
|
||||
'adminUrl' => string,
|
||||
'loginUrl' => string,
|
||||
'loginAction' => string,
|
||||
'registerUrl' => string,
|
||||
'registerAction' => string,
|
||||
'profileUrl' => string,
|
||||
'logoutUrl' => string,
|
||||
'serverTimezone' => int,
|
||||
'contentType' => string,
|
||||
'software' => string,
|
||||
'version' => string,
|
||||
'markdown' => int,
|
||||
'allowedAttachmentTypes'=> \ArrayObject::class
|
||||
]));
|
||||
|
||||
override(\Typecho\Widget::__get(0), map([
|
||||
'sequence' => int,
|
||||
'length' => int
|
||||
]));
|
||||
}
|
||||
@@ -1,282 +1,282 @@
|
||||
The GNU General Public License (GPL)
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
The GNU General Public License (GPL)
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
19
README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
Typecho Blogging Platform
|
||||
=========================
|
||||
|
||||
Typecho is a PHP Blogging Platform. Simple and Powerful.
|
||||
|
||||
#### Telegram Channel
|
||||
https://t.me/typechodev
|
||||
|
||||
#### Homepage
|
||||
http://typecho.org/
|
||||
|
||||
#### Documents
|
||||
http://docs.typecho.org/
|
||||
|
||||
#### Community
|
||||
http://forum.typecho.org/
|
||||
|
||||
#### Download
|
||||
http://typecho.org/download
|
||||
106
admin/backup.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$actionUrl = $security->getTokenUrl(
|
||||
\Typecho\Router::url('do', array('action' => 'backup', 'widget' => 'Backup'),
|
||||
\Typecho\Common::url('index.php', $options->rootUrl)));
|
||||
|
||||
$backupFiles = \Widget\Backup::alloc()->listFiles();
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 col-tb-8">
|
||||
<div id="typecho-welcome">
|
||||
<form action="<?php echo $actionUrl; ?>" method="post">
|
||||
<h3><?php _e('备份您的数据'); ?></h3>
|
||||
<ul>
|
||||
<li><?php _e('此备份操作仅包含<strong>内容数据</strong>, 并不会涉及任何<strong>设置信息</strong>'); ?></li>
|
||||
<li><?php _e('如果您的数据量过大, 为了避免操作超时, 建议您直接使用数据库提供的备份工具备份数据'); ?></li>
|
||||
<li><strong class="warning"><?php _e('为了缩小备份文件体积, 建议您在备份前删除不必要的数据'); ?></strong></li>
|
||||
</ul>
|
||||
<p><button class="btn primary" type="submit"><?php _e('开始备份 »'); ?></button></p>
|
||||
<input tabindex="1" type="hidden" name="do" value="export">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="backup-secondary" class="col-mb-12 col-tb-4" role="form">
|
||||
<h3><?php _e('恢复数据'); ?></h3>
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
<li class="active w-50"><a href="#from-upload"><?php _e('上传'); ?></a></li>
|
||||
<li class="w-50"><a href="#from-server"><?php _e('从服务器'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<form action="<?php echo $actionUrl; ?>" id="from-upload" class="tab-content" method="post" enctype="multipart/form-data">
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<input tabindex="2" id="backup-upload-file" name="file" type="file" class="file">
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option typecho-option-submit">
|
||||
<li>
|
||||
<button tabindex="4" type="submit" class="btn primary"><?php _e('上传并恢复 »'); ?></button>
|
||||
<input type="hidden" name="do" value="import">
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<form action="<?php echo $actionUrl; ?>" id="from-server" class="tab-content hidden" method="post">
|
||||
<?php if (empty($backupFiles)): ?>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<p class="description"><?php _e('将备份文件手动上传至服务器的 %s 目录下后, 这里会出现文件选项', __TYPECHO_BACKUP_DIR__); ?></p>
|
||||
</li>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="backup-select-file"><?php _e('选择一个备份文件恢复数据'); ?></label>
|
||||
<select tabindex="5" name="file" id="backup-select-file">
|
||||
<?php foreach ($backupFiles as $file): ?>
|
||||
<option value="<?php echo $file; ?>"><?php echo $file; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<ul class="typecho-option typecho-option-submit">
|
||||
<li>
|
||||
<button tabindex="7" type="submit" class="btn primary"><?php _e('选择并恢复 »'); ?></button>
|
||||
<input type="hidden" name="do" value="import">
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
include 'common-js.php';
|
||||
?>
|
||||
<script>
|
||||
$('#backup-secondary .typecho-option-tabs li').click(function() {
|
||||
$('#backup-secondary .typecho-option-tabs li').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$(this).parents('#backup-secondary').find('.tab-content').addClass('hidden');
|
||||
|
||||
var selected_tab = $(this).find('a').attr('href');
|
||||
$(selected_tab).removeClass('hidden');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#backup-secondary form').submit(function (e) {
|
||||
if (!confirm('<?php _e('恢复操作将清除所有现有数据, 是否继续?'); ?>')) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
23
admin/category.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-6 col-tb-offset-3">
|
||||
<?php \Widget\Metas\Category\Edit::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
include 'common-js.php';
|
||||
include 'form-js.php';
|
||||
include 'footer.php';
|
||||
?>
|
||||
@@ -1,20 +1,19 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<script src="<?php $options->adminUrl('js/jquery.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminUrl('js/jquery-ui.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminUrl('js/typecho.js?v=' . $suffixVersion); ?>"></script>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'jquery.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'jquery-ui.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'typecho.js'); ?>"></script>
|
||||
<script>
|
||||
(function () {
|
||||
$(document).ready(function() {
|
||||
// 处理消息机制
|
||||
(function () {
|
||||
var prefix = '<?php echo Typecho_Cookie::getPrefix(); ?>',
|
||||
var prefix = '<?php echo \Typecho\Cookie::getPrefix(); ?>',
|
||||
cookies = {
|
||||
notice : $.cookie(prefix + '__typecho_notice'),
|
||||
noticeType : $.cookie(prefix + '__typecho_notice_type'),
|
||||
highlight : $.cookie(prefix + '__typecho_notice_highlight')
|
||||
},
|
||||
path = '<?php $parts = parse_url($options->siteUrl);
|
||||
echo empty($parts['path']) ? '/' : $parts['path']; ?>';
|
||||
path = '<?php echo \Typecho\Cookie::getPath(); ?>';
|
||||
|
||||
if (!!cookies.notice && 'success|notice|error'.indexOf(cookies.noticeType) >= 0) {
|
||||
var head = $('.typecho-head-nav'),
|
||||
@@ -59,7 +58,7 @@
|
||||
}
|
||||
|
||||
t.effect('highlight', {color : color})
|
||||
.delay(5000).slideUp(function () {
|
||||
.delay(5000).fadeOut(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
@@ -75,19 +74,54 @@
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
// 导航菜单 tab 聚焦时展开下拉菜单
|
||||
const menuBar = $('.menu-bar').click(function () {
|
||||
const nav = $(this).next('#typecho-nav-list');
|
||||
if (!$(this).toggleClass('focus').hasClass('focus')) {
|
||||
nav.removeClass('expanded noexpanded');
|
||||
}
|
||||
});
|
||||
|
||||
$('.main, .typecho-foot').on('click touchstart', function () {
|
||||
if (menuBar.hasClass('focus')) {
|
||||
menuBar.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$('#typecho-nav-list ul.root').each(function () {
|
||||
const ul = $(this), nav = ul.parent();
|
||||
|
||||
ul.on('click touchend', '.parent a', function (e) {
|
||||
nav.removeClass('noexpanded').addClass('expanded');
|
||||
if ($(window).width() < 576 && e.type == 'click') {
|
||||
return false;
|
||||
}
|
||||
}).find('.child')
|
||||
.append($('<li class="return"><a><?php _e('返回'); ?></a></li>').click(function () {
|
||||
nav.removeClass('expanded').addClass('noexpanded');
|
||||
return false;
|
||||
}));
|
||||
});
|
||||
|
||||
if ($('.typecho-login').length == 0) {
|
||||
$('a').each(function () {
|
||||
var t = $(this), href = t.attr('href');
|
||||
|
||||
if ((href.length > 1 && href[0] == '#')
|
||||
if ((href && href[0] == '#')
|
||||
|| /^<?php echo preg_quote($options->adminUrl, '/'); ?>.*$/.exec(href)
|
||||
|| /^<?php echo substr(preg_quote(Typecho_Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
|
||||
|| /^<?php echo substr(preg_quote(\Typecho\Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
|
||||
return;
|
||||
}
|
||||
|
||||
t.attr('target', '_blank');
|
||||
t.attr('target', '_blank')
|
||||
.attr('rel', 'noopener noreferrer');
|
||||
});
|
||||
}
|
||||
|
||||
$('.main form').submit(function () {
|
||||
$('button[type=submit]', this).attr('disabled', 'disabled');
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -3,21 +3,24 @@ if (!defined('__DIR__')) {
|
||||
define('__DIR__', dirname(__FILE__));
|
||||
}
|
||||
|
||||
define('__TYPECHO_ADMIN__', true);
|
||||
|
||||
/** 载入配置文件 */
|
||||
if (!@include_once __DIR__ . '/../config.inc.php') {
|
||||
if (!defined('__TYPECHO_ROOT_DIR__') && !@include_once __DIR__ . '/../config.inc.php') {
|
||||
file_exists(__DIR__ . '/../install.php') ? header('Location: ../install.php') : print('Missing Config File');
|
||||
exit;
|
||||
}
|
||||
|
||||
/** 初始化组件 */
|
||||
Typecho_Widget::widget('Widget_Init');
|
||||
\Widget\Init::alloc();
|
||||
|
||||
/** 注册一个初始化插件 */
|
||||
Typecho_Plugin::factory('admin/common.php')->begin();
|
||||
\Typecho\Plugin::factory('admin/common.php')->begin();
|
||||
|
||||
Typecho_Widget::widget('Widget_Options')->to($options);
|
||||
Typecho_Widget::widget('Widget_User')->to($user);
|
||||
Typecho_Widget::widget('Widget_Menu')->to($menu);
|
||||
\Widget\Options::alloc()->to($options);
|
||||
\Widget\User::alloc()->to($user);
|
||||
\Widget\Security::alloc()->to($security);
|
||||
\Widget\Menu::alloc()->to($menu);
|
||||
|
||||
/** 初始化上下文 */
|
||||
$request = $options->request;
|
||||
@@ -25,32 +28,27 @@ $response = $options->response;
|
||||
|
||||
/** 检测是否是第一次登录 */
|
||||
$currentMenu = $menu->getCurrentMenu();
|
||||
list($prefixVersion, $suffixVersion) = explode('/', $options->version);
|
||||
$params = parse_url($currentMenu[2]);
|
||||
$adminFile = basename($params['path']);
|
||||
|
||||
if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($currentMenu)) {
|
||||
|
||||
if ('welcome.php' != $adminFile) {
|
||||
$response->redirect(Typecho_Common::url('welcome.php', $options->adminUrl));
|
||||
} else {
|
||||
Typecho_Cookie::set('__typecho_first_run', 1);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!empty($currentMenu)) {
|
||||
$params = parse_url($currentMenu[2]);
|
||||
$adminFile = basename($params['path']);
|
||||
|
||||
/** 检测版本是否升级 */
|
||||
if ($user->pass('administrator', true) && !empty($currentMenu)) {
|
||||
$mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION),
|
||||
str_replace('/', '.', $options->version), '>'));
|
||||
if (!$user->logged && !\Typecho\Cookie::get('__typecho_first_run')) {
|
||||
if ('welcome.php' != $adminFile) {
|
||||
$response->redirect(\Typecho\Common::url('welcome.php', $options->adminUrl));
|
||||
} else {
|
||||
\Typecho\Cookie::set('__typecho_first_run', 1);
|
||||
}
|
||||
} elseif ($user->pass('administrator', true)) {
|
||||
/** 检测版本是否升级 */
|
||||
$mustUpgrade = version_compare(\Typecho\Common::VERSION, $options->version, '>');
|
||||
|
||||
if ($mustUpgrade && 'upgrade.php' != $adminFile) {
|
||||
$response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl));
|
||||
} else if (!$mustUpgrade && 'upgrade.php' == $adminFile) {
|
||||
if ($mustUpgrade && 'upgrade.php' != $adminFile && 'backup.php' != $adminFile) {
|
||||
$response->redirect(\Typecho\Common::url('upgrade.php', $options->adminUrl));
|
||||
} elseif (!$mustUpgrade && 'upgrade.php' == $adminFile) {
|
||||
$response->redirect($options->adminUrl);
|
||||
} else if (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) {
|
||||
} elseif (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) {
|
||||
$response->redirect($options->adminUrl);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<div class="typecho-foot" role="contentinfo">
|
||||
<div class="copyright">
|
||||
<?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s (%s)', $options->software, $prefixVersion, $suffixVersion); ?>
|
||||
<a href="http://typecho.org" class="i-logo-s">Typecho</a>
|
||||
<p><?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s', $options->software, $options->version); ?></p>
|
||||
</div>
|
||||
<nav class="resource">
|
||||
<a href="http://docs.typecho.org"><?php _e('帮助文档'); ?></a> •
|
||||
<a href="http://forum.typecho.org"><?php _e('支持论坛'); ?></a> •
|
||||
<a href="https://github.com/typecho/typecho-replica/issues"><?php _e('报告错误'); ?></a> •
|
||||
<a href="https://github.com/typecho/typecho/issues"><?php _e('报告错误'); ?></a> •
|
||||
<a href="http://extends.typecho.org"><?php _e('资源下载'); ?></a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,563 +1,211 @@
|
||||
/*
|
||||
* Bento Grid System
|
||||
* Source: https://github.com/fenbox/bento
|
||||
* Version: 1.2.7
|
||||
* Update: 2013.11.15
|
||||
*/
|
||||
.colgroup [class*="col-"] {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.colgroup [class*="push-"],
|
||||
.colgroup [class*="pull-"] {
|
||||
position: relative; }
|
||||
|
||||
/*
|
||||
* Mobile and up
|
||||
*/
|
||||
.col-mb-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
.col-mb-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
.col-mb-3 {
|
||||
width: 25%; }
|
||||
|
||||
.col-mb-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
.col-mb-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
.col-mb-6 {
|
||||
width: 50%; }
|
||||
|
||||
.col-mb-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
.col-mb-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
.col-mb-9 {
|
||||
width: 75%; }
|
||||
|
||||
.col-mb-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
.col-mb-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
.col-mb-12 {
|
||||
width: 100%; }
|
||||
|
||||
/*
|
||||
* Tablet and up
|
||||
*/
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 728px; }
|
||||
|
||||
.col-tb-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
.col-tb-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
.col-tb-3 {
|
||||
width: 25%; }
|
||||
|
||||
.col-tb-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
.col-tb-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
.col-tb-6 {
|
||||
width: 50%; }
|
||||
|
||||
.col-tb-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
.col-tb-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
.col-tb-9 {
|
||||
width: 75%; }
|
||||
|
||||
.col-tb-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
.col-tb-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
.col-tb-12 {
|
||||
width: 100%; }
|
||||
|
||||
.col-tb-offset-0 {
|
||||
margin-left: 0%; }
|
||||
|
||||
.col-tb-offset-1 {
|
||||
margin-left: 8.33333%; }
|
||||
|
||||
.col-tb-offset-2 {
|
||||
margin-left: 16.66667%; }
|
||||
|
||||
.col-tb-offset-3 {
|
||||
margin-left: 25%; }
|
||||
|
||||
.col-tb-offset-4 {
|
||||
margin-left: 33.33333%; }
|
||||
|
||||
.col-tb-offset-5 {
|
||||
margin-left: 41.66667%; }
|
||||
|
||||
.col-tb-offset-6 {
|
||||
margin-left: 50%; }
|
||||
|
||||
.col-tb-offset-7 {
|
||||
margin-left: 58.33333%; }
|
||||
|
||||
.col-tb-offset-8 {
|
||||
margin-left: 66.66667%; }
|
||||
|
||||
.col-tb-offset-9 {
|
||||
margin-left: 75%; }
|
||||
|
||||
.col-tb-offset-10 {
|
||||
margin-left: 83.33333%; }
|
||||
|
||||
.col-tb-offset-11 {
|
||||
margin-left: 91.66667%; }
|
||||
|
||||
.col-tb-offset-12 {
|
||||
margin-left: 100%; }
|
||||
|
||||
.col-tb-pull-0 {
|
||||
right: 0%; }
|
||||
|
||||
.col-tb-pull-1 {
|
||||
right: 8.33333%; }
|
||||
|
||||
.col-tb-pull-2 {
|
||||
right: 16.66667%; }
|
||||
|
||||
.col-tb-pull-3 {
|
||||
right: 25%; }
|
||||
|
||||
.col-tb-pull-4 {
|
||||
right: 33.33333%; }
|
||||
|
||||
.col-tb-pull-5 {
|
||||
right: 41.66667%; }
|
||||
|
||||
.col-tb-pull-6 {
|
||||
right: 50%; }
|
||||
|
||||
.col-tb-pull-7 {
|
||||
right: 58.33333%; }
|
||||
|
||||
.col-tb-pull-8 {
|
||||
right: 66.66667%; }
|
||||
|
||||
.col-tb-pull-9 {
|
||||
right: 75%; }
|
||||
|
||||
.col-tb-pull-10 {
|
||||
right: 83.33333%; }
|
||||
|
||||
.col-tb-pull-11 {
|
||||
right: 91.66667%; }
|
||||
|
||||
.col-tb-pull-12 {
|
||||
right: 100%; }
|
||||
|
||||
.col-tb-push-0 {
|
||||
left: 0%; }
|
||||
|
||||
.col-tb-push-1 {
|
||||
left: 8.33333%; }
|
||||
|
||||
.col-tb-push-2 {
|
||||
left: 16.66667%; }
|
||||
|
||||
.col-tb-push-3 {
|
||||
left: 25%; }
|
||||
|
||||
.col-tb-push-4 {
|
||||
left: 33.33333%; }
|
||||
|
||||
.col-tb-push-5 {
|
||||
left: 41.66667%; }
|
||||
|
||||
.col-tb-push-6 {
|
||||
left: 50%; }
|
||||
|
||||
.col-tb-push-7 {
|
||||
left: 58.33333%; }
|
||||
|
||||
.col-tb-push-8 {
|
||||
left: 66.66667%; }
|
||||
|
||||
.col-tb-push-9 {
|
||||
left: 75%; }
|
||||
|
||||
.col-tb-push-10 {
|
||||
left: 83.33333%; }
|
||||
|
||||
.col-tb-push-11 {
|
||||
left: 91.66667%; }
|
||||
|
||||
.col-tb-push-12 {
|
||||
left: 100%; }
|
||||
|
||||
.colgroup {
|
||||
margin-right: -10px;
|
||||
margin-left: -10px; } }
|
||||
/*
|
||||
* Desktop and up
|
||||
*/
|
||||
@media (min-width: 992px) {
|
||||
.container {
|
||||
max-width: 952px; }
|
||||
|
||||
.col-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
.col-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
.col-3 {
|
||||
width: 25%; }
|
||||
|
||||
.col-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
.col-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
.col-6 {
|
||||
width: 50%; }
|
||||
|
||||
.col-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
.col-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
.col-9 {
|
||||
width: 75%; }
|
||||
|
||||
.col-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
.col-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
.col-12 {
|
||||
width: 100%; }
|
||||
|
||||
.col-offset-0 {
|
||||
margin-left: 0%; }
|
||||
|
||||
.col-offset-1 {
|
||||
margin-left: 8.33333%; }
|
||||
|
||||
.col-offset-2 {
|
||||
margin-left: 16.66667%; }
|
||||
|
||||
.col-offset-3 {
|
||||
margin-left: 25%; }
|
||||
|
||||
.col-offset-4 {
|
||||
margin-left: 33.33333%; }
|
||||
|
||||
.col-offset-5 {
|
||||
margin-left: 41.66667%; }
|
||||
|
||||
.col-offset-6 {
|
||||
margin-left: 50%; }
|
||||
|
||||
.col-offset-7 {
|
||||
margin-left: 58.33333%; }
|
||||
|
||||
.col-offset-8 {
|
||||
margin-left: 66.66667%; }
|
||||
|
||||
.col-offset-9 {
|
||||
margin-left: 75%; }
|
||||
|
||||
.col-offset-10 {
|
||||
margin-left: 83.33333%; }
|
||||
|
||||
.col-offset-11 {
|
||||
margin-left: 91.66667%; }
|
||||
|
||||
.col-offset-12 {
|
||||
margin-left: 100%; }
|
||||
|
||||
.col-pull-0 {
|
||||
right: 0%; }
|
||||
|
||||
.col-pull-1 {
|
||||
right: 8.33333%; }
|
||||
|
||||
.col-pull-2 {
|
||||
right: 16.66667%; }
|
||||
|
||||
.col-pull-3 {
|
||||
right: 25%; }
|
||||
|
||||
.col-pull-4 {
|
||||
right: 33.33333%; }
|
||||
|
||||
.col-pull-5 {
|
||||
right: 41.66667%; }
|
||||
|
||||
.col-pull-6 {
|
||||
right: 50%; }
|
||||
|
||||
.col-pull-7 {
|
||||
right: 58.33333%; }
|
||||
|
||||
.col-pull-8 {
|
||||
right: 66.66667%; }
|
||||
|
||||
.col-pull-9 {
|
||||
right: 75%; }
|
||||
|
||||
.col-pull-10 {
|
||||
right: 83.33333%; }
|
||||
|
||||
.col-pull-11 {
|
||||
right: 91.66667%; }
|
||||
|
||||
.col-pull-12 {
|
||||
right: 100%; }
|
||||
|
||||
.col-push-0 {
|
||||
left: 0%; }
|
||||
|
||||
.col-push-1 {
|
||||
left: 8.33333%; }
|
||||
|
||||
.col-push-2 {
|
||||
left: 16.66667%; }
|
||||
|
||||
.col-push-3 {
|
||||
left: 25%; }
|
||||
|
||||
.col-push-4 {
|
||||
left: 33.33333%; }
|
||||
|
||||
.col-push-5 {
|
||||
left: 41.66667%; }
|
||||
|
||||
.col-push-6 {
|
||||
left: 50%; }
|
||||
|
||||
.col-push-7 {
|
||||
left: 58.33333%; }
|
||||
|
||||
.col-push-8 {
|
||||
left: 66.66667%; }
|
||||
|
||||
.col-push-9 {
|
||||
left: 75%; }
|
||||
|
||||
.col-push-10 {
|
||||
left: 83.33333%; }
|
||||
|
||||
.col-push-11 {
|
||||
left: 91.66667%; }
|
||||
|
||||
.col-push-12 {
|
||||
left: 100%; } }
|
||||
/*
|
||||
* Widescreen and up
|
||||
*/
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
max-width: 1160px; }
|
||||
|
||||
.col-wd-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
.col-wd-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
.col-wd-3 {
|
||||
width: 25%; }
|
||||
|
||||
.col-wd-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
.col-wd-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
.col-wd-6 {
|
||||
width: 50%; }
|
||||
|
||||
.col-wd-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
.col-wd-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
.col-wd-9 {
|
||||
width: 75%; }
|
||||
|
||||
.col-wd-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
.col-wd-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
.col-wd-12 {
|
||||
width: 100%; }
|
||||
|
||||
.col-wd-offset-0 {
|
||||
margin-left: 0%; }
|
||||
|
||||
.col-wd-offset-1 {
|
||||
margin-left: 8.33333%; }
|
||||
|
||||
.col-wd-offset-2 {
|
||||
margin-left: 16.66667%; }
|
||||
|
||||
.col-wd-offset-3 {
|
||||
margin-left: 25%; }
|
||||
|
||||
.col-wd-offset-4 {
|
||||
margin-left: 33.33333%; }
|
||||
|
||||
.col-wd-offset-5 {
|
||||
margin-left: 41.66667%; }
|
||||
|
||||
.col-wd-offset-6 {
|
||||
margin-left: 50%; }
|
||||
|
||||
.col-wd-offset-7 {
|
||||
margin-left: 58.33333%; }
|
||||
|
||||
.col-wd-offset-8 {
|
||||
margin-left: 66.66667%; }
|
||||
|
||||
.col-wd-offset-9 {
|
||||
margin-left: 75%; }
|
||||
|
||||
.col-wd-offset-10 {
|
||||
margin-left: 83.33333%; }
|
||||
|
||||
.col-wd-offset-11 {
|
||||
margin-left: 91.66667%; }
|
||||
|
||||
.col-wd-offset-12 {
|
||||
margin-left: 100%; }
|
||||
|
||||
.col-wd-pull-0 {
|
||||
right: 0%; }
|
||||
|
||||
.col-wd-pull-1 {
|
||||
right: 8.33333%; }
|
||||
|
||||
.col-wd-pull-2 {
|
||||
right: 16.66667%; }
|
||||
|
||||
.col-wd-pull-3 {
|
||||
right: 25%; }
|
||||
|
||||
.col-wd-pull-4 {
|
||||
right: 33.33333%; }
|
||||
|
||||
.col-wd-pull-5 {
|
||||
right: 41.66667%; }
|
||||
|
||||
.col-wd-pull-6 {
|
||||
right: 50%; }
|
||||
|
||||
.col-wd-pull-7 {
|
||||
right: 58.33333%; }
|
||||
|
||||
.col-wd-pull-8 {
|
||||
right: 66.66667%; }
|
||||
|
||||
.col-wd-pull-9 {
|
||||
right: 75%; }
|
||||
|
||||
.col-wd-pull-10 {
|
||||
right: 83.33333%; }
|
||||
|
||||
.col-wd-pull-11 {
|
||||
right: 91.66667%; }
|
||||
|
||||
.col-wd-pull-12 {
|
||||
right: 100%; }
|
||||
|
||||
.col-wd-push-0 {
|
||||
left: 0%; }
|
||||
|
||||
.col-wd-push-1 {
|
||||
left: 8.33333%; }
|
||||
|
||||
.col-wd-push-2 {
|
||||
left: 16.66667%; }
|
||||
|
||||
.col-wd-push-3 {
|
||||
left: 25%; }
|
||||
|
||||
.col-wd-push-4 {
|
||||
left: 33.33333%; }
|
||||
|
||||
.col-wd-push-5 {
|
||||
left: 41.66667%; }
|
||||
|
||||
.col-wd-push-6 {
|
||||
left: 50%; }
|
||||
|
||||
.col-wd-push-7 {
|
||||
left: 58.33333%; }
|
||||
|
||||
.col-wd-push-8 {
|
||||
left: 66.66667%; }
|
||||
|
||||
.col-wd-push-9 {
|
||||
left: 75%; }
|
||||
|
||||
.col-wd-push-10 {
|
||||
left: 83.33333%; }
|
||||
|
||||
.col-wd-push-11 {
|
||||
left: 91.66667%; }
|
||||
|
||||
.col-wd-push-12 {
|
||||
left: 100%; } }
|
||||
/*
|
||||
* Responsive kit
|
||||
*/
|
||||
@media (max-width: 767px) {
|
||||
.kit-hidden-mb {
|
||||
display: none; } }
|
||||
@media (max-width: 991px) {
|
||||
.kit-hidden-tb {
|
||||
display: none; } }
|
||||
@media (max-width: 1199px) {
|
||||
.kit-hidden {
|
||||
display: none; } }
|
||||
/*
|
||||
* Clearfix
|
||||
*/
|
||||
.clearfix, .colgroup {
|
||||
zoom: 1; }
|
||||
.clearfix:before, .colgroup:before, .clearfix:after, .colgroup:after {
|
||||
content: " ";
|
||||
display: table; }
|
||||
.clearfix:after, .colgroup:after {
|
||||
clear: both; }
|
||||
/* Bento Grid System Source: https://github.com/fenbox/bento Version: 1.2.8 Update: 2013.11.25 */
|
||||
.container, .row [class*="col-"] { box-sizing: border-box; }
|
||||
|
||||
.container { margin-left: auto; margin-right: auto; padding-left: 10px; padding-right: 10px; }
|
||||
|
||||
.row { margin-right: -10px; margin-left: -10px; }
|
||||
|
||||
.row [class*="col-"] { float: left; min-height: 1px; padding-right: 10px; padding-left: 10px; }
|
||||
|
||||
.row [class*="-push-"], .row [class*="-pull-"] { position: relative; }
|
||||
|
||||
/* Mobile and up */
|
||||
.col-mb-1 { width: 8.33333%; }
|
||||
|
||||
.col-mb-2 { width: 16.66667%; }
|
||||
|
||||
.col-mb-3 { width: 25%; }
|
||||
|
||||
.col-mb-4 { width: 33.33333%; }
|
||||
|
||||
.col-mb-5 { width: 41.66667%; }
|
||||
|
||||
.col-mb-6 { width: 50%; }
|
||||
|
||||
.col-mb-7 { width: 58.33333%; }
|
||||
|
||||
.col-mb-8 { width: 66.66667%; }
|
||||
|
||||
.col-mb-9 { width: 75%; }
|
||||
|
||||
.col-mb-10 { width: 83.33333%; }
|
||||
|
||||
.col-mb-11 { width: 91.66667%; }
|
||||
|
||||
.col-mb-12 { width: 100%; }
|
||||
|
||||
/* Tablet and up */
|
||||
@media (min-width: 768px) { .container { max-width: 728px; }
|
||||
.col-tb-1 { width: 8.33333%; }
|
||||
.col-tb-2 { width: 16.66667%; }
|
||||
.col-tb-3 { width: 25%; }
|
||||
.col-tb-4 { width: 33.33333%; }
|
||||
.col-tb-5 { width: 41.66667%; }
|
||||
.col-tb-6 { width: 50%; }
|
||||
.col-tb-7 { width: 58.33333%; }
|
||||
.col-tb-8 { width: 66.66667%; }
|
||||
.col-tb-9 { width: 75%; }
|
||||
.col-tb-10 { width: 83.33333%; }
|
||||
.col-tb-11 { width: 91.66667%; }
|
||||
.col-tb-12 { width: 100%; }
|
||||
.col-tb-offset-0 { margin-left: 0%; }
|
||||
.col-tb-offset-1 { margin-left: 8.33333%; }
|
||||
.col-tb-offset-2 { margin-left: 16.66667%; }
|
||||
.col-tb-offset-3 { margin-left: 25%; }
|
||||
.col-tb-offset-4 { margin-left: 33.33333%; }
|
||||
.col-tb-offset-5 { margin-left: 41.66667%; }
|
||||
.col-tb-offset-6 { margin-left: 50%; }
|
||||
.col-tb-offset-7 { margin-left: 58.33333%; }
|
||||
.col-tb-offset-8 { margin-left: 66.66667%; }
|
||||
.col-tb-offset-9 { margin-left: 75%; }
|
||||
.col-tb-offset-10 { margin-left: 83.33333%; }
|
||||
.col-tb-offset-11 { margin-left: 91.66667%; }
|
||||
.col-tb-offset-12 { margin-left: 100%; }
|
||||
.col-tb-pull-0 { right: 0%; }
|
||||
.col-tb-pull-1 { right: 8.33333%; }
|
||||
.col-tb-pull-2 { right: 16.66667%; }
|
||||
.col-tb-pull-3 { right: 25%; }
|
||||
.col-tb-pull-4 { right: 33.33333%; }
|
||||
.col-tb-pull-5 { right: 41.66667%; }
|
||||
.col-tb-pull-6 { right: 50%; }
|
||||
.col-tb-pull-7 { right: 58.33333%; }
|
||||
.col-tb-pull-8 { right: 66.66667%; }
|
||||
.col-tb-pull-9 { right: 75%; }
|
||||
.col-tb-pull-10 { right: 83.33333%; }
|
||||
.col-tb-pull-11 { right: 91.66667%; }
|
||||
.col-tb-pull-12 { right: 100%; }
|
||||
.col-tb-push-0 { left: 0%; }
|
||||
.col-tb-push-1 { left: 8.33333%; }
|
||||
.col-tb-push-2 { left: 16.66667%; }
|
||||
.col-tb-push-3 { left: 25%; }
|
||||
.col-tb-push-4 { left: 33.33333%; }
|
||||
.col-tb-push-5 { left: 41.66667%; }
|
||||
.col-tb-push-6 { left: 50%; }
|
||||
.col-tb-push-7 { left: 58.33333%; }
|
||||
.col-tb-push-8 { left: 66.66667%; }
|
||||
.col-tb-push-9 { left: 75%; }
|
||||
.col-tb-push-10 { left: 83.33333%; }
|
||||
.col-tb-push-11 { left: 91.66667%; }
|
||||
.col-tb-push-12 { left: 100%; } }
|
||||
|
||||
/* Desktop and up */
|
||||
@media (min-width: 992px) { .container { max-width: 952px; }
|
||||
.col-1 { width: 8.33333%; }
|
||||
.col-2 { width: 16.66667%; }
|
||||
.col-3 { width: 25%; }
|
||||
.col-4 { width: 33.33333%; }
|
||||
.col-5 { width: 41.66667%; }
|
||||
.col-6 { width: 50%; }
|
||||
.col-7 { width: 58.33333%; }
|
||||
.col-8 { width: 66.66667%; }
|
||||
.col-9 { width: 75%; }
|
||||
.col-10 { width: 83.33333%; }
|
||||
.col-11 { width: 91.66667%; }
|
||||
.col-12 { width: 100%; }
|
||||
.col-offset-0 { margin-left: 0%; }
|
||||
.col-offset-1 { margin-left: 8.33333%; }
|
||||
.col-offset-2 { margin-left: 16.66667%; }
|
||||
.col-offset-3 { margin-left: 25%; }
|
||||
.col-offset-4 { margin-left: 33.33333%; }
|
||||
.col-offset-5 { margin-left: 41.66667%; }
|
||||
.col-offset-6 { margin-left: 50%; }
|
||||
.col-offset-7 { margin-left: 58.33333%; }
|
||||
.col-offset-8 { margin-left: 66.66667%; }
|
||||
.col-offset-9 { margin-left: 75%; }
|
||||
.col-offset-10 { margin-left: 83.33333%; }
|
||||
.col-offset-11 { margin-left: 91.66667%; }
|
||||
.col-offset-12 { margin-left: 100%; }
|
||||
.col-pull-0 { right: 0%; }
|
||||
.col-pull-1 { right: 8.33333%; }
|
||||
.col-pull-2 { right: 16.66667%; }
|
||||
.col-pull-3 { right: 25%; }
|
||||
.col-pull-4 { right: 33.33333%; }
|
||||
.col-pull-5 { right: 41.66667%; }
|
||||
.col-pull-6 { right: 50%; }
|
||||
.col-pull-7 { right: 58.33333%; }
|
||||
.col-pull-8 { right: 66.66667%; }
|
||||
.col-pull-9 { right: 75%; }
|
||||
.col-pull-10 { right: 83.33333%; }
|
||||
.col-pull-11 { right: 91.66667%; }
|
||||
.col-pull-12 { right: 100%; }
|
||||
.col-push-0 { left: 0%; }
|
||||
.col-push-1 { left: 8.33333%; }
|
||||
.col-push-2 { left: 16.66667%; }
|
||||
.col-push-3 { left: 25%; }
|
||||
.col-push-4 { left: 33.33333%; }
|
||||
.col-push-5 { left: 41.66667%; }
|
||||
.col-push-6 { left: 50%; }
|
||||
.col-push-7 { left: 58.33333%; }
|
||||
.col-push-8 { left: 66.66667%; }
|
||||
.col-push-9 { left: 75%; }
|
||||
.col-push-10 { left: 83.33333%; }
|
||||
.col-push-11 { left: 91.66667%; }
|
||||
.col-push-12 { left: 100%; } }
|
||||
|
||||
/* Widescreen and up */
|
||||
@media (min-width: 1200px) { .container { max-width: 1160px; }
|
||||
.col-wd-1 { width: 8.33333%; }
|
||||
.col-wd-2 { width: 16.66667%; }
|
||||
.col-wd-3 { width: 25%; }
|
||||
.col-wd-4 { width: 33.33333%; }
|
||||
.col-wd-5 { width: 41.66667%; }
|
||||
.col-wd-6 { width: 50%; }
|
||||
.col-wd-7 { width: 58.33333%; }
|
||||
.col-wd-8 { width: 66.66667%; }
|
||||
.col-wd-9 { width: 75%; }
|
||||
.col-wd-10 { width: 83.33333%; }
|
||||
.col-wd-11 { width: 91.66667%; }
|
||||
.col-wd-12 { width: 100%; }
|
||||
.col-wd-offset-0 { margin-left: 0%; }
|
||||
.col-wd-offset-1 { margin-left: 8.33333%; }
|
||||
.col-wd-offset-2 { margin-left: 16.66667%; }
|
||||
.col-wd-offset-3 { margin-left: 25%; }
|
||||
.col-wd-offset-4 { margin-left: 33.33333%; }
|
||||
.col-wd-offset-5 { margin-left: 41.66667%; }
|
||||
.col-wd-offset-6 { margin-left: 50%; }
|
||||
.col-wd-offset-7 { margin-left: 58.33333%; }
|
||||
.col-wd-offset-8 { margin-left: 66.66667%; }
|
||||
.col-wd-offset-9 { margin-left: 75%; }
|
||||
.col-wd-offset-10 { margin-left: 83.33333%; }
|
||||
.col-wd-offset-11 { margin-left: 91.66667%; }
|
||||
.col-wd-offset-12 { margin-left: 100%; }
|
||||
.col-wd-pull-0 { right: 0%; }
|
||||
.col-wd-pull-1 { right: 8.33333%; }
|
||||
.col-wd-pull-2 { right: 16.66667%; }
|
||||
.col-wd-pull-3 { right: 25%; }
|
||||
.col-wd-pull-4 { right: 33.33333%; }
|
||||
.col-wd-pull-5 { right: 41.66667%; }
|
||||
.col-wd-pull-6 { right: 50%; }
|
||||
.col-wd-pull-7 { right: 58.33333%; }
|
||||
.col-wd-pull-8 { right: 66.66667%; }
|
||||
.col-wd-pull-9 { right: 75%; }
|
||||
.col-wd-pull-10 { right: 83.33333%; }
|
||||
.col-wd-pull-11 { right: 91.66667%; }
|
||||
.col-wd-pull-12 { right: 100%; }
|
||||
.col-wd-push-0 { left: 0%; }
|
||||
.col-wd-push-1 { left: 8.33333%; }
|
||||
.col-wd-push-2 { left: 16.66667%; }
|
||||
.col-wd-push-3 { left: 25%; }
|
||||
.col-wd-push-4 { left: 33.33333%; }
|
||||
.col-wd-push-5 { left: 41.66667%; }
|
||||
.col-wd-push-6 { left: 50%; }
|
||||
.col-wd-push-7 { left: 58.33333%; }
|
||||
.col-wd-push-8 { left: 66.66667%; }
|
||||
.col-wd-push-9 { left: 75%; }
|
||||
.col-wd-push-10 { left: 83.33333%; }
|
||||
.col-wd-push-11 { left: 91.66667%; }
|
||||
.col-wd-push-12 { left: 100%; } }
|
||||
|
||||
/* Responsive kit */
|
||||
@media (max-width: 575px) { .kit-hidden-mb { display: none; } }
|
||||
|
||||
@media (max-width: 767px) { .kit-hidden-tb { display: none; } }
|
||||
|
||||
@media (max-width: 991px) { .kit-hidden { display: none; } }
|
||||
|
||||
/* Clearfix */
|
||||
.clearfix, .row { zoom: 1; }
|
||||
|
||||
.clearfix:before, .row:before, .clearfix:after, .row:after { content: " "; display: table; }
|
||||
|
||||
.clearfix:after, .row:after { clear: both; }
|
||||
|
||||
24
admin/css/install.css
Normal file
@@ -0,0 +1,24 @@
|
||||
h1 { text-align: center; }
|
||||
|
||||
details summary { cursor: pointer; }
|
||||
|
||||
@keyframes fadein { from { opacity: 0; }
|
||||
to { opacity: 1; } }
|
||||
|
||||
.fresh .keep-word { display: none; }
|
||||
|
||||
.keep .fresh-word { display: none; }
|
||||
|
||||
form > .message { display: none; padding: 20px; border-radius: 5px; }
|
||||
|
||||
.message textarea { width: 100%; height: 200px; resize: none; margin: 10px 0; }
|
||||
|
||||
.message.fade { display: block; animation: fadein .5s linear; }
|
||||
|
||||
.message *:last-child { margin-bottom: 0; }
|
||||
|
||||
.message p { margin-top: 10px; }
|
||||
|
||||
.message p button { margin-left: 5px; }
|
||||
|
||||
.message p button:first-child { margin-left: 0; }
|
||||
521
admin/css/normalize.css
vendored
@@ -1,406 +1,341 @@
|
||||
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
|
||||
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* ==========================================================================
|
||||
HTML5 display definitions
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct `inline-block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9.
|
||||
* Hide the `template` element in IE, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Base
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background: transparent;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari 5, and Chrome.
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9, Safari 5, and Chrome.
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct font family set oddly in Safari 5 and Chrome.
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
font-size: 1em;
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability of pre-formatted text in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set consistent quote types.
|
||||
*/
|
||||
|
||||
q {
|
||||
quotes: "\201C" "\201D" "\2018" "\2019";
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Embedded content
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9.
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow displayed oddly in IE 9.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Figures
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari 5.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 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 8/9.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct font family not being inherited in all browsers.
|
||||
* 2. Correct font size not being inherited in all browsers.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
line-height: normal;
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 8+.
|
||||
* Correct `select` style inheritance in Firefox 4+ and Opera.
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
select { /* 1 */
|
||||
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.
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 4+.
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove default vertical scrollbar in IE 8/9.
|
||||
* 2. Improve readability and alignment in all browsers.
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto; /* 1 */
|
||||
vertical-align: top; /* 2 */
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Tables
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
2132
admin/css/style.css
@@ -1,3 +1,4 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 自定义字段
|
||||
@@ -9,6 +10,7 @@ $(document).ready(function () {
|
||||
btn.removeClass('i-caret-down').addClass('i-caret-right');
|
||||
}
|
||||
$(this).parent().toggleClass('fold');
|
||||
return false;
|
||||
});
|
||||
|
||||
function attachDeleteEvent (el) {
|
||||
@@ -17,6 +19,8 @@ $(document).ready(function () {
|
||||
$(this).parents('tr').fadeOut(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$(this).parents('form').trigger('field');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -33,9 +37,13 @@ $(document).ready(function () {
|
||||
+ '<option value="float"><?php _e('小数'); ?></option>'
|
||||
+ '</select></td>'
|
||||
+ '<td><textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea></td>'
|
||||
+ '<td><button type="button" class="btn-xs"><?php _e('删除'); ?></button></td></tr>',
|
||||
+ '<td><button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></td></tr>',
|
||||
el = $(html).hide().appendTo('#custom-field table tbody').fadeIn();
|
||||
|
||||
$(':input', el).bind('input change', function () {
|
||||
$(this).parents('form').trigger('field');
|
||||
});
|
||||
|
||||
attachDeleteEvent(el);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,66 +1,82 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php
|
||||
$fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems();
|
||||
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems();
|
||||
?>
|
||||
<section id="custom-field" class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
|
||||
<label id="custom-field-expand" class="typecho-label"><i class="i-caret-right"></i> <?php _e('自定义字段'); ?></label>
|
||||
<table class="typecho-list-table mono">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="10%"/>
|
||||
<col width="55%"/>
|
||||
<col width="10%"/>
|
||||
</colgroup>
|
||||
<?php foreach ($defaultFields as $field): ?>
|
||||
<?php list ($label, $input) = $field; ?>
|
||||
<tr>
|
||||
<td><?php $label->render(); ?></td>
|
||||
<td colspan="3"><?php $input->render(); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<tr>
|
||||
<td><input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>" class="text-s w-100"></td>
|
||||
<td>
|
||||
<select name="fieldTypes[]" id="">
|
||||
<option value="str"<?php if ('str' == $field['type']): ?> selected<?php endif; ?>><?php _e('字符'); ?></option>
|
||||
<option value="int"<?php if ('int' == $field['type']): ?> selected<?php endif; ?>><?php _e('整数'); ?></option>
|
||||
<option value="float"<?php if ('float' == $field['type']): ?> selected<?php endif; ?>><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td><textarea name="fieldValues[]" class="text-s w-100" rows="2"><?php echo htmlspecialchars($field[$field['type'] . '_value']); ?></textarea></td>
|
||||
<td>
|
||||
<button type="button" class="btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($defaultFields) && empty($fields)): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="title" class="visuallyhidden"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="title" class="visuallyhidden"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="">
|
||||
<option value="str"><?php _e('字符'); ?></option>
|
||||
<option value="int"><?php _e('整数'); ?></option>
|
||||
<option value="float"><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="title" class="visuallyhidden"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="description clearfix">
|
||||
<button type="button" class="btn-xs operate-add"><?php _e('+添加字段'); ?></button>
|
||||
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="">帮助文档</a>'); ?>
|
||||
</div>
|
||||
</section>
|
||||
<section id="custom-field"
|
||||
class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
|
||||
<label id="custom-field-expand" class="typecho-label"><a href="##"><i
|
||||
class="i-caret-right"></i> <?php _e('自定义字段'); ?></a></label>
|
||||
<table class="typecho-list-table mono">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="10%"/>
|
||||
<col width="55%"/>
|
||||
<col width="10%"/>
|
||||
</colgroup>
|
||||
<?php foreach ($defaultFields as $field): ?>
|
||||
<?php [$label, $input] = $field; ?>
|
||||
<tr>
|
||||
<td><?php $label->render(); ?></td>
|
||||
<td colspan="3"><?php $input->render(); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>"
|
||||
id="fieldname" class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option
|
||||
value="str"<?php if ('str' == $field['type']): ?> selected<?php endif; ?>><?php _e('字符'); ?></option>
|
||||
<option
|
||||
value="int"<?php if ('int' == $field['type']): ?> selected<?php endif; ?>><?php _e('整数'); ?></option>
|
||||
<option
|
||||
value="float"<?php if ('float' == $field['type']): ?> selected<?php endif; ?>><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" id="fieldvalue" class="text-s w-100"
|
||||
rows="2"><?php echo htmlspecialchars($field[$field['type'] . '_value']); ?></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($defaultFields) && empty($fields)): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" id="fieldname"
|
||||
class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option value="str"><?php _e('字符'); ?></option>
|
||||
<option value="int"><?php _e('整数'); ?></option>
|
||||
<option value="float"><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" id="fieldvalue"
|
||||
class="text-s w-100" rows="2"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="description clearfix">
|
||||
<button type="button" class="btn btn-xs operate-add"><?php _e('+添加字段'); ?></button>
|
||||
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="http://docs.typecho.org/help/custom-fields">帮助文档</a>'); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php $content = !empty($post) ? $post : $page; if ($options->markdown && (!$content->have() || $content->isMarkdown)): ?>
|
||||
<script src="<?php $options->adminUrl('js/pagedown.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminUrl('js/pagedown-extra.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminUrl('js/diff.js?v=' . $suffixVersion); ?>"></script>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php $content = !empty($post) ? $post : $page; if ($options->markdown): ?>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'hyperdown.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'pagedown.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'paste.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'purify.js'); ?>"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var textarea = $('#text'),
|
||||
toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore(textarea.parent())
|
||||
isFullScreen = false,
|
||||
toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore(textarea.parent()),
|
||||
preview = $('<div id="wmd-preview" class="wmd-hidetab" />').insertAfter('.editor');
|
||||
|
||||
var options = {};
|
||||
var options = {}, isMarkdown = <?php echo intval($content->isMarkdown || !$content->have()); ?>;
|
||||
|
||||
options.strings = {
|
||||
bold: '<?php _e('加粗'); ?> <strong> Ctrl+B',
|
||||
@@ -48,7 +50,7 @@ $(document).ready(function () {
|
||||
exitFullscreen: '<?php _e('退出全屏'); ?> - Ctrl+E',
|
||||
fullscreenUnsupport: '<?php _e('此浏览器不支持全屏操作'); ?>',
|
||||
|
||||
imagedialog: '<p><b><?php _e('插入图片'); ?></b></p><p><?php _e('请在下方的输入框内输入要插入的远程图片地址'); ?></p><p><?php _e('您也可以使用编辑器下方的文件上传功能插入本地图片'); ?></p>',
|
||||
imagedialog: '<p><b><?php _e('插入图片'); ?></b></p><p><?php _e('请在下方的输入框内输入要插入的远程图片地址'); ?></p><p><?php _e('您也可以使用附件功能插入上传的本地图片'); ?></p>',
|
||||
linkdialog: '<p><b><?php _e('插入链接'); ?></b></p><p><?php _e('请在下方的输入框内输入要插入的链接地址'); ?></p>',
|
||||
|
||||
ok: '<?php _e('确定'); ?>',
|
||||
@@ -57,31 +59,18 @@ $(document).ready(function () {
|
||||
help: '<?php _e('Markdown语法帮助'); ?>'
|
||||
};
|
||||
|
||||
var converter = new Markdown.Converter(),
|
||||
editor = new Markdown.Editor(converter, '', options),
|
||||
diffMatch = new diff_match_patch(), last = '', preview = $('#wmd-preview'),
|
||||
mark = '@mark' + Math.ceil(Math.random() * 100000000) + '@',
|
||||
span = '<span class="diff" />';
|
||||
|
||||
// 设置markdown
|
||||
Markdown.Extra.init(converter, {
|
||||
extensions : 'all'
|
||||
});
|
||||
var converter = new HyperDown(),
|
||||
editor = new Markdown.Editor(converter, '', options);
|
||||
|
||||
// 自动跟随
|
||||
converter.hooks.chain('postConversion', function (html) {
|
||||
// clear special html tags
|
||||
html = html.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|noscript)[^>]*>/ig, function (all) {
|
||||
return all.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/"/g, '"');
|
||||
});
|
||||
|
||||
// clear hard breaks
|
||||
html = html.replace(/\s*((?:<br>\n)+)\s*(<\/?(?:p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|li|dd|dt)[^\w])/gm, '$2');
|
||||
converter.enableHtml(true);
|
||||
converter.enableLine(true);
|
||||
reloadScroll = scrollableEditor(textarea, preview);
|
||||
|
||||
// 修正白名单
|
||||
converter.hook('makeHtml', function (html) {
|
||||
html = html.replace('<p><!--more--></p>', '<!--more-->');
|
||||
|
||||
if (html.indexOf('<!--more-->') > 0) {
|
||||
var parts = html.split(/\s*<\!\-\-more\-\->\s*/),
|
||||
summary = parts.shift(),
|
||||
@@ -91,73 +80,50 @@ $(document).ready(function () {
|
||||
+ '<div class="details">' + details + '</div>';
|
||||
}
|
||||
|
||||
|
||||
var diffs = diffMatch.diff_main(last, html);
|
||||
last = html;
|
||||
|
||||
if (diffs.length > 0) {
|
||||
var stack = [], markStr = mark;
|
||||
|
||||
for (var i = 0; i < diffs.length; i ++) {
|
||||
var diff = diffs[i], op = diff[0], str = diff[1]
|
||||
sp = str.lastIndexOf('<'), ep = str.lastIndexOf('>');
|
||||
|
||||
if (op != 0) {
|
||||
if (sp >=0 && sp > ep) {
|
||||
if (op > 0) {
|
||||
stack.push(str.substring(0, sp) + markStr + str.substring(sp));
|
||||
} else {
|
||||
var lastStr = stack[stack.length - 1], lastSp = lastStr.lastIndexOf('<');
|
||||
stack[stack.length - 1] = lastStr.substring(0, lastSp) + markStr + lastStr.substring(lastSp);
|
||||
}
|
||||
} else {
|
||||
if (op > 0) {
|
||||
stack.push(str + markStr);
|
||||
} else {
|
||||
stack.push(markStr);
|
||||
}
|
||||
}
|
||||
|
||||
markStr = '';
|
||||
} else {
|
||||
stack.push(str);
|
||||
}
|
||||
// 替换block
|
||||
html = html.replace(/<(iframe|embed)\s+([^>]*)>/ig, function (all, tag, src) {
|
||||
if (src[src.length - 1] == '/') {
|
||||
src = src.substring(0, src.length - 1);
|
||||
}
|
||||
|
||||
html = stack.join('');
|
||||
return '<div class="embed"><strong>'
|
||||
+ tag + '</strong> : ' + $.trim(src) + '</div>';
|
||||
});
|
||||
|
||||
if (!markStr) {
|
||||
var pos = html.indexOf(mark), prev = html.substring(0, pos),
|
||||
next = html.substr(pos + mark.length),
|
||||
sp = prev.lastIndexOf('<'), ep = prev.lastIndexOf('>');
|
||||
|
||||
if (sp >= 0 && sp > ep) {
|
||||
html = prev.substring(0, sp) + span + prev.substring(sp) + next;
|
||||
} else {
|
||||
html = prev + span + next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return html;
|
||||
return DOMPurify.sanitize(html, {USE_PROFILES: {html: true}});
|
||||
});
|
||||
|
||||
editor.hooks.chain('onPreviewRefresh', function () {
|
||||
var diff = $('.diff', preview);
|
||||
var images = $('img', preview), count = images.length;
|
||||
|
||||
if (diff.length > 0) {
|
||||
var p = diff.position(), lh = diff.parent().css('line-height');
|
||||
lh = !!lh ? parseInt(lh) : 0;
|
||||
if (count == 0) {
|
||||
reloadScroll(true);
|
||||
} else {
|
||||
images.bind('load error', function () {
|
||||
count --;
|
||||
|
||||
if (p.top < 0 || p.top > preview.height() - lh) {
|
||||
preview.scrollTo(diff, {
|
||||
offset : - 50
|
||||
});
|
||||
}
|
||||
if (count == 0) {
|
||||
reloadScroll(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var input = $('#text'), th = textarea.height(), ph = preview.height();
|
||||
<?php \Typecho\Plugin::factory('admin/editor-js.php')->markdownEditor($content); ?>
|
||||
|
||||
var th = textarea.height(), ph = preview.height(),
|
||||
uploadBtn = $('<button type="button" id="btn-fullscreen-upload" class="btn btn-link">'
|
||||
+ '<i class="i-upload"><?php _e('附件'); ?></i></button>')
|
||||
.prependTo('.submit .right')
|
||||
.click(function() {
|
||||
$('a', $('.typecho-option-tabs li').not('.active')).trigger('click');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.typecho-option-tabs li').click(function () {
|
||||
uploadBtn.find('i').toggleClass('i-upload-active',
|
||||
$('#tab-files-btn', this).length > 0);
|
||||
});
|
||||
|
||||
editor.hooks.chain('enterFakeFullScreen', function () {
|
||||
th = textarea.height();
|
||||
@@ -167,6 +133,7 @@ $(document).ready(function () {
|
||||
|
||||
textarea.css('height', h);
|
||||
preview.css('height', h);
|
||||
isFullScreen = true;
|
||||
});
|
||||
|
||||
editor.hooks.chain('enterFullScreen', function () {
|
||||
@@ -175,59 +142,100 @@ $(document).ready(function () {
|
||||
var h = window.screen.height - toolbar.outerHeight();
|
||||
textarea.css('height', h);
|
||||
preview.css('height', h);
|
||||
isFullScreen = true;
|
||||
});
|
||||
|
||||
editor.hooks.chain('exitFullScreen', function () {
|
||||
$(document.body).removeClass('fullscreen');
|
||||
textarea.height(th);
|
||||
preview.height(ph);
|
||||
isFullScreen = false;
|
||||
});
|
||||
|
||||
editor.run();
|
||||
editor.hooks.chain('commandExecuted', function () {
|
||||
textarea.trigger('input');
|
||||
});
|
||||
|
||||
var imageButton = $('#wmd-image-button'),
|
||||
linkButton = $('#wmd-link-button');
|
||||
function initMarkdown() {
|
||||
editor.run();
|
||||
|
||||
Typecho.insertFileToEditor = function (file, url, isImage) {
|
||||
var button = isImage ? imageButton : linkButton;
|
||||
var imageButton = $('#wmd-image-button'),
|
||||
linkButton = $('#wmd-link-button');
|
||||
|
||||
options.strings[isImage ? 'imagename' : 'linkname'] = file;
|
||||
button.trigger('click');
|
||||
Typecho.insertFileToEditor = function (file, url, isImage) {
|
||||
var button = isImage ? imageButton : linkButton;
|
||||
|
||||
var checkDialog = setInterval(function () {
|
||||
if ($('.wmd-prompt-dialog').length > 0) {
|
||||
$('.wmd-prompt-dialog input').val(url).select();
|
||||
clearInterval(checkDialog);
|
||||
checkDialog = null;
|
||||
}
|
||||
}, 10);
|
||||
};
|
||||
options.strings[isImage ? 'imagename' : 'linkname'] = file;
|
||||
button.trigger('click');
|
||||
|
||||
var checkDialog = setInterval(function () {
|
||||
if ($('.wmd-prompt-dialog').length > 0) {
|
||||
$('.wmd-prompt-dialog input').val(url).select();
|
||||
clearInterval(checkDialog);
|
||||
checkDialog = null;
|
||||
}
|
||||
}, 10);
|
||||
};
|
||||
|
||||
// 编辑预览切换
|
||||
var edittab = $('.editor').prepend('<div class="wmd-edittab"><a href="#wmd-editarea" class="active">撰写</a><a href="#wmd-preview">预览</a></div>'),
|
||||
editarea = $(textarea.parent()).attr("id", "wmd-editarea");
|
||||
Typecho.uploadComplete = function (file) {
|
||||
Typecho.insertFileToEditor(file.title, file.url, file.isImage);
|
||||
};
|
||||
|
||||
$(".wmd-edittab a").click(function() {
|
||||
$(".wmd-edittab a").removeClass('active');
|
||||
$(this).addClass("active");
|
||||
$("#wmd-editarea, #wmd-preview").addClass("wmd-hidetab");
|
||||
// 编辑预览切换
|
||||
var edittab = $('.editor').prepend('<div class="wmd-edittab"><a href="#wmd-editarea" class="active"><?php _e('撰写'); ?></a><a href="#wmd-preview"><?php _e('预览'); ?></a></div>'),
|
||||
editarea = $(textarea.parent()).attr("id", "wmd-editarea");
|
||||
|
||||
$(".wmd-edittab a").click(function() {
|
||||
$(".wmd-edittab a").removeClass('active');
|
||||
$(this).addClass("active");
|
||||
$("#wmd-editarea, #wmd-preview").addClass("wmd-hidetab");
|
||||
|
||||
var selected_tab = $(this).attr("href"),
|
||||
selected_el = $(selected_tab).removeClass("wmd-hidetab");
|
||||
var selected_tab = $(this).attr("href"),
|
||||
selected_el = $(selected_tab).removeClass("wmd-hidetab");
|
||||
|
||||
// 预览时隐藏编辑器按钮
|
||||
if (selected_tab == "#wmd-preview") {
|
||||
$("#wmd-button-row").addClass("wmd-visualhide");
|
||||
} else {
|
||||
$("#wmd-button-row").removeClass("wmd-visualhide");
|
||||
}
|
||||
// 预览时隐藏编辑器按钮
|
||||
if (selected_tab == "#wmd-preview") {
|
||||
$("#wmd-button-row").addClass("wmd-visualhide");
|
||||
} else {
|
||||
$("#wmd-button-row").removeClass("wmd-visualhide");
|
||||
}
|
||||
|
||||
// 预览和编辑窗口高度一致
|
||||
$("#wmd-preview").outerHeight($("#wmd-editarea").innerHeight());
|
||||
// 预览和编辑窗口高度一致
|
||||
$("#wmd-preview").outerHeight($("#wmd-editarea").innerHeight());
|
||||
|
||||
return false;
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// 剪贴板复制图片
|
||||
textarea.pastableTextarea().on('pasteImage', function (e, data) {
|
||||
var name = data.name ? data.name.replace(/[\(\)\[\]\*#!]/g, '') : (new Date()).toISOString().replace(/\..+$/, '');
|
||||
if (!name.match(/\.[a-z0-9]{2,}$/i)) {
|
||||
var ext = data.blob.type.split('/').pop();
|
||||
name += '.' + ext;
|
||||
}
|
||||
|
||||
Typecho.uploadFile(new File([data.blob], name), name);
|
||||
});
|
||||
}
|
||||
|
||||
if (isMarkdown) {
|
||||
initMarkdown();
|
||||
} else {
|
||||
var notice = $('<div class="message notice"><?php _e('这篇文章不是由Markdown语法创建的, 继续使用Markdown编辑它吗?'); ?> '
|
||||
+ '<button class="btn btn-xs primary yes"><?php _e('是'); ?></button> '
|
||||
+ '<button class="btn btn-xs no"><?php _e('否'); ?></button></div>')
|
||||
.hide().insertBefore(textarea).slideDown();
|
||||
|
||||
$('.yes', notice).click(function () {
|
||||
notice.remove();
|
||||
$('<input type="hidden" name="markdown" value="1" />').appendTo('.submit');
|
||||
initMarkdown();
|
||||
});
|
||||
|
||||
$('.no', notice).click(function () {
|
||||
notice.remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<?php
|
||||
|
||||
include 'common.php';
|
||||
|
||||
$panel = $request->get('panel');
|
||||
$panelTable = unserialize($options->panelTable);
|
||||
|
||||
if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) {
|
||||
throw new Typecho_Plugin_Exception(_t('页面不存在'), 404);
|
||||
throw new \Typecho\Plugin\Exception(_t('页面不存在'), 404);
|
||||
}
|
||||
|
||||
require_once $panel;
|
||||
[$pluginName, $file] = explode('/', trim($panel, '/'), 2);
|
||||
|
||||
require_once $options->pluginDir($pluginName) . '/' . $file;
|
||||
|
||||
@@ -1,36 +1,26 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php
|
||||
if (isset($post) && $post instanceof Typecho_Widget && $post->have()) {
|
||||
if (isset($post) && $post instanceof \Typecho\Widget && $post->have()) {
|
||||
$fileParentContent = $post;
|
||||
} else if (isset($page) && $page instanceof Typecho_Widget && $page->have()) {
|
||||
} elseif (isset($page) && $page instanceof \Typecho\Widget && $page->have()) {
|
||||
$fileParentContent = $page;
|
||||
}
|
||||
|
||||
$phpMaxFilesize = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
|
||||
|
||||
if (preg_match("/^([0-9]+)([a-z]{1,2})$/i", $phpMaxFilesize, $matches)) {
|
||||
$phpMaxFilesize = strtolower($matches[1] . $matches[2] . (1 == strlen($matches[2]) ? 'b' : ''));
|
||||
}
|
||||
?>
|
||||
|
||||
<script src="<?php $options->adminUrl('js/filedrop.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'moxie.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'plupload.js'); ?>"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var errorWord = '<?php $val = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
|
||||
$last = strtolower($val[strlen($val)-1]);
|
||||
switch($last) {
|
||||
// The 'G' modifier is available since PHP 5.1.0
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
case 'm':
|
||||
$val *= 1024;
|
||||
case 'k':
|
||||
$val *= 1024;
|
||||
}
|
||||
|
||||
$val = number_format(ceil($val / (1024 *1024)));
|
||||
_e('文件上传失败, 请确认文件尺寸没有超过 %s 并且服务器文件目录可以写入', "{$val}Mb"); ?>',
|
||||
loading = $('<img src="<?php $options->adminUrl('img/ajax-loader.gif'); ?>" style="display:none" />')
|
||||
.appendTo(document.body);
|
||||
|
||||
function updateAttacmentNumber () {
|
||||
var btn = $('#tab-files-btn'),
|
||||
balloon = $('.balloon', btn),
|
||||
count = $('#file-list li').length;
|
||||
count = $('#file-list li .insert').length;
|
||||
|
||||
if (count > 0) {
|
||||
if (!balloon.length) {
|
||||
@@ -44,13 +34,72 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
$('.upload-area').bind({
|
||||
dragenter : function () {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
dragover : function (e) {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
drop : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragend : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragleave : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
}
|
||||
});
|
||||
|
||||
updateAttacmentNumber();
|
||||
|
||||
function fileUploadStart (file, id) {
|
||||
$('<li id="' + id + '" class="loading">'
|
||||
+ file + '</li>').prependTo('#file-list');
|
||||
function fileUploadStart (file) {
|
||||
$('<li id="' + file.id + '" class="loading">'
|
||||
+ file.name + '</li>').appendTo('#file-list');
|
||||
}
|
||||
|
||||
function fileUploadError (error) {
|
||||
var file = error.file, code = error.code, word;
|
||||
|
||||
switch (code) {
|
||||
case plupload.FILE_SIZE_ERROR:
|
||||
word = '<?php _e('文件大小超过限制'); ?>';
|
||||
break;
|
||||
case plupload.FILE_EXTENSION_ERROR:
|
||||
word = '<?php _e('文件扩展名不被支持'); ?>';
|
||||
break;
|
||||
case plupload.FILE_DUPLICATE_ERROR:
|
||||
word = '<?php _e('文件已经上传过'); ?>';
|
||||
break;
|
||||
case plupload.HTTP_ERROR:
|
||||
default:
|
||||
word = '<?php _e('上传出现错误'); ?>';
|
||||
break;
|
||||
}
|
||||
|
||||
var fileError = '<?php _e('%s 上传失败'); ?>'.replace('%s', file.name),
|
||||
li, exist = $('#' + file.id);
|
||||
|
||||
if (exist.length > 0) {
|
||||
li = exist.removeClass('loading').html(fileError);
|
||||
} else {
|
||||
li = $('<li>' + fileError + '<br />' + word + '</li>').appendTo('#file-list');
|
||||
}
|
||||
|
||||
li.effect('highlight', {color : '#FBC2C4'}, 2000, function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
// fix issue #341
|
||||
this.removeFile(file);
|
||||
}
|
||||
|
||||
var completeFile = null;
|
||||
function fileUploadComplete (id, url, data) {
|
||||
var li = $('#' + id).removeClass('loading').data('cid', data.cid)
|
||||
.data('url', data.url)
|
||||
@@ -65,123 +114,85 @@ $(document).ready(function() {
|
||||
attachInsertEvent(li);
|
||||
attachDeleteEvent(li);
|
||||
updateAttacmentNumber();
|
||||
|
||||
if (!completeFile) {
|
||||
completeFile = data;
|
||||
}
|
||||
}
|
||||
|
||||
$('#tab-files').bind('init', function () {
|
||||
$('.upload-file').fileUpload({
|
||||
url : '<?php $options->index('/action/upload'
|
||||
var uploader = null, tabFilesEl = $('#tab-files').bind('init', function () {
|
||||
uploader = new plupload.Uploader({
|
||||
browse_button : $('.upload-file').get(0),
|
||||
url : '<?php $security->index('/action/upload'
|
||||
. (isset($fileParentContent) ? '?cid=' . $fileParentContent->cid : '')); ?>',
|
||||
types : <?php
|
||||
$attachmenttypes = $options->allowedattachmenttypes;
|
||||
$attachmenttypescount = count($attachmenttypes);
|
||||
$types = array();
|
||||
|
||||
for ($i = 0; $i < $attachmenttypescount; $i ++) {
|
||||
$types[] = '.' . $attachmenttypes[$i];
|
||||
}
|
||||
|
||||
echo json_encode($types);
|
||||
?>,
|
||||
typesError : '<?php _e('文件 %s 的类型不被支持'); ?>',
|
||||
onUpload : fileUploadStart,
|
||||
onError : function (id) {
|
||||
$('#' + id).remove();
|
||||
alert(errorWord);
|
||||
runtimes : 'html5,flash,html4',
|
||||
flash_swf_url : '<?php $options->adminStaticUrl('js', 'Moxie.swf'); ?>',
|
||||
drop_element : $('.upload-area').get(0),
|
||||
filters : {
|
||||
max_file_size : '<?php echo $phpMaxFilesize ?>',
|
||||
mime_types : [{'title' : '<?php _e('允许上传的文件'); ?>', 'extensions' : '<?php echo implode(',', $options->allowedAttachmentTypes); ?>'}],
|
||||
prevent_duplicates : true
|
||||
},
|
||||
onComplete : fileUploadComplete
|
||||
});
|
||||
});
|
||||
|
||||
$('#upload-panel').filedrop({
|
||||
url : '<?php $options->index('/action/upload'
|
||||
. (isset($fileParentContent) ? '?cid=' . $fileParentContent->cid : '')); ?>',
|
||||
allowedfileextensions : <?php
|
||||
$attachmenttypes = $options->allowedattachmenttypes;
|
||||
$attachmenttypescount = count($attachmenttypes);
|
||||
$types = array();
|
||||
init : {
|
||||
FilesAdded : function (up, files) {
|
||||
for (var i = 0; i < files.length; i ++) {
|
||||
fileUploadStart(files[i]);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $attachmenttypescount; $i ++) {
|
||||
$types[] = '.' . $attachmenttypes[$i];
|
||||
}
|
||||
completeFile = null;
|
||||
uploader.start();
|
||||
},
|
||||
|
||||
echo json_encode($types);
|
||||
?>,
|
||||
UploadComplete : function () {
|
||||
if (completeFile) {
|
||||
Typecho.uploadComplete(completeFile);
|
||||
}
|
||||
},
|
||||
|
||||
maxfilesize : <?php
|
||||
$val = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
|
||||
$last = strtolower($val[strlen($val)-1]);
|
||||
switch($last) {
|
||||
// The 'G' modifier is available since PHP 5.1.0
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
case 'm':
|
||||
$val *= 1024;
|
||||
case 'k':
|
||||
$val *= 1024;
|
||||
}
|
||||
FileUploaded : function (up, file, result) {
|
||||
if (200 == result.status) {
|
||||
var data = $.parseJSON(result.response);
|
||||
|
||||
echo ceil($val / (1024 * 1024));
|
||||
?>,
|
||||
if (data) {
|
||||
fileUploadComplete(file.id, data[0], data[1]);
|
||||
uploader.removeFile(file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
queuefiles : 5,
|
||||
fileUploadError.call(uploader, {
|
||||
code : plupload.HTTP_ERROR,
|
||||
file : file
|
||||
});
|
||||
},
|
||||
|
||||
error: function(err, file) {
|
||||
switch(err) {
|
||||
case 'BrowserNotSupported':
|
||||
alert('<?php _e('浏览器不支持拖拽上传'); ?>');
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
alert('<?php _e('一次上传的文件不能多于%d个', 25); ?>');
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
alert('<?php $val = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0;
|
||||
$last = strtolower($val[strlen($val)-1]);
|
||||
switch($last) {
|
||||
// The 'G' modifier is available since PHP 5.1.0
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
case 'm':
|
||||
$val *= 1024;
|
||||
case 'k':
|
||||
$val *= 1024;
|
||||
}
|
||||
|
||||
$val = number_format(ceil($val / (1024 *1024)));
|
||||
_e('文件尺寸不能超过 %s', "{$val}Mb"); ?>');
|
||||
break;
|
||||
case 'FileTypeNotAllowed':
|
||||
// The file type is not in the specified list 'allowedfiletypes'
|
||||
break;
|
||||
case 'FileExtensionNotAllowed':
|
||||
alert('<?php _e('文件 %s 的类型不被支持'); ?>'.replace('%s', file.name));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
Error : function (up, error) {
|
||||
fileUploadError.call(uploader, error);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
dragOver : function () {
|
||||
$(this).addClass('drag');
|
||||
},
|
||||
});
|
||||
|
||||
dragLeave : function () {
|
||||
$(this).removeClass('drag');
|
||||
},
|
||||
|
||||
drop : function () {
|
||||
$(this).removeClass('drag');
|
||||
},
|
||||
|
||||
uploadStarted : function (i, file, len) {
|
||||
fileUploadStart(file.name, 'drag-' + i);
|
||||
},
|
||||
|
||||
uploadFinished : function (i, file, response) {
|
||||
fileUploadComplete('drag-' + i, response[0], response[1]);
|
||||
}
|
||||
uploader.init();
|
||||
});
|
||||
|
||||
Typecho.uploadFile = function (file, name) {
|
||||
if (!uploader) {
|
||||
$('#tab-files-btn').parent().trigger('click');
|
||||
}
|
||||
|
||||
var timer = setInterval(function () {
|
||||
if (!uploader) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
|
||||
uploader.addFile(file, name);
|
||||
}, 50);
|
||||
};
|
||||
|
||||
function attachInsertEvent (el) {
|
||||
$('.insert', el).click(function () {
|
||||
var t = $(this), p = t.parents('li');
|
||||
@@ -195,7 +206,7 @@ $(document).ready(function() {
|
||||
$('.delete', el).click(function () {
|
||||
if (confirm('<?php _e('确认要删除文件 %s 吗?'); ?>'.replace('%s', file))) {
|
||||
var cid = $(this).parents('li').data('cid');
|
||||
$.post('<?php $options->index('/action/contents-attachment-edit'); ?>',
|
||||
$.post('<?php $security->index('/action/contents-attachment-edit'); ?>',
|
||||
{'do' : 'delete', 'cid' : cid},
|
||||
function () {
|
||||
$(el).fadeOut(function () {
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
|
||||
<?php
|
||||
if (isset($post) || isset($page)) {
|
||||
$cid = isset($post) ? $post->cid : $page->cid;
|
||||
|
||||
|
||||
if ($cid) {
|
||||
Typecho_Widget::widget('Widget_Contents_Attachment_Related', 'parentId=' . $cid)->to($attachment);
|
||||
\Widget\Contents\Attachment\Related::alloc(['parentId' => $cid])->to($attachment);
|
||||
} else {
|
||||
Typecho_Widget::widget('Widget_Contents_Attachment_Unattached')->to($attachment);
|
||||
\Widget\Contents\Attachment\Unattached::alloc()->to($attachment);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="upload-panel" class="p">
|
||||
<div class="upload-area"><?php _e('拖放文件到这里<br>或者 %s选择文件上传%s', '<a href="###" class="upload-file">', '</a>'); ?></div>
|
||||
<div class="upload-area" draggable="true"><?php _e('拖放文件到这里<br>或者 %s选择文件上传%s', '<a href="###" class="upload-file">', '</a>'); ?></div>
|
||||
<ul id="file-list">
|
||||
<?php while ($attachment->next()): ?>
|
||||
<li data-cid="<?php $attachment->cid(); ?>" data-url="<?php echo $attachment->attachment->url; ?>" data-image="<?php echo $attachment->attachment->isImage ? 1 : 0; ?>"><input type="hidden" name="attachment[]" value="<?php $attachment->cid(); ?>" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
/** 注册一个初始化插件 */
|
||||
Typecho_Plugin::factory('admin/footer.php')->end();
|
||||
/** 注册一个结束插件 */
|
||||
\Typecho\Plugin::factory('admin/footer.php')->end();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<script>
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
var error = $('.typecho-option .error:first');
|
||||
|
||||
if (error.length > 0) {
|
||||
$('html,body').scrollTop(error.offset().top);
|
||||
$('html,body').scrollTop(error.parents('.typecho-option').offset().top);
|
||||
}
|
||||
|
||||
$('form').submit(function () {
|
||||
|
||||
@@ -1,34 +1,23 @@
|
||||
<?php
|
||||
if (!defined('__TYPECHO_ROOT_DIR__')) {
|
||||
if (!defined('__TYPECHO_ADMIN__')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$header = '<link rel="stylesheet" href="' . Typecho_Common::url('css/normalize.css?v=' . $suffixVersion, $options->adminUrl) . '">
|
||||
<link rel="stylesheet" href="' . Typecho_Common::url('css/grid.css?v=' . $suffixVersion, $options->adminUrl) . '">
|
||||
<link rel="stylesheet" href="' . Typecho_Common::url('css/style.css?v=' . $suffixVersion, $options->adminUrl) . '">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="' . Typecho_Common::url('js/html5shiv.js?v=' . $suffixVersion, $options->adminUrl) . '"></script>
|
||||
<script src="' . Typecho_Common::url('js/respond.js?v=' . $suffixVersion, $options->adminUrl) . '"></script>
|
||||
<![endif]-->';
|
||||
$header = '<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'normalize.css', true) . '">
|
||||
<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'grid.css', true) . '">
|
||||
<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'style.css', true) . '">';
|
||||
|
||||
/** 注册一个初始化插件 */
|
||||
$header = Typecho_Plugin::factory('admin/header.php')->header($header);
|
||||
$header = \Typecho\Plugin::factory('admin/header.php')->header($header);
|
||||
|
||||
?><!DOCTYPE HTML>
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="<?php $options->charset(); ?>">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title><?php _e('%s - %s - Powered by Typecho', $menu->title, $options->title); ?></title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<?php echo $header; ?>
|
||||
</head>
|
||||
<body<?php if (isset($bodyClass)) {echo ' class="' . $bodyClass . '"';} ?>>
|
||||
<!--[if lt IE 9]>
|
||||
<div class="message error browsehappy"><?php _e('您正在使用 <strong>旧版本</strong> 的浏览器. 为了更好的访问本页面, 请 <a href="http://browsehappy.com/">升级你的浏览器</a>'); ?>.</div>
|
||||
<![endif]-->
|
||||
|
||||
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 529 B |
|
Before Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 507 B |
|
Before Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 281 B |
|
Before Width: | Height: | Size: 898 B |
|
Before Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 156 B |
|
Before Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 473 B |
|
Before Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 259 B |
BIN
admin/img/editor@2x.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 223 B |
|
Before Width: | Height: | Size: 226 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 311 B |
|
Before Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 182 B |
|
Before Width: | Height: | Size: 166 B |
|
Before Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 226 B |
|
Before Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 242 B |
BIN
admin/img/icons@2x.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
10
admin/img/typecho-logo.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="110px" height="26px" viewBox="0 0 110 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<title>typecho-logo</title>
|
||||
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<path d="M34.75,5.288 C34.288,6.542 33.76,7.73 32.22,7.862 L32,9.468 L33.562,9.468 L33.562,15.342 C33.562,16.882 33.54,18.994 36.972,18.994 C38.006,18.994 39.106,18.686 39.766,18.224 L39.106,16.53 C38.754,16.75 38.204,16.992 37.61,16.992 C36.708,16.992 36.18,16.596 36.18,15.254 L36.18,9.468 L38.886,9.468 L39.106,7.62 L36.18,7.62 L36.18,5.288 L34.75,5.288 Z M48.258,18.268 C48.258,20.27 47.444,21.502 45.42,21.502 C44.76,21.502 44.276,21.436 43.858,21.282 C43.462,21.128 43.352,20.908 43.352,20.49 L43.352,19.434 L41.262,19.61 L41.262,22.668 C42.186,23.13 44.012,23.394 45.398,23.394 C48.676,23.394 50.502,21.898 50.502,18.268 L50.502,7.62 L46.63,7.62 L46.63,9.424 L47.334,9.468 C47.752,9.468 47.884,9.644 47.884,10.128 L47.884,14.11 C47.884,15.254 47.07,16.288 45.53,16.288 C44.122,16.288 43.902,15.276 43.902,13.934 L43.902,7.62 L40.03,7.62 L40.03,9.424 L40.734,9.468 C41.108,9.49 41.284,9.622 41.284,10.084 L41.284,14.506 C41.284,17.102 42.494,18.312 44.694,18.312 C46.146,18.312 47.488,17.696 48.258,16.596 L48.258,18.268 Z M54,20.776 C54,21.326 53.78,21.458 53.362,21.502 L52.636,21.568 L52.636,23.24 L58.312,23.24 L58.312,21.502 L56.53,21.414 L56.53,18.378 C57.102,18.73 58.026,19.016 58.884,19.016 C61.788,19.016 63.702,16.926 63.702,12.878 C63.702,8.94 62.162,7.29 59.72,7.29 C57.85,7.29 56.64,8.302 56.244,9.05 L56.244,7.62 L52.526,7.62 L52.526,9.402 L53.45,9.468 C53.868,9.468 54,9.644 54,10.128 L54,20.776 Z M60.974,13.098 C60.974,15.012 60.336,16.926 58.466,16.926 C57.894,16.926 57.102,16.75 56.53,16.376 L56.53,11.316 C56.53,10.304 57.498,9.424 58.752,9.424 C59.918,9.424 60.974,10.172 60.974,13.098 Z M70.786,7.29 C67.178,7.29 65.352,10.15 65.352,13.406 C65.352,16.684 66.804,18.972 70.544,18.972 C72.612,18.972 74.064,18.048 74.416,17.74 L73.58,15.958 C73.052,16.332 72.106,16.926 70.808,16.926 C68.938,16.926 68.19,15.76 68.102,14.33 C70.698,14.308 74.372,13.736 74.372,10.348 C74.372,8.39 72.942,7.29 70.786,7.29 Z M71.952,10.392 C71.952,12.086 69.642,12.46 68.014,12.482 C68.08,10.854 68.872,9.16 70.632,9.16 C71.424,9.16 71.952,9.578 71.952,10.392 Z M81.192,16.97 C79.234,16.97 78.354,15.43 78.354,13.032 C78.354,10.59 79.256,9.27 81.016,9.27 C81.346,9.27 81.61,9.314 81.874,9.402 C82.27,9.534 82.336,9.732 82.336,10.15 L82.336,11.206 L84.36,11.052 L84.36,8.192 C83.304,7.62 82.248,7.29 80.928,7.29 C78.442,7.29 75.692,8.83 75.692,13.296 C75.692,16.948 77.606,18.994 80.84,18.994 C82.468,18.994 83.81,18.422 84.668,17.718 L83.722,16.024 C82.82,16.684 82.05,16.97 81.192,16.97 Z M87.286,16.222 C87.286,16.772 87.066,16.904 86.648,16.948 L85.922,17.014 L85.922,18.686 L91.158,18.686 L91.158,16.926 L89.904,16.86 L89.904,11.536 C89.904,10.392 90.718,9.314 92.258,9.314 C93.666,9.314 93.974,10.348 93.974,11.69 L93.974,16.222 C93.974,16.772 93.754,16.904 93.336,16.948 L92.61,17.014 L92.61,18.686 L97.846,18.686 L97.846,16.926 L96.592,16.86 L96.592,11.118 C96.592,8.522 95.294,7.29 93.094,7.29 C91.642,7.29 90.542,7.972 89.882,8.918 L89.882,3 L85.966,3 L85.966,4.826 L86.736,4.87 C87.154,4.892 87.286,5.024 87.286,5.508 L87.286,16.222 Z M98.924,13.142 C98.924,17.124 100.86,19.016 103.808,19.016 C106.712,19.016 109.066,17.08 109.066,12.856 C109.066,7.796 105.788,7.29 104.16,7.29 C101.894,7.29 98.924,8.566 98.924,13.142 Z M103.984,17.08 C101.872,17.08 101.586,14.88 101.586,12.834 C101.586,10.722 102.29,9.226 104.028,9.226 C105.788,9.226 106.382,10.744 106.382,13.208 C106.382,15.496 105.7,17.08 103.984,17.08 Z" id="typecho" fill="#000000" sketch:type="MSShapeGroup"></path>
|
||||
<path d="M13,26 C3.36833333,26 0,22.631 0,13 C0,3.36866667 3.36833333,0 13,0 C22.6316667,0 26,3.36866667 26,13 C26,22.631 22.6316667,26 13,26 Z M6,9 L20,9 L20,7 L6,7 L6,9 Z M6,14 L16,14 L16,12 L6,12 L6,14 Z M6,19 L18,19 L18,17 L6,17 L6,19 Z" id="icon" fill="#000000" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
234
admin/index.php
@@ -3,109 +3,102 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$stat = \Widget\Stat::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="container typecho-dashboard">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="colgroup typecho-page-main">
|
||||
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav" role="main">
|
||||
<p class="intro"><?php _e('欢迎使用 Typecho, 您可以使用下面的链接开始您的 Blog 之旅:'); ?></p>
|
||||
|
||||
<ul class="intro-link">
|
||||
<?php if($user->pass('contributor', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
|
||||
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->myWaitingCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->mySpamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('administrator', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观模板'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('修改系统设置'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<div class="row typecho-page-main">
|
||||
<div class="col-mb-12 welcome-board" role="main">
|
||||
<p><?php _e('目前有 <em>%s</em> 篇文章, 并有 <em>%s</em> 条关于你的评论在 <em>%s</em> 个分类中.',
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>
|
||||
<br><?php _e('点击下面的链接快速开始:'); ?></p>
|
||||
|
||||
<ul id="start-link" class="clearfix">
|
||||
<?php if ($user->pass('contributor', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
|
||||
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif ($stat->myWaitingCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif ($stat->mySpamCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if ($user->pass('administrator', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('plugins.php'); ?>"><?php _e('插件管理'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('系统设置'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<!--<li><a href="<?php $options->adminUrl('profile.php'); ?>"><?php _e('更新我的资料'); ?></a></li>-->
|
||||
</ul>
|
||||
|
||||
<h3><?php _e('统计信息'); ?></h3>
|
||||
<div class="status">
|
||||
<p><?php _e('目前有 <em>%s</em> 篇 Blog, 并有 <em>%s</em> 条关于你的评论在已设定的 <em>%s</em> 个分类中.',
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?></p>
|
||||
|
||||
<p><?php
|
||||
if ($user->logged > 0) {
|
||||
_e('最后登录: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone));
|
||||
}
|
||||
?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-6 typecho-dashboard-main" role="complementary">
|
||||
<section>
|
||||
<h3><?php _e('最近发表的文章'); ?></h3>
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=7')->to($posts); ?>
|
||||
<div class="col-mb-12 col-tb-4" role="complementary">
|
||||
<section class="latest-link">
|
||||
<h3><?php _e('最近发布的文章'); ?></h3>
|
||||
<?php \Widget\Contents\Post\Recent::alloc('pageSize=10')->to($posts); ?>
|
||||
<ul>
|
||||
<?php if($posts->have()): ?>
|
||||
<?php while($posts->next()): ?>
|
||||
<li>
|
||||
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
|
||||
<span>- <?php $posts->dateWord(); ?></span>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php _e('暂时没有文章'); ?></em></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3><?php _e('最新得到的回复'); ?></h3>
|
||||
<ul>
|
||||
<?php Typecho_Widget::widget('Widget_Comments_Recent', 'pageSize=7')->to($comments); ?>
|
||||
<?php if($comments->have()): ?>
|
||||
<?php while($comments->next()): ?>
|
||||
<li>
|
||||
<a href="<?php $comments->permalink(); ?>" class="title"><?php $comments->title(); ?></a>
|
||||
<span>- <?php $comments->dateWord(); ?>, <?php $comments->author(true); ?></span>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php if ($posts->have()): ?>
|
||||
<?php while ($posts->next()): ?>
|
||||
<li>
|
||||
<span><?php $posts->date('n.j'); ?></span>
|
||||
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php _e('暂时没有回复'); ?></em></li>
|
||||
<li><em><?php _e('暂时没有文章'); ?></em></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav" role="complementary">
|
||||
<?php $version = Typecho_Cookie::get('__typecho_check_version'); ?>
|
||||
<?php if ($version && $version['available']): ?>
|
||||
<div class="update-check">
|
||||
<p>
|
||||
<?php _e('您当前使用的版本是'); ?> <?php echo $version['current']; ?><br>
|
||||
<strong><a href="<?php echo $version['link']; ?>"><?php _e('官方最新版本是'); ?> <?php echo $version['latest']; ?></a></strong>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<h3><?php _e('官方消息'); ?></h3>
|
||||
<div id="typecho-message" class="intro-link">
|
||||
<div class="col-mb-12 col-tb-4" role="complementary">
|
||||
<section class="latest-link">
|
||||
<h3><?php _e('最近得到的回复'); ?></h3>
|
||||
<ul>
|
||||
<li><?php _e('读取中...'); ?></li>
|
||||
<?php \Widget\Comments\Recent::alloc('pageSize=10')->to($comments); ?>
|
||||
<?php if ($comments->have()): ?>
|
||||
<?php while ($comments->next()): ?>
|
||||
<li>
|
||||
<span><?php $comments->date('n.j'); ?></span>
|
||||
<a href="<?php $comments->permalink(); ?>"
|
||||
class="title"><?php $comments->author(false); ?></a>:
|
||||
<?php $comments->excerpt(35, '...'); ?>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><?php _e('暂时没有回复'); ?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-4" role="complementary">
|
||||
<section class="latest-link">
|
||||
<h3><?php _e('官方最新日志'); ?></h3>
|
||||
<div id="typecho-message">
|
||||
<ul>
|
||||
<li><?php _e('读取中...'); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,47 +110,46 @@ include 'common-js.php';
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var ul = $('.intro-link ul'), cache = window.sessionStorage,
|
||||
html = cache ? cache.getItem('feed') : '',
|
||||
update = cache ? cache.getItem('update') : '';
|
||||
|
||||
if (!!html) {
|
||||
ul.html(html);
|
||||
} else {
|
||||
html = '';
|
||||
$.get('<?php $options->index('/action/ajax?do=feed'); ?>', function (o) {
|
||||
for (var i = 0; i < o.length; i ++) {
|
||||
var item = o[i];
|
||||
html += '<li><a href="' + item.link + '" target="_blank">' + item.title
|
||||
+ '</a> <span>' + item.date + '</span></li>';
|
||||
}
|
||||
$(document).ready(function () {
|
||||
var ul = $('#typecho-message ul'), cache = window.sessionStorage,
|
||||
html = cache ? cache.getItem('feed') : '',
|
||||
update = cache ? cache.getItem('update') : '';
|
||||
|
||||
if (!!html) {
|
||||
ul.html(html);
|
||||
cache.setItem('feed', html);
|
||||
}, 'json');
|
||||
}
|
||||
} else {
|
||||
html = '';
|
||||
$.get('<?php $options->index('/action/ajax?do=feed'); ?>', function (o) {
|
||||
for (var i = 0; i < o.length; i++) {
|
||||
var item = o[i];
|
||||
html += '<li><span>' + item.date + '</span> <a href="' + item.link + '" target="_blank">' + item.title
|
||||
+ '</a></li>';
|
||||
}
|
||||
|
||||
function applyUpdate(update) {
|
||||
if (update.available) {
|
||||
$('<div class="update-check"><p>'
|
||||
+ '<?php _e('您当前使用的版本是 %s'); ?>'.replace('%s', update.current) + '<br />'
|
||||
+ '<strong><a href="' + update.link + '" target="_blank">'
|
||||
+ '<?php _e('官方最新版本是 %s'); ?>'.replace('%s', update.latest) + '</a></strong></p></div>')
|
||||
.prependTo('.typecho-dashboard-nav').effect('highlight');
|
||||
ul.html(html);
|
||||
cache.setItem('feed', html);
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
if (!!update) {
|
||||
applyUpdate($.parseJSON(update));
|
||||
} else {
|
||||
update = '';
|
||||
$.get('<?php $options->index('/action/ajax?do=checkVersion'); ?>', function (o, status, resp) {
|
||||
applyUpdate(o);
|
||||
cache.setItem('update', resp.responseText);
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
function applyUpdate(update) {
|
||||
if (update.available) {
|
||||
$('<div class="update-check message error"><p>'
|
||||
+ '<?php _e('您当前使用的版本是 %s'); ?>'.replace('%s', update.current) + '<br />'
|
||||
+ '<strong><a href="' + update.link + '" target="_blank">'
|
||||
+ '<?php _e('官方最新版本是 %s'); ?>'.replace('%s', update.latest) + '</a></strong></p></div>')
|
||||
.insertAfter('.typecho-page-title').effect('highlight');
|
||||
}
|
||||
}
|
||||
|
||||
if (!!update) {
|
||||
applyUpdate($.parseJSON(update));
|
||||
} else {
|
||||
$.get('<?php $options->index('/action/ajax?do=checkVersion'); ?>', function (o, status, resp) {
|
||||
applyUpdate(o);
|
||||
cache.setItem('update', resp.responseText);
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
||||
BIN
admin/js/Moxie.swf
Executable file
2193
admin/js/diff.js
@@ -1,557 +0,0 @@
|
||||
/*global jQuery:false, alert:false */
|
||||
|
||||
/*
|
||||
* Default text - jQuery plugin for html5 dragging files from desktop to browser
|
||||
*
|
||||
* Author: Weixi Yen
|
||||
*
|
||||
* Email: [Firstname][Lastname]@gmail.com
|
||||
*
|
||||
* Copyright (c) 2010 Resopollution
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Project home:
|
||||
* http://www.github.com/weixiyen/jquery-filedrop
|
||||
*
|
||||
* Version: 0.1.0
|
||||
*
|
||||
* Features:
|
||||
* Allows sending of extra parameters with file.
|
||||
* Works with Firefox 3.6+
|
||||
* Future-compliant with HTML5 spec (will work with Webkit browsers and IE9)
|
||||
* Usage:
|
||||
* See README at project homepage
|
||||
*
|
||||
*/
|
||||
;(function($) {
|
||||
|
||||
jQuery.event.props.push("dataTransfer");
|
||||
|
||||
var default_opts = {
|
||||
fallback_id: '',
|
||||
url: '',
|
||||
refresh: 1000,
|
||||
paramname: 'userfile',
|
||||
requestType: 'POST', // just in case you want to use another HTTP verb
|
||||
allowedfileextensions:[],
|
||||
allowedfiletypes:[],
|
||||
maxfiles: 25, // Ignored if queuefiles is set > 0
|
||||
maxfilesize: 1, // MB file size limit
|
||||
queuefiles: 0, // Max files before queueing (for large volume uploads)
|
||||
queuewait: 200, // Queue wait time if full
|
||||
data: {},
|
||||
headers: {},
|
||||
drop: empty,
|
||||
dragStart: empty,
|
||||
dragEnter: empty,
|
||||
dragOver: empty,
|
||||
dragLeave: empty,
|
||||
docEnter: empty,
|
||||
docOver: empty,
|
||||
docLeave: empty,
|
||||
beforeEach: empty,
|
||||
afterAll: empty,
|
||||
rename: empty,
|
||||
error: function(err, file, i, status) {
|
||||
alert(err);
|
||||
},
|
||||
uploadOpened: empty,
|
||||
uploadStarted: empty,
|
||||
uploadFinished: empty,
|
||||
progressUpdated: empty,
|
||||
globalProgressUpdated: empty,
|
||||
speedUpdated: empty
|
||||
},
|
||||
errors = ["BrowserNotSupported", "TooManyFiles", "FileTooLarge", "FileTypeNotAllowed", "NotFound", "NotReadable", "AbortError", "ReadError", "FileExtensionNotAllowed"];
|
||||
|
||||
$.fn.filedrop = function(options) {
|
||||
var opts = $.extend({}, default_opts, options),
|
||||
global_progress = [],
|
||||
doc_leave_timer, stop_loop = false,
|
||||
files_count = 0,
|
||||
files;
|
||||
|
||||
$('#' + opts.fallback_id).css({
|
||||
display: 'none',
|
||||
width: 0,
|
||||
height: 0
|
||||
});
|
||||
|
||||
this.on('drop', drop).on('dragstart', opts.dragStart).on('dragenter', dragEnter).on('dragover', dragOver).on('dragleave', dragLeave);
|
||||
$(document).on('drop', docDrop).on('dragenter', docEnter).on('dragover', docOver).on('dragleave', docLeave);
|
||||
|
||||
this.on('click', function(e){
|
||||
$('#' + opts.fallback_id).trigger(e);
|
||||
});
|
||||
|
||||
$('#' + opts.fallback_id).change(function(e) {
|
||||
opts.drop(e);
|
||||
files = e.target.files;
|
||||
files_count = files.length;
|
||||
upload();
|
||||
});
|
||||
|
||||
function drop(e) {
|
||||
if( opts.drop.call(this, e) === false ) return false;
|
||||
if(!e.dataTransfer)
|
||||
return;
|
||||
files = e.dataTransfer.files;
|
||||
if (files === null || files === undefined || files.length === 0) {
|
||||
opts.error(errors[0]);
|
||||
return false;
|
||||
}
|
||||
files_count = files.length;
|
||||
upload();
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
function getBuilder(filename, filedata, mime, boundary) {
|
||||
var dashdash = '--',
|
||||
crlf = '\r\n',
|
||||
builder = '',
|
||||
paramname = opts.paramname;
|
||||
|
||||
if (opts.data) {
|
||||
var params = $.param(opts.data).replace(/\+/g, '%20').split(/&/);
|
||||
|
||||
$.each(params, function() {
|
||||
var pair = this.split("=", 2),
|
||||
name = decodeURIComponent(pair[0]),
|
||||
val = decodeURIComponent(pair[1]);
|
||||
|
||||
if (pair.length !== 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
builder += dashdash;
|
||||
builder += boundary;
|
||||
builder += crlf;
|
||||
builder += 'Content-Disposition: form-data; name="' + name + '"';
|
||||
builder += crlf;
|
||||
builder += crlf;
|
||||
builder += val;
|
||||
builder += crlf;
|
||||
});
|
||||
}
|
||||
|
||||
if (jQuery.isFunction(paramname)){
|
||||
paramname = paramname(filename);
|
||||
}
|
||||
|
||||
builder += dashdash;
|
||||
builder += boundary;
|
||||
builder += crlf;
|
||||
builder += 'Content-Disposition: form-data; name="' + (paramname||"") + '"';
|
||||
builder += '; filename="' + filename + '"';
|
||||
builder += crlf;
|
||||
|
||||
builder += 'Content-Type: ' + mime;
|
||||
builder += crlf;
|
||||
builder += crlf;
|
||||
|
||||
builder += filedata;
|
||||
builder += crlf;
|
||||
|
||||
builder += dashdash;
|
||||
builder += boundary;
|
||||
builder += dashdash;
|
||||
builder += crlf;
|
||||
return builder;
|
||||
}
|
||||
|
||||
function progress(e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentage = Math.round((e.loaded * 100) / e.total);
|
||||
if (this.currentProgress !== percentage) {
|
||||
|
||||
this.currentProgress = percentage;
|
||||
opts.progressUpdated(this.index, this.file, this.currentProgress);
|
||||
|
||||
global_progress[this.global_progress_index] = this.currentProgress;
|
||||
globalProgress();
|
||||
|
||||
var elapsed = new Date().getTime();
|
||||
var diffTime = elapsed - this.currentStart;
|
||||
if (diffTime >= opts.refresh) {
|
||||
var diffData = e.loaded - this.startData;
|
||||
var speed = diffData / diffTime; // KB per second
|
||||
opts.speedUpdated(this.index, this.file, speed);
|
||||
this.startData = e.loaded;
|
||||
this.currentStart = elapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function globalProgress() {
|
||||
if (global_progress.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var total = 0, index;
|
||||
for (index in global_progress) {
|
||||
if(global_progress.hasOwnProperty(index)) {
|
||||
total = total + global_progress[index];
|
||||
}
|
||||
}
|
||||
|
||||
opts.globalProgressUpdated(Math.round(total / global_progress.length));
|
||||
}
|
||||
|
||||
// Respond to an upload
|
||||
function upload() {
|
||||
stop_loop = false;
|
||||
|
||||
if (!files) {
|
||||
opts.error(errors[0]);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (opts.allowedfiletypes.push && opts.allowedfiletypes.length) {
|
||||
for(var fileIndex = files.length;fileIndex--;) {
|
||||
if(!files[fileIndex].type || $.inArray(files[fileIndex].type, opts.allowedfiletypes) < 0) {
|
||||
opts.error(errors[3], files[fileIndex]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.allowedfileextensions.push && opts.allowedfileextensions.length) {
|
||||
for(var fileIndex = files.length;fileIndex--;) {
|
||||
var allowedextension = false;
|
||||
for (i=0;i<opts.allowedfileextensions.length;i++){
|
||||
if (files[fileIndex].name.substr(files[fileIndex].name.length-opts.allowedfileextensions[i].length) == opts.allowedfileextensions[i]) {
|
||||
allowedextension = true;
|
||||
}
|
||||
}
|
||||
if (!allowedextension){
|
||||
opts.error(errors[8], files[fileIndex]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var filesDone = 0,
|
||||
filesRejected = 0;
|
||||
|
||||
if (files_count > opts.maxfiles && opts.queuefiles === 0) {
|
||||
opts.error(errors[1]);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Define queues to manage upload process
|
||||
var workQueue = [];
|
||||
var processingQueue = [];
|
||||
var doneQueue = [];
|
||||
|
||||
// Add everything to the workQueue
|
||||
for (var i = 0; i < files_count; i++) {
|
||||
workQueue.push(i);
|
||||
opts.uploadOpened(i, files[i]);
|
||||
}
|
||||
|
||||
// Helper function to enable pause of processing to wait
|
||||
// for in process queue to complete
|
||||
var pause = function(timeout) {
|
||||
setTimeout(process, timeout);
|
||||
return;
|
||||
};
|
||||
|
||||
// Process an upload, recursive
|
||||
var process = function() {
|
||||
|
||||
var fileIndex;
|
||||
|
||||
if (stop_loop) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check to see if are in queue mode
|
||||
if (opts.queuefiles > 0 && processingQueue.length >= opts.queuefiles) {
|
||||
return pause(opts.queuewait);
|
||||
} else {
|
||||
// Take first thing off work queue
|
||||
fileIndex = workQueue[0];
|
||||
workQueue.splice(0, 1);
|
||||
|
||||
// Add to processing queue
|
||||
processingQueue.push(fileIndex);
|
||||
}
|
||||
|
||||
try {
|
||||
if (beforeEach(files[fileIndex]) !== false) {
|
||||
if (fileIndex === files_count) {
|
||||
return;
|
||||
}
|
||||
var reader = new FileReader(),
|
||||
max_file_size = 1048576 * opts.maxfilesize;
|
||||
|
||||
reader.index = fileIndex;
|
||||
if (files[fileIndex].size > max_file_size) {
|
||||
opts.error(errors[2], files[fileIndex], fileIndex);
|
||||
// Remove from queue
|
||||
processingQueue.forEach(function(value, key) {
|
||||
if (value === fileIndex) {
|
||||
processingQueue.splice(key, 1);
|
||||
}
|
||||
});
|
||||
filesRejected++;
|
||||
return true;
|
||||
}
|
||||
|
||||
reader.onerror = function(e) {
|
||||
switch(e.target.error.code) {
|
||||
case e.target.error.NOT_FOUND_ERR:
|
||||
opts.error(errors[4]);
|
||||
return false;
|
||||
case e.target.error.NOT_READABLE_ERR:
|
||||
opts.error(errors[5]);
|
||||
return false;
|
||||
case e.target.error.ABORT_ERR:
|
||||
opts.error(errors[6]);
|
||||
return false;
|
||||
default:
|
||||
opts.error(errors[7]);
|
||||
return false;
|
||||
};
|
||||
};
|
||||
|
||||
reader.onloadend = !opts.beforeSend ? send : function (e) {
|
||||
opts.beforeSend(files[fileIndex], fileIndex, function () { send(e); });
|
||||
};
|
||||
|
||||
reader.readAsDataURL(files[fileIndex]);
|
||||
|
||||
} else {
|
||||
filesRejected++;
|
||||
}
|
||||
} catch (err) {
|
||||
// Remove from queue
|
||||
processingQueue.forEach(function(value, key) {
|
||||
if (value === fileIndex) {
|
||||
processingQueue.splice(key, 1);
|
||||
}
|
||||
});
|
||||
opts.error(errors[0]);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we still have work to do,
|
||||
if (workQueue.length > 0) {
|
||||
process();
|
||||
}
|
||||
};
|
||||
|
||||
var send = function(e) {
|
||||
|
||||
var fileIndex = (e.srcElement || e.target).index;
|
||||
|
||||
// Sometimes the index is not attached to the
|
||||
// event object. Find it by size. Hack for sure.
|
||||
if (e.target.index === undefined) {
|
||||
e.target.index = getIndexBySize(e.total);
|
||||
}
|
||||
|
||||
var xhr = new XMLHttpRequest(),
|
||||
upload = xhr.upload,
|
||||
file = files[e.target.index],
|
||||
index = e.target.index,
|
||||
start_time = new Date().getTime(),
|
||||
boundary = '------multipartformboundary' + (new Date()).getTime(),
|
||||
global_progress_index = global_progress.length,
|
||||
builder,
|
||||
newName = rename(file.name),
|
||||
mime = file.type;
|
||||
|
||||
if (opts.withCredentials) {
|
||||
xhr.withCredentials = opts.withCredentials;
|
||||
}
|
||||
|
||||
var data = atob(e.target.result.split(',')[1]);
|
||||
if (typeof newName === "string") {
|
||||
builder = getBuilder(newName, data, mime, boundary);
|
||||
} else {
|
||||
builder = getBuilder(file.name, data, mime, boundary);
|
||||
}
|
||||
|
||||
upload.index = index;
|
||||
upload.file = file;
|
||||
upload.downloadStartTime = start_time;
|
||||
upload.currentStart = start_time;
|
||||
upload.currentProgress = 0;
|
||||
upload.global_progress_index = global_progress_index;
|
||||
upload.startData = 0;
|
||||
upload.addEventListener("progress", progress, false);
|
||||
|
||||
// Allow url to be a method
|
||||
if (jQuery.isFunction(opts.url)) {
|
||||
xhr.open(opts.requestType, opts.url(), true);
|
||||
} else {
|
||||
xhr.open(opts.requestType, opts.url, true);
|
||||
}
|
||||
|
||||
xhr.setRequestHeader('content-type', 'multipart/form-data; boundary=' + boundary);
|
||||
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
||||
|
||||
// Add headers
|
||||
$.each(opts.headers, function(k, v) {
|
||||
xhr.setRequestHeader(k, v);
|
||||
});
|
||||
|
||||
xhr.sendAsBinary(builder);
|
||||
|
||||
global_progress[global_progress_index] = 0;
|
||||
globalProgress();
|
||||
|
||||
opts.uploadStarted(index, file, files_count);
|
||||
|
||||
xhr.onload = function() {
|
||||
var serverResponse = null;
|
||||
|
||||
if (xhr.responseText) {
|
||||
try {
|
||||
serverResponse = jQuery.parseJSON(xhr.responseText);
|
||||
}
|
||||
catch (e) {
|
||||
serverResponse = xhr.responseText;
|
||||
}
|
||||
}
|
||||
|
||||
var now = new Date().getTime(),
|
||||
timeDiff = now - start_time,
|
||||
result = opts.uploadFinished(index, file, serverResponse, timeDiff, xhr);
|
||||
filesDone++;
|
||||
|
||||
// Remove from processing queue
|
||||
processingQueue.forEach(function(value, key) {
|
||||
if (value === fileIndex) {
|
||||
processingQueue.splice(key, 1);
|
||||
}
|
||||
});
|
||||
|
||||
// Add to donequeue
|
||||
doneQueue.push(fileIndex);
|
||||
|
||||
// Make sure the global progress is updated
|
||||
global_progress[global_progress_index] = 100;
|
||||
globalProgress();
|
||||
|
||||
if (filesDone === (files_count - filesRejected)) {
|
||||
afterAll();
|
||||
}
|
||||
if (result === false) {
|
||||
stop_loop = true;
|
||||
}
|
||||
|
||||
|
||||
// Pass any errors to the error option
|
||||
if (xhr.status < 200 || xhr.status > 299) {
|
||||
opts.error(xhr.statusText, file, fileIndex, xhr.status);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Initiate the processing loop
|
||||
process();
|
||||
}
|
||||
|
||||
function getIndexBySize(size) {
|
||||
for (var i = 0; i < files_count; i++) {
|
||||
if (files[i].size === size) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function rename(name) {
|
||||
return opts.rename(name);
|
||||
}
|
||||
|
||||
function beforeEach(file) {
|
||||
return opts.beforeEach(file);
|
||||
}
|
||||
|
||||
function afterAll() {
|
||||
return opts.afterAll();
|
||||
}
|
||||
|
||||
function dragEnter(e) {
|
||||
clearTimeout(doc_leave_timer);
|
||||
e.preventDefault();
|
||||
opts.dragEnter.call(this, e);
|
||||
}
|
||||
|
||||
function dragOver(e) {
|
||||
clearTimeout(doc_leave_timer);
|
||||
e.preventDefault();
|
||||
opts.docOver.call(this, e);
|
||||
opts.dragOver.call(this, e);
|
||||
}
|
||||
|
||||
function dragLeave(e) {
|
||||
clearTimeout(doc_leave_timer);
|
||||
opts.dragLeave.call(this, e);
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
function docDrop(e) {
|
||||
e.preventDefault();
|
||||
opts.docLeave.call(this, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
function docEnter(e) {
|
||||
clearTimeout(doc_leave_timer);
|
||||
e.preventDefault();
|
||||
opts.docEnter.call(this, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
function docOver(e) {
|
||||
clearTimeout(doc_leave_timer);
|
||||
e.preventDefault();
|
||||
opts.docOver.call(this, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
function docLeave(e) {
|
||||
doc_leave_timer = setTimeout((function(_this) {
|
||||
return function() {
|
||||
opts.docLeave.call(_this, e);
|
||||
};
|
||||
})(this), 200);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
function empty() {}
|
||||
|
||||
try {
|
||||
if (XMLHttpRequest.prototype.sendAsBinary) {
|
||||
return;
|
||||
}
|
||||
XMLHttpRequest.prototype.sendAsBinary = function(datastr) {
|
||||
function byteValue(x) {
|
||||
return x.charCodeAt(0) & 0xff;
|
||||
}
|
||||
var ords = Array.prototype.map.call(datastr, byteValue);
|
||||
var ui8a = new Uint8Array(ords);
|
||||
|
||||
// Not pretty: Chrome 22 deprecated sending ArrayBuffer, moving instead
|
||||
// to sending ArrayBufferView. Sadly, no proper way to detect this
|
||||
// functionality has been discovered. Happily, Chrome 22 also introduced
|
||||
// the base ArrayBufferView class, not present in Chrome 21.
|
||||
if ('ArrayBufferView' in window)
|
||||
this.send(ui8a);
|
||||
else
|
||||
this.send(ui8a.buffer);
|
||||
};
|
||||
} catch (e) {}
|
||||
|
||||
})(jQuery);
|
||||
301
admin/js/html5shiv.js
vendored
@@ -1,301 +0,0 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.0';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
||||
/** Used to skip problem elements */
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
/** Not all elements can be cloned in IE **/
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
/** Detect whether the browser supports default html5 styles */
|
||||
var supportsHtml5Styles;
|
||||
|
||||
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
||||
var expando = '_html5shiv';
|
||||
|
||||
/** The id for the the documents expando */
|
||||
var expanID = 0;
|
||||
|
||||
/** Cached data for each document */
|
||||
var expandoData = {};
|
||||
|
||||
/** Detect whether the browser supports unknown elements */
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
// assign a false positive if unable to shiv
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
// assign a false positive if detection fails => unable to shiv
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a style sheet with the given CSS text and adds it to the document.
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @param {String} cssText The CSS text.
|
||||
* @returns {StyleSheet} The style element.
|
||||
*/
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of `html5.elements` as an array.
|
||||
* @private
|
||||
* @returns {Array} An array of shived element node names.
|
||||
*/
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @returns {Object} An object of data.
|
||||
*/
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived element for the given nodeName and document
|
||||
* @memberOf html5
|
||||
* @param {String} nodeName name of the element
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived element.
|
||||
*/
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
// Avoid adding some elements to fragments in IE < 9 because
|
||||
// * Attributes like `name` or `type` cannot be set/changed once an element
|
||||
// is inserted into a document/fragment
|
||||
// * Link elements with `src` attributes that are inaccessible, as with
|
||||
// a 403 response, will cause the tab/window to crash
|
||||
// * Script elements appended to fragments will execute when their `src`
|
||||
// or `text` property is set
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived DocumentFragment for the given document
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived DocumentFragment.
|
||||
*/
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
||||
* @private
|
||||
* @param {Document|DocumentFragment} ownerDocument The document.
|
||||
* @param {Object} data of the document.
|
||||
*/
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
//abort shiv
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Shivs the given document.
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The document to shiv.
|
||||
* @returns {Document} The shived document.
|
||||
*/
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
// corrects block display not defined in IE6/7/8/9
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
// adds styling not present in IE6/7/8/9
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
// hides non-rendered elements
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `html5` object is exposed so that more elements can be shived and
|
||||
* existing shiving can be detected on iframes.
|
||||
* @type Object
|
||||
* @example
|
||||
*
|
||||
* // options can be changed before the script is included
|
||||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
|
||||
*/
|
||||
var html5 = {
|
||||
|
||||
/**
|
||||
* An array or space separated string of node names of the elements to shiv.
|
||||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
*/
|
||||
'version': version,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the HTML5 style sheet should be inserted.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
/**
|
||||
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
||||
* @memberOf html5
|
||||
* @type boolean
|
||||
*/
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
||||
* methods should be overwritten.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
/**
|
||||
* A string to describe the type of `html5` object ("default" or "default print").
|
||||
* @memberOf html5
|
||||
* @type String
|
||||
*/
|
||||
'type': 'default',
|
||||
|
||||
// shivs the document according to the specified `html5` object options
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
//creates a shived element
|
||||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose html5
|
||||
window.html5 = html5;
|
||||
|
||||
// shiv the document
|
||||
shivDocument(document);
|
||||
|
||||
}(this, document));
|
||||