Compare commits
846 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbffc2925c | ||
|
|
8ec0d518ad | ||
|
|
3bf0e2e4db | ||
|
|
4803eb2bac | ||
|
|
8509a62f06 | ||
|
|
bc8d715a56 | ||
|
|
b0fd03f571 | ||
|
|
a55102106e | ||
|
|
78c3308686 | ||
|
|
fe6424a02b | ||
|
|
047a33a604 | ||
|
|
85e8d93190 | ||
|
|
5c2e7c0adf | ||
|
|
d63c1bf2ca | ||
|
|
36b03e840d | ||
|
|
b7731e03ff | ||
|
|
5c29bb106a | ||
|
|
52b29423d0 | ||
|
|
4707e15c12 | ||
|
|
484911c103 | ||
|
|
5aa5dc82bb | ||
|
|
5d4e22d363 | ||
|
|
d5b6355261 | ||
|
|
f71a16552e | ||
|
|
f2d06a1a2c | ||
|
|
ed5f2259c3 | ||
|
|
b344d1e91e | ||
|
|
5f051baeca | ||
|
|
4122a90175 | ||
|
|
823c2c1b5f | ||
|
|
5f778043e4 | ||
|
|
38c7885718 | ||
|
|
bada48ae76 | ||
|
|
2624469d61 | ||
|
|
40fbc83547 | ||
|
|
284f5acfb7 | ||
|
|
227e3cbb94 | ||
|
|
362c9935bf | ||
|
|
58eebb15fb | ||
|
|
10b6a3556f | ||
|
|
77559afe60 | ||
|
|
20f6e838ba | ||
|
|
ffef82fe76 | ||
|
|
3a98c3a457 | ||
|
|
dabb9ba79c | ||
|
|
f5cd2b46b9 | ||
|
|
5e792b80a9 | ||
|
|
020a95bd80 | ||
|
|
13d63575f6 | ||
|
|
4870fe9560 | ||
|
|
882e026f76 | ||
|
|
2136ad1955 | ||
|
|
fa97918684 | ||
|
|
05daab79c1 | ||
|
|
57a789f046 | ||
|
|
61cc4b82f0 | ||
|
|
a8168fed86 | ||
|
|
47af30e0b6 | ||
|
|
277dc67243 | ||
|
|
0e48b8d5a3 | ||
|
|
3bc4deac68 | ||
|
|
6a50c1ce2b | ||
|
|
55def4402a | ||
|
|
b23e2fe40b | ||
|
|
8133adeab8 | ||
|
|
a470daf9f5 | ||
|
|
1a85a1ddc3 | ||
|
|
ab8ad37467 | ||
|
|
b811cfe92f | ||
|
|
fa40d9dad7 | ||
|
|
16c7e5d010 | ||
|
|
d5e6fb041f | ||
|
|
f00686c679 | ||
|
|
45fef223ce | ||
|
|
89c811d140 | ||
|
|
17ec5f517c | ||
|
|
56511b66bb | ||
|
|
4f5ed727f0 | ||
|
|
75885aecf5 | ||
|
|
fa48d0d2f0 | ||
|
|
ec44407e25 | ||
|
|
394067ff07 | ||
|
|
ed800a01ce | ||
|
|
599af8d96b | ||
|
|
9a2881cd7b | ||
|
|
6e7612d3ec | ||
|
|
0413ec4414 | ||
|
|
c88d4f46e3 | ||
|
|
1306853e1e | ||
|
|
078068e252 | ||
|
|
69d8ddce77 | ||
|
|
3926d4468c | ||
|
|
493950667b | ||
|
|
d6a7db8f3e | ||
|
|
d6fcf5a121 | ||
|
|
328a8a9808 | ||
|
|
0daf6c3081 | ||
|
|
1d5c74e424 | ||
|
|
c6bb782118 | ||
|
|
b45817ec65 | ||
|
|
a15dfda92c | ||
|
|
6030e9a4ca | ||
|
|
a3c0243772 | ||
|
|
3d89af7e17 | ||
|
|
03655c4c4b | ||
|
|
acfcb6bf9d | ||
|
|
57593d730f | ||
|
|
a141a4bdf5 | ||
|
|
33e751027d | ||
|
|
e65d2b0805 | ||
|
|
9d7f7f8e93 | ||
|
|
91f14785b7 | ||
|
|
1267a3c895 | ||
|
|
0748f495df | ||
|
|
83f6c5cf53 | ||
|
|
1385d65a2b | ||
|
|
68e5e0b5a5 | ||
|
|
72e98816f0 | ||
|
|
641ff79493 | ||
|
|
dff16e9b3f | ||
|
|
7264deee67 | ||
|
|
f08552c5e3 | ||
|
|
b131ef1524 | ||
|
|
b6c16d938d | ||
|
|
842d7e5b37 | ||
|
|
91a28990e0 | ||
|
|
7843b5fac6 | ||
|
|
bdf3d6615e | ||
|
|
1c81713063 | ||
|
|
12ced2c7fc | ||
|
|
43ddc3d78f | ||
|
|
400524169e | ||
|
|
6b35c5dd2c | ||
|
|
33b2c7a06c | ||
|
|
04a11bdc4a | ||
|
|
9ee6a80209 | ||
|
|
686813e6be | ||
|
|
08c17154a8 | ||
|
|
0beb6df2c8 | ||
|
|
68a08d9636 | ||
|
|
5ea9c857e9 | ||
|
|
147a3863a6 | ||
|
|
fba79948c8 | ||
|
|
29e5dc0eae | ||
|
|
949e5790a3 | ||
|
|
b05e3f73b1 | ||
|
|
5dbf7982ce | ||
|
|
5a82761df8 | ||
|
|
748c378ff8 | ||
|
|
edf297305d | ||
|
|
869e2eb206 | ||
|
|
d2149be2ef | ||
|
|
c9399446eb | ||
|
|
e7aa4b4507 | ||
|
|
a0e3a04d1a | ||
|
|
210c92b52c | ||
|
|
a6435ec894 | ||
|
|
aab8e5cb3d | ||
|
|
b0743473f1 | ||
|
|
7b04a95eda | ||
|
|
4b8e40b20e | ||
|
|
70ca67b3d5 | ||
|
|
f5be67675b | ||
|
|
b2117ece23 | ||
|
|
56688c3836 | ||
|
|
3192015816 | ||
|
|
b6884e05cb | ||
|
|
f159d3710f | ||
|
|
51d9865dfc | ||
|
|
ecffe3a43e | ||
|
|
ddd7924960 | ||
|
|
93798fce93 | ||
|
|
0ad8c80514 | ||
|
|
b4d2947709 | ||
|
|
95f146a1c4 | ||
|
|
6aa3f45ef4 | ||
|
|
1bcc773bba | ||
|
|
116f8bdff7 | ||
|
|
c83e375e20 | ||
|
|
c73bd8f66c | ||
|
|
91ea437f37 | ||
|
|
5b71272bc3 | ||
|
|
51098b1ea3 | ||
|
|
02565fa3b8 | ||
|
|
4ebed7f960 | ||
|
|
8668c9ee3b | ||
|
|
c80cbbdc0a | ||
|
|
1584a7d1a6 | ||
|
|
62ec680dc0 | ||
|
|
3d8bd14774 | ||
|
|
59a749c5ce | ||
|
|
4124d64a58 | ||
|
|
39398cecae | ||
|
|
7df2a8c0ac | ||
|
|
cb5d3d8b1a | ||
|
|
8b30c8b2eb | ||
|
|
272bc177ce | ||
|
|
7c230cf09a | ||
|
|
638c61e014 | ||
|
|
ae864faa84 | ||
|
|
bfea966a14 | ||
|
|
58e7c5ec42 | ||
|
|
080aaea4f7 | ||
|
|
eb634555df | ||
|
|
d42ea6f54b | ||
|
|
3c4a0eba6d | ||
|
|
a7f3205edb | ||
|
|
71875e8f5b | ||
|
|
bccc613de0 | ||
|
|
accf9b0936 | ||
|
|
aa5ee237c9 | ||
|
|
1024c3ff50 | ||
|
|
1c915d81da | ||
|
|
31aceb7226 | ||
|
|
8f06223c07 | ||
|
|
73047549a6 | ||
|
|
ade86eda6b | ||
|
|
03c0842ba2 | ||
|
|
5dcfe80e71 | ||
|
|
3e0f41b585 | ||
|
|
887c7c1873 | ||
|
|
67ab6c8f9c | ||
|
|
af0e81e690 | ||
|
|
e54d735614 | ||
|
|
d298de35cf | ||
|
|
c55c154856 | ||
|
|
4a36e1ec64 | ||
|
|
53d712b0ba | ||
|
|
801597f91f | ||
|
|
af0de2020e | ||
|
|
1a5540de98 | ||
|
|
bac9dd697c | ||
|
|
62c28202a0 | ||
|
|
33b47df99b | ||
|
|
58075d175d | ||
|
|
581cef9550 | ||
|
|
d393018cd3 | ||
|
|
67a2c86173 | ||
|
|
8918abde7e | ||
|
|
b1277ab4a8 | ||
|
|
b692360fb0 | ||
|
|
bbd96d39ab | ||
|
|
6fcb600fd9 | ||
|
|
0da9371c4d | ||
|
|
209fb3be48 | ||
|
|
2817e9c34b | ||
|
|
ffed16ef15 | ||
|
|
43cc344b8b | ||
|
|
0a4c4f14eb | ||
|
|
61a22c060e | ||
|
|
1e322fedcd | ||
|
|
0da7ca2e4d | ||
|
|
f134eca08b | ||
|
|
6c717e995a | ||
|
|
07f5a9b548 | ||
|
|
951637127b | ||
|
|
6aa2d0e533 | ||
|
|
82b6af34ca | ||
|
|
d91ea35dfe | ||
|
|
1e0ff0dfd6 | ||
|
|
7147373d86 | ||
|
|
d86326aca8 | ||
|
|
b37a723296 | ||
|
|
7af428572d | ||
|
|
0c2962ca15 | ||
|
|
fcc1af71ec | ||
|
|
77b7a88651 | ||
|
|
f6e508fbff | ||
|
|
1ef5f94953 | ||
|
|
9fbf1e7504 | ||
|
|
c67d93e869 | ||
|
|
57d96b0bf9 | ||
|
|
50d2dadea2 | ||
|
|
bf755abbf4 | ||
|
|
ebc2764aab | ||
|
|
2912e351f5 | ||
|
|
f0e47e07bc | ||
|
|
ee917776f0 | ||
|
|
fe2719a6e3 | ||
|
|
0765ab378b | ||
|
|
0c9db2c573 | ||
|
|
12a8f2e81c | ||
|
|
ace40e0c29 | ||
|
|
c9e163a2df | ||
|
|
93d717c1aa | ||
|
|
b3510dfb67 | ||
|
|
5c347829a2 | ||
|
|
89e34fb24e | ||
|
|
9160b5cc8f | ||
|
|
00b02af6e6 | ||
|
|
6701c18929 | ||
|
|
659befd66a | ||
|
|
424992a783 | ||
|
|
0ab6745704 | ||
|
|
927471e165 | ||
|
|
72cd067341 | ||
|
|
0128499d73 | ||
|
|
9c4a74c406 | ||
|
|
8e139c481c | ||
|
|
45ad87c2eb | ||
|
|
cee91cc2d3 | ||
|
|
f4e2f24f65 | ||
|
|
f0da80b886 | ||
|
|
cf11fb5c3d | ||
|
|
729b48566e | ||
|
|
4f97378655 | ||
|
|
1a848823c5 | ||
|
|
526edbaca7 | ||
|
|
fa98c842d0 | ||
|
|
c7a0a4a493 | ||
|
|
cfa3fd69e0 | ||
|
|
e3bc4db204 | ||
|
|
6589e819f4 | ||
|
|
eefaebace8 | ||
|
|
35887450ce | ||
|
|
0f74645173 | ||
|
|
3388e090bb | ||
|
|
1d50425de1 | ||
|
|
4b69c44559 | ||
|
|
c673beab9d | ||
|
|
ce5b63a91c | ||
|
|
660d44cd76 | ||
|
|
3922ffcafb | ||
|
|
6d84279d46 | ||
|
|
bfbac046db | ||
|
|
3d071d8687 | ||
|
|
330d668d07 | ||
|
|
d07b5c550c | ||
|
|
3fbbeb0c5d | ||
|
|
637a853141 | ||
|
|
28387df059 | ||
|
|
6765770dea | ||
|
|
43d22c40a8 | ||
|
|
438aa25cc1 | ||
|
|
98a340a751 | ||
|
|
568cb08e4a | ||
|
|
93c76533d6 | ||
|
|
64a7520466 | ||
|
|
1b7d647d60 | ||
|
|
046bec29b2 | ||
|
|
13df17f236 | ||
|
|
631de2350d | ||
|
|
aa8ac56ff7 | ||
|
|
8df54367c5 | ||
|
|
a194aad9e9 | ||
|
|
fd2197eace | ||
|
|
c0983e0a62 | ||
|
|
4df33254d0 | ||
|
|
1c7fb3b61c | ||
|
|
c592e704ba | ||
|
|
e92662fd9b | ||
|
|
1dbc102cfc | ||
|
|
65c77f7d93 | ||
|
|
e715d02ea1 | ||
|
|
e5fac3efa3 | ||
|
|
4eb6d699c1 | ||
|
|
5c80c1eb94 | ||
|
|
60cbfd486c | ||
|
|
a5b36447b3 | ||
|
|
ce62da5b5c | ||
|
|
5e4a185e9d | ||
|
|
08765c7957 | ||
|
|
28e71adaf5 | ||
|
|
ea79d2900e | ||
|
|
28c59f88e9 | ||
|
|
fb3dc200fb | ||
|
|
e7223c96b7 | ||
|
|
90a531d2a8 | ||
|
|
1f1c71b218 | ||
|
|
b39fdaca95 | ||
|
|
65039feeba | ||
|
|
c62dabc3e3 | ||
|
|
b1f22c4421 | ||
|
|
2814739c1e | ||
|
|
d2cb97ab0a | ||
|
|
98514ac46f | ||
|
|
aaa10a5fff | ||
|
|
49c3f0e4bb | ||
|
|
673c779ca5 | ||
|
|
8c74c7a77c | ||
|
|
376d564004 | ||
|
|
26f3265299 | ||
|
|
d3d5554969 | ||
|
|
5ea3854043 | ||
|
|
ca08a101d1 | ||
|
|
d4de692822 | ||
|
|
2dc702efc6 | ||
|
|
8601363d46 | ||
|
|
110a342bb1 | ||
|
|
e4caebc368 | ||
|
|
934d353537 | ||
|
|
11465d1946 | ||
|
|
fdc5bc34fd | ||
|
|
10a91df31c | ||
|
|
c503830c25 | ||
|
|
0195524f17 | ||
|
|
c2ce4bed8f | ||
|
|
fd8b77a9df | ||
|
|
4b83741dbe | ||
|
|
ab5fbe8a9c | ||
|
|
30aef59c55 | ||
|
|
813d5f01dd | ||
|
|
040a19a400 | ||
|
|
13a5298be7 | ||
|
|
b366e47197 | ||
|
|
9bbc41d7b7 | ||
|
|
4a8703d5f0 | ||
|
|
dcb5c886fa | ||
|
|
fbc6425a13 | ||
|
|
332f2a492d | ||
|
|
86cab45ce2 | ||
|
|
0759aad72f | ||
|
|
9781a05d78 | ||
|
|
8c61b0ebc0 | ||
|
|
1d8f8dcdf9 | ||
|
|
8716026ae8 | ||
|
|
6dbef7c929 | ||
|
|
47775ac085 | ||
|
|
51aa38764a | ||
|
|
2b8010c24a | ||
|
|
8a24eeff24 | ||
|
|
863ece66fa | ||
|
|
b8f696ad69 | ||
|
|
40b31c7d00 | ||
|
|
d85983bbe9 | ||
|
|
143e006e55 | ||
|
|
68a8d6e052 | ||
|
|
ca22316ae4 | ||
|
|
46c0ec9c63 | ||
|
|
c9d4be3d1c | ||
|
|
f9b008f7d2 | ||
|
|
f2474ba8da | ||
|
|
52fc11eb57 | ||
|
|
72ab42e7bf | ||
|
|
5b32c96f1d | ||
|
|
846204c244 | ||
|
|
c0e62ad8e8 | ||
|
|
31bbbe098a | ||
|
|
0fb89ceb06 | ||
|
|
0f904e66d4 | ||
|
|
74739343d4 | ||
|
|
d4f1b9988b | ||
|
|
cd38113da2 | ||
|
|
c95772122f | ||
|
|
3196275bb1 | ||
|
|
483ee12ccd | ||
|
|
ba14dfdc46 | ||
|
|
b7a2e7d097 | ||
|
|
6ff8dcffc1 | ||
|
|
bc8903d3c8 | ||
|
|
6e43e7a336 | ||
|
|
df81050c2a | ||
|
|
ebfafc66cb | ||
|
|
bccf5d0f48 | ||
|
|
761a9f4505 | ||
|
|
5f29c44a9e | ||
|
|
c5b22427f3 | ||
|
|
d3737f5a62 | ||
|
|
7bef57ca76 | ||
|
|
ebff4cd1c0 | ||
|
|
b0dc96c888 | ||
|
|
13e1b933e1 | ||
|
|
b25cab1fe6 | ||
|
|
01ebefcb74 | ||
|
|
e536b0d5e2 | ||
|
|
2147f1f129 | ||
|
|
e684a1e91b | ||
|
|
6f95aeac8f | ||
|
|
f071f84eb4 | ||
|
|
8db478d8f0 | ||
|
|
ce481b0f25 | ||
|
|
6af16d7fca | ||
|
|
850cc3b2bd | ||
|
|
a1363ef41b | ||
|
|
71f82251f6 | ||
|
|
eaf39661ba | ||
|
|
2b991d9958 | ||
|
|
eed8b29753 | ||
|
|
ebc8e3a27b | ||
|
|
aa2ed93d74 | ||
|
|
ba520e6aa1 | ||
|
|
61373e87ea | ||
|
|
4dd95b1b0f | ||
|
|
f160b4fa80 | ||
|
|
de637f1048 | ||
|
|
f628868a8e | ||
|
|
9dd2221841 | ||
|
|
24d68efd4b | ||
|
|
ad8c3da48b | ||
|
|
7255ea4805 | ||
|
|
47cf80102c | ||
|
|
2cebe069f2 | ||
|
|
3326ba5784 | ||
|
|
5e5fa22566 | ||
|
|
95dbad842d | ||
|
|
5576c9e2e9 | ||
|
|
3577fc613e | ||
|
|
7bdeefd7e1 | ||
|
|
df2697c68b | ||
|
|
d859075e97 | ||
|
|
d6c282a70a | ||
|
|
f541fae982 | ||
|
|
054cc5cad9 | ||
|
|
b52f0cd112 | ||
|
|
4865f6c87b | ||
|
|
b2ceca3a8f | ||
|
|
2c4ee9370c | ||
|
|
1f10cad45b | ||
|
|
c2e92fa355 | ||
|
|
2f85371738 | ||
|
|
a48c9f5a77 | ||
|
|
61728cfa07 | ||
|
|
1643e74758 | ||
|
|
33a354688a | ||
|
|
7c2d6f6fb5 | ||
|
|
ea959248ca | ||
|
|
2665a3be40 | ||
|
|
d240cf0a53 | ||
|
|
c02e7cd0b5 | ||
|
|
6a3e15aabf | ||
|
|
e4bae8cdc5 | ||
|
|
e0e679d436 | ||
|
|
0f3050521d | ||
|
|
db5a10bb96 | ||
|
|
b05954eccd | ||
|
|
d2504dac64 | ||
|
|
a95e4124a8 | ||
|
|
c18630b0a5 | ||
|
|
f436aa835d | ||
|
|
7409c89a87 | ||
|
|
0de8405906 | ||
|
|
39d4bfe858 | ||
|
|
0677cb2a90 | ||
|
|
2dd2e64f43 | ||
|
|
3d45172991 | ||
|
|
979fb791ac | ||
|
|
1fcc2d996c | ||
|
|
e1d1891de8 | ||
|
|
fabfcbd742 | ||
|
|
3710fa9e79 | ||
|
|
b059261065 | ||
|
|
7b1b91ca14 | ||
|
|
098127c287 | ||
|
|
83c99f34a3 | ||
|
|
a9ae141838 | ||
|
|
c783416054 | ||
|
|
59e1bc3c56 | ||
|
|
f4cdff0c2c | ||
|
|
5bd99480f1 | ||
|
|
a86e7e4182 | ||
|
|
c3477264b3 | ||
|
|
9c4c33aa76 | ||
|
|
9b5aea5aec | ||
|
|
614ee50262 | ||
|
|
f1b7c973d3 | ||
|
|
0c7fad798c | ||
|
|
e4ed3cf978 | ||
|
|
63687b7f48 | ||
|
|
20454a21ed | ||
|
|
eb30cb0cb6 | ||
|
|
b211fae85c | ||
|
|
93b4774903 | ||
|
|
236b55fce6 | ||
|
|
c34bf50c39 | ||
|
|
b8f921dab2 | ||
|
|
fc79be3010 | ||
|
|
63d08eeed2 | ||
|
|
7fa39f645d | ||
|
|
535677fc8e | ||
|
|
2dfff50031 | ||
|
|
c335b6b7fb | ||
|
|
a81c4c7a75 | ||
|
|
e2ada5e6b2 | ||
|
|
43ae4ac317 | ||
|
|
5f0ee6d95e | ||
|
|
0947172391 | ||
|
|
0fb9680f72 | ||
|
|
ba94a3bba0 | ||
|
|
11963e263d | ||
|
|
3f15cb8fff | ||
|
|
eca4f8e06d | ||
|
|
358be2ee92 | ||
|
|
acd8f949e7 | ||
|
|
a1574af5e0 | ||
|
|
525e73e179 | ||
|
|
abe1745642 | ||
|
|
eda925e617 | ||
|
|
5ab3f7ba16 | ||
|
|
cb12bdad2d | ||
|
|
2a6c2fc273 | ||
|
|
216c04b3f1 | ||
|
|
0ecb6ea1aa | ||
|
|
f3fff8543d | ||
|
|
2d75b57195 | ||
|
|
7ebd73916e | ||
|
|
cafa9d521a | ||
|
|
a5b395d888 | ||
|
|
c214640bb1 | ||
|
|
d7a8b35ded | ||
|
|
bcc86e160f | ||
|
|
5b14389c6e | ||
|
|
0ba4803154 | ||
|
|
e58f9cae28 | ||
|
|
1d5c049c01 | ||
|
|
0d01b4a2ea | ||
|
|
d43a758a37 | ||
|
|
d886372f11 | ||
|
|
838d44bd5c | ||
|
|
8f997eb4f3 | ||
|
|
65b3fc56ef | ||
|
|
6e061cbc30 | ||
|
|
9e44b76214 | ||
|
|
d1e928e068 | ||
|
|
2c2249d96b | ||
|
|
d87e932030 | ||
|
|
44cac8a7e1 | ||
|
|
736d3c8744 | ||
|
|
3104065437 | ||
|
|
444695a908 | ||
|
|
eba6f4eaf2 | ||
|
|
e3b4f0b159 | ||
|
|
5c55939765 | ||
|
|
bd69d00182 | ||
|
|
7312789e12 | ||
|
|
4e765e64ca | ||
|
|
660f86018a | ||
|
|
b5050acba0 | ||
|
|
2fa780236b | ||
|
|
831770e7d8 | ||
|
|
c50102e153 | ||
|
|
54088daa67 | ||
|
|
169312f021 | ||
|
|
62ab717772 | ||
|
|
6273bcdd3f | ||
|
|
5b894794dd | ||
|
|
b31c41fdda | ||
|
|
2c6bcacb25 | ||
|
|
ed9b9881b6 | ||
|
|
2d2945cc5c | ||
|
|
3b1a1fbbe2 | ||
|
|
be2f15f77b | ||
|
|
3c4872c231 | ||
|
|
8c605674f3 | ||
|
|
c1549faca1 | ||
|
|
f4b98cd4ff | ||
|
|
cbeac572f5 | ||
|
|
f94371f16c | ||
|
|
7111a2aee3 | ||
|
|
cc82304996 | ||
|
|
3d91b8ab13 | ||
|
|
9a4ae52df0 | ||
|
|
466b6bb1dd | ||
|
|
facf511621 | ||
|
|
c4cada924e | ||
|
|
99b8a02c0e | ||
|
|
b74ed1490a | ||
|
|
02f64e318d | ||
|
|
2938014b33 | ||
|
|
45040555f0 | ||
|
|
591ec57c49 | ||
|
|
d5626ab7df | ||
|
|
2a25efba1a | ||
|
|
9197d24fff | ||
|
|
9fa87c5141 | ||
|
|
dddf2e9ea1 | ||
|
|
69ea8838cd | ||
|
|
33ea31f1fa | ||
|
|
e2adcabc5b | ||
|
|
a33ded4409 | ||
|
|
6161518d8b | ||
|
|
bf40cb2009 | ||
|
|
12f8315a84 | ||
|
|
0f460483f3 | ||
|
|
bf22cd1638 | ||
|
|
e656c89ba1 | ||
|
|
b8416ed4c1 | ||
|
|
62b8e18c9e | ||
|
|
1e09ccbc0c | ||
|
|
76717f6141 | ||
|
|
33308688aa | ||
|
|
df481aaf07 | ||
|
|
82190b330b | ||
|
|
19d8103806 | ||
|
|
30b6120582 | ||
|
|
b7aa8bd56c | ||
|
|
4aad818888 | ||
|
|
68a51af239 | ||
|
|
80d64ae4e0 | ||
|
|
cd295e2315 | ||
|
|
80bdd6761b | ||
|
|
bf0798d397 | ||
|
|
e130a87e81 | ||
|
|
34e22c63a0 | ||
|
|
70db2a15f4 | ||
|
|
aaa7be7bff | ||
|
|
000fda848b | ||
|
|
c0f0595ad7 | ||
|
|
62ad6dde67 | ||
|
|
8750fe7a43 | ||
|
|
b0f0bb10ec | ||
|
|
e05f276b6a | ||
|
|
a075934168 | ||
|
|
5898ebb5f0 | ||
|
|
d122c83535 | ||
|
|
2025e8f10b | ||
|
|
3339a63268 | ||
|
|
3d2eef2a69 | ||
|
|
aa9f1074bd | ||
|
|
545ba36db4 | ||
|
|
53b8979861 | ||
|
|
0569a4b633 | ||
|
|
cc306475b2 | ||
|
|
3f0982dd7c | ||
|
|
017ef727ab | ||
|
|
1f1635ede3 | ||
|
|
f2f2e780b0 | ||
|
|
f32e7df86a | ||
|
|
030e219cbd | ||
|
|
111e8c82c4 | ||
|
|
d0aad8589d | ||
|
|
c7eb890ffe | ||
|
|
47a9bde70b | ||
|
|
7abadcc6c3 | ||
|
|
8a52bcfec2 | ||
|
|
81770d2182 | ||
|
|
0ed030fae3 | ||
|
|
a8dd0632f2 | ||
|
|
04f7e84642 | ||
|
|
efda17ecfa | ||
|
|
11c9bf39ff | ||
|
|
c41cfe5ae2 | ||
|
|
61c6270edd | ||
|
|
1fe5e6ad8e | ||
|
|
8c7fbcd7d4 | ||
|
|
6746fdb98e | ||
|
|
4cf48bb50f | ||
|
|
80a4e54802 | ||
|
|
c19a958629 | ||
|
|
9b969087a5 | ||
|
|
121de8090f | ||
|
|
ae18a10fd8 | ||
|
|
05b0ef75c9 | ||
|
|
8dfad0aa5d | ||
|
|
b07f2e9633 | ||
|
|
6ecc435b85 | ||
|
|
a0a70495f0 | ||
|
|
29981dfd52 | ||
|
|
86735ac3b7 | ||
|
|
e5a1a10101 | ||
|
|
f362a83cfa | ||
|
|
df902fb08e | ||
|
|
29de36f348 | ||
|
|
92e7603aa5 | ||
|
|
e3431f201c | ||
|
|
5c7a6bbf8f | ||
|
|
d6a82d1962 | ||
|
|
a7a5ada4d9 | ||
|
|
6ff50cb42d | ||
|
|
7ffc89f41b | ||
|
|
8c1131442b | ||
|
|
c49acc9084 | ||
|
|
f03cfcb0e3 | ||
|
|
460d7c5aea | ||
|
|
50fd681420 | ||
|
|
70c8ca3a55 | ||
|
|
1234f789a4 | ||
|
|
25fd009be3 | ||
|
|
9ffab47f83 | ||
|
|
38c46f3d5c | ||
|
|
3a0c33c5cf | ||
|
|
5d6b057361 | ||
|
|
8fcbdc8ea0 | ||
|
|
a774f9052d | ||
|
|
2d79b5a988 | ||
|
|
86ae5e14b4 | ||
|
|
8153d4a139 | ||
|
|
3e80d86628 | ||
|
|
a097330772 | ||
|
|
5545743bd8 | ||
|
|
ccd212f839 | ||
|
|
5697625a7d | ||
|
|
3d54005332 | ||
|
|
a5894dfae8 | ||
|
|
b3aa6e37b9 | ||
|
|
e4e7661a3d | ||
|
|
9fe38ad649 | ||
|
|
a8a03a831a | ||
|
|
0df4db9286 | ||
|
|
e4599e3076 | ||
|
|
1a0d8933dc | ||
|
|
00af30281c | ||
|
|
8c85b3098d | ||
|
|
000607f8e0 | ||
|
|
82e3698dd2 | ||
|
|
0dd9535a5b | ||
|
|
088b3f60ea | ||
|
|
c118159121 | ||
|
|
5fad745220 | ||
|
|
02b41bfbdc | ||
|
|
82ab3faca3 | ||
|
|
df74757e83 | ||
|
|
a21772f3c2 | ||
|
|
cbd930a340 | ||
|
|
9f129c9781 | ||
|
|
18931e94b0 | ||
|
|
1520828dff | ||
|
|
43223d1677 | ||
|
|
3fb9836fc8 | ||
|
|
8cd5a10ea8 | ||
|
|
da1850896b | ||
|
|
336ef01dee | ||
|
|
246bf189b5 | ||
|
|
825effadd9 | ||
|
|
51f53855f8 | ||
|
|
65fa29fbb8 | ||
|
|
5bcfa06e19 | ||
|
|
b01218958f | ||
|
|
7887f0e7a1 | ||
|
|
f522502938 | ||
|
|
c7f533cf0a | ||
|
|
a3107de33e | ||
|
|
e69a3249e5 | ||
|
|
f3c24f05e0 | ||
|
|
20364bb1d7 | ||
|
|
3d1c92dae4 | ||
|
|
4048895c6b | ||
|
|
991908bd8d | ||
|
|
8ff559dbef | ||
|
|
d7d483ef9c | ||
|
|
b11064e3a8 | ||
|
|
409d35b29b | ||
|
|
811cf40cd7 | ||
|
|
3aa9d23ac6 | ||
|
|
9c8bb08454 | ||
|
|
2c28af0dd7 | ||
|
|
cc6bd40b15 | ||
|
|
5221ba0959 | ||
|
|
61f132327d | ||
|
|
826730e88b | ||
|
|
5cdb08c35f | ||
|
|
9806d3705a | ||
|
|
55e6e66df6 | ||
|
|
0d38b23a60 | ||
|
|
07fd0ab6bf | ||
|
|
6036b0635d | ||
|
|
74f678076a |
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
error-log.txt
|
||||
backups/*.zip
|
||||
lib/config-*
|
||||
test/test-file1.txt
|
||||
tmp/oldVersion
|
||||
tmp/new-version*
|
||||
tmp/bug-report.log
|
||||
@@ -1,6 +0,0 @@
|
||||
.cm-s-ambiance.CodeMirror {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
-o-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 2012 by Marijn Haverbeke <marijnh@gmail.com>
|
||||
Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -17,7 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Please note that some subdirectories of the CodeMirror distribution
|
||||
include their own LICENSE files, and are released under different
|
||||
licences.
|
||||
38
CodeMirror-4.2/addon/hint/show-hint.css
Normal file
@@ -0,0 +1,38 @@
|
||||
.CodeMirror-hints {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
border-radius: 3px;
|
||||
border: 1px solid silver;
|
||||
|
||||
background: white;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
|
||||
max-height: 20em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
max-width: 19em;
|
||||
overflow: hidden;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
||||
73
CodeMirror-4.2/addon/lint/lint.css
Normal file
@@ -0,0 +1,73 @@
|
||||
/* The lint marker gutter */
|
||||
.CodeMirror-lint-markers {
|
||||
width: 12px; margin-left: 2px;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-tooltip {
|
||||
background-color: infobackground;
|
||||
border: 1px solid black;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
color: infotext;
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
overflow: hidden;
|
||||
padding: 2px 5px;
|
||||
position: fixed;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
z-index: 100;
|
||||
max-width: 600px;
|
||||
opacity: 0;
|
||||
transition: opacity .4s;
|
||||
-moz-transition: opacity .4s;
|
||||
-webkit-transition: opacity .4s;
|
||||
-o-transition: opacity .4s;
|
||||
-ms-transition: opacity .4s;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
|
||||
background-position: left bottom;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark-error {
|
||||
background-image:
|
||||
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
|
||||
;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark-warning {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
cursor: help;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
|
||||
padding-left: 18px;
|
||||
background-position: top left;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-multiple {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right bottom;
|
||||
width: 100%; height: 100%;
|
||||
}
|
||||
54
CodeMirror-4.2/lib/codemirror-compressed.js
Normal file
@@ -19,7 +19,7 @@
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler {
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
@@ -35,30 +36,33 @@
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror pre.CodeMirror-cursor {
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror pre.CodeMirror-secondarycursor {
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
|
||||
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
background: rgba(0, 200, 0, .4);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
|
||||
}
|
||||
/* Kludge to turn off filter in ie9+, which also accepts rgba */
|
||||
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
background: #7e7;
|
||||
}
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
|
||||
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; }
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
@@ -66,16 +70,16 @@
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable {color: black;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3 {color: #085;}
|
||||
.cm-s-default .cm-property {color: black;}
|
||||
.cm-s-default .cm-operator {color: black;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
@@ -90,13 +94,14 @@
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-emstrong {font-style: italic; font-weight: bold;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
@@ -107,25 +112,32 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px; padding-right: 30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actuall scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
@@ -142,16 +154,23 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
z-index: 6;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
height: 100%;
|
||||
padding-bottom: 30px;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
padding-bottom: 30px;
|
||||
margin-bottom: -32px;
|
||||
display: inline-block;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
@@ -168,7 +187,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
@@ -187,6 +206,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
@@ -196,34 +216,44 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-wrap .CodeMirror-scroll {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%; height: 0px;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
.CodeMirror pre.CodeMirror-cursor {
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
.CodeMirror-focused pre.CodeMirror-cursor {
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
|
||||
.CodeMirror-searching {
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
@@ -231,9 +261,12 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror pre.CodeMirror-cursor {
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
34
CodeMirror-4.2/theme/3024-day.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: 3024 day
|
||||
Author: Jan T. Sott (http://github.com/idleberg)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
|
||||
.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
|
||||
.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
|
||||
.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;}
|
||||
.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;}
|
||||
|
||||
.cm-s-3024-day span.cm-comment {color: #cdab53;}
|
||||
.cm-s-3024-day span.cm-atom {color: #a16a94;}
|
||||
.cm-s-3024-day span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;}
|
||||
.cm-s-3024-day span.cm-keyword {color: #db2d20;}
|
||||
.cm-s-3024-day span.cm-string {color: #fded02;}
|
||||
|
||||
.cm-s-3024-day span.cm-variable {color: #01a252;}
|
||||
.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;}
|
||||
.cm-s-3024-day span.cm-def {color: #e8bbd0;}
|
||||
.cm-s-3024-day span.cm-bracket {color: #3a3432;}
|
||||
.cm-s-3024-day span.cm-tag {color: #db2d20;}
|
||||
.cm-s-3024-day span.cm-link {color: #a16a94;}
|
||||
.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;}
|
||||
|
||||
.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
34
CodeMirror-4.2/theme/3024-night.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: 3024 night
|
||||
Author: Jan T. Sott (http://github.com/idleberg)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
|
||||
.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
|
||||
.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
|
||||
.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;}
|
||||
.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;}
|
||||
|
||||
.cm-s-3024-night span.cm-comment {color: #cdab53;}
|
||||
.cm-s-3024-night span.cm-atom {color: #a16a94;}
|
||||
.cm-s-3024-night span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;}
|
||||
.cm-s-3024-night span.cm-keyword {color: #db2d20;}
|
||||
.cm-s-3024-night span.cm-string {color: #fded02;}
|
||||
|
||||
.cm-s-3024-night span.cm-variable {color: #01a252;}
|
||||
.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;}
|
||||
.cm-s-3024-night span.cm-def {color: #e8bbd0;}
|
||||
.cm-s-3024-night span.cm-bracket {color: #d6d5d4;}
|
||||
.cm-s-3024-night span.cm-tag {color: #db2d20;}
|
||||
.cm-s-3024-night span.cm-link {color: #a16a94;}
|
||||
.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;}
|
||||
|
||||
.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;}
|
||||
.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -15,7 +15,6 @@
|
||||
.cm-s-ambiance .cm-string { color: #8f9d6a; }
|
||||
.cm-s-ambiance .cm-string-2 { color: #9d937c; }
|
||||
.cm-s-ambiance .cm-meta { color: #D2A8A1; }
|
||||
.cm-s-ambiance .cm-error { color: #AF2018; }
|
||||
.cm-s-ambiance .cm-qualifier { color: yellow; }
|
||||
.cm-s-ambiance .cm-builtin { color: #9999cc; }
|
||||
.cm-s-ambiance .cm-bracket { color: #24C2C7; }
|
||||
@@ -26,6 +25,7 @@
|
||||
.cm-s-ambiance .cm-hr { color: pink; }
|
||||
.cm-s-ambiance .cm-link { color: #F4C20B; }
|
||||
.cm-s-ambiance .cm-special { color: #FF9D00; }
|
||||
.cm-s-ambiance .cm-error { color: #AF2018; }
|
||||
|
||||
.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
|
||||
.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }
|
||||
@@ -33,7 +33,7 @@
|
||||
.cm-s-ambiance .CodeMirror-selected {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
.cm-s-ambiance .CodeMirror-focused .CodeMirror-selected {
|
||||
.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
@@ -41,12 +41,10 @@
|
||||
|
||||
.cm-s-ambiance.CodeMirror {
|
||||
line-height: 1.40em;
|
||||
font-family: Monaco, Menlo,"Andale Mono","lucida console","Courier New",monospace !important;
|
||||
color: #E6E1DC;
|
||||
background-color: #202020;
|
||||
-webkit-box-shadow: inset 0 0 10px black;
|
||||
-moz-box-shadow: inset 0 0 10px black;
|
||||
-o-box-shadow: inset 0 0 10px black;
|
||||
box-shadow: inset 0 0 10px black;
|
||||
}
|
||||
|
||||
@@ -66,7 +64,7 @@
|
||||
border-left: 1px solid #7991E8;
|
||||
}
|
||||
|
||||
.cm-s-ambiance .activeline {
|
||||
.cm-s-ambiance .CodeMirror-activeline-background {
|
||||
background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031);
|
||||
}
|
||||
|
||||
34
CodeMirror-4.2/theme/base16-dark.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Base16 Default Dark
|
||||
Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
|
||||
.cm-s-base16-dark div.CodeMirror-selected {background: #202020 !important;}
|
||||
.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
|
||||
.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}
|
||||
.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}
|
||||
|
||||
.cm-s-base16-dark span.cm-comment {color: #8f5536;}
|
||||
.cm-s-base16-dark span.cm-atom {color: #aa759f;}
|
||||
.cm-s-base16-dark span.cm-number {color: #aa759f;}
|
||||
|
||||
.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;}
|
||||
.cm-s-base16-dark span.cm-keyword {color: #ac4142;}
|
||||
.cm-s-base16-dark span.cm-string {color: #f4bf75;}
|
||||
|
||||
.cm-s-base16-dark span.cm-variable {color: #90a959;}
|
||||
.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;}
|
||||
.cm-s-base16-dark span.cm-def {color: #d28445;}
|
||||
.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;}
|
||||
.cm-s-base16-dark span.cm-tag {color: #ac4142;}
|
||||
.cm-s-base16-dark span.cm-link {color: #aa759f;}
|
||||
.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;}
|
||||
|
||||
.cm-s-base16-dark .CodeMirror-activeline-background {background: #2F2F2F !important;}
|
||||
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
34
CodeMirror-4.2/theme/base16-light.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Base16 Default Light
|
||||
Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
|
||||
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
|
||||
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
|
||||
.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
|
||||
.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
|
||||
|
||||
.cm-s-base16-light span.cm-comment {color: #8f5536;}
|
||||
.cm-s-base16-light span.cm-atom {color: #aa759f;}
|
||||
.cm-s-base16-light span.cm-number {color: #aa759f;}
|
||||
|
||||
.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
|
||||
.cm-s-base16-light span.cm-keyword {color: #ac4142;}
|
||||
.cm-s-base16-light span.cm-string {color: #f4bf75;}
|
||||
|
||||
.cm-s-base16-light span.cm-variable {color: #90a959;}
|
||||
.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
|
||||
.cm-s-base16-light span.cm-def {color: #d28445;}
|
||||
.cm-s-base16-light span.cm-bracket {color: #202020;}
|
||||
.cm-s-base16-light span.cm-tag {color: #ac4142;}
|
||||
.cm-s-base16-light span.cm-link {color: #aa759f;}
|
||||
.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}
|
||||
|
||||
.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
|
||||
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -16,10 +16,13 @@
|
||||
.cm-s-blackboard .cm-string { color: #61CE3C; }
|
||||
.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
|
||||
.cm-s-blackboard .cm-meta { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
|
||||
.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-tag { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-header { color: #FF6400; }
|
||||
.cm-s-blackboard .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-blackboard .cm-link { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
|
||||
|
||||
.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;}
|
||||
.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
|
||||
@@ -12,7 +12,10 @@
|
||||
.cm-s-cobalt span.cm-meta { color: #ff9d00; }
|
||||
.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
|
||||
.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }
|
||||
.cm-s-cobalt span.cm-error { color: #9d1e15; }
|
||||
.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
|
||||
.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
|
||||
.cm-s-cobalt span.cm-link { color: #845dc4; }
|
||||
.cm-s-cobalt span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;}
|
||||
.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
|
||||
@@ -11,15 +11,13 @@
|
||||
.cm-s-eclipse span.cm-comment {color: #3F7F5F;}
|
||||
.cm-s-eclipse span.cm-string {color: #2A00FF;}
|
||||
.cm-s-eclipse span.cm-string-2 {color: #f50;}
|
||||
.cm-s-eclipse span.cm-error {color: #f00;}
|
||||
.cm-s-eclipse span.cm-qualifier {color: #555;}
|
||||
.cm-s-eclipse span.cm-builtin {color: #30a;}
|
||||
.cm-s-eclipse span.cm-bracket {color: #cc7;}
|
||||
.cm-s-eclipse span.cm-tag {color: #170;}
|
||||
.cm-s-eclipse span.cm-attribute {color: #00c;}
|
||||
.cm-s-eclipse span.cm-link {color: #219;}
|
||||
.cm-s-eclipse span.cm-error {color: #f00;}
|
||||
|
||||
.cm-s-eclipse .CodeMirror-matchingbracket {
|
||||
border:1px solid grey;
|
||||
color:black !important;;
|
||||
}
|
||||
.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
|
||||
@@ -6,5 +6,8 @@
|
||||
.cm-s-elegant span.cm-qualifier {color: #555;}
|
||||
.cm-s-elegant span.cm-keyword {color: #730;}
|
||||
.cm-s-elegant span.cm-builtin {color: #30a;}
|
||||
.cm-s-elegant span.cm-error {background-color: #fdd;}
|
||||
.cm-s-elegant span.cm-link {color: #762;}
|
||||
.cm-s-elegant span.cm-error {background-color: #fdd;}
|
||||
|
||||
.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
|
||||
@@ -4,18 +4,27 @@
|
||||
.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-erlang-dark span.cm-atom { color: #845dc4; }
|
||||
.cm-s-erlang-dark span.cm-atom { color: #f133f1; }
|
||||
.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; }
|
||||
.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; }
|
||||
.cm-s-erlang-dark span.cm-builtin { color: #eeaaaa; }
|
||||
.cm-s-erlang-dark span.cm-comment { color: #7777ff; }
|
||||
.cm-s-erlang-dark span.cm-def { color: #ee77aa; }
|
||||
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
|
||||
.cm-s-erlang-dark span.cm-builtin { color: #eaa; }
|
||||
.cm-s-erlang-dark span.cm-comment { color: #77f; }
|
||||
.cm-s-erlang-dark span.cm-def { color: #e7a; }
|
||||
.cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
|
||||
.cm-s-erlang-dark span.cm-meta { color: #50fefe; }
|
||||
.cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
|
||||
.cm-s-erlang-dark span.cm-operator { color: #dd1111; }
|
||||
.cm-s-erlang-dark span.cm-operator { color: #d55; }
|
||||
.cm-s-erlang-dark span.cm-property { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-qualifier { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-quote { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-special { color: #ffbbbb; }
|
||||
.cm-s-erlang-dark span.cm-string { color: #3ad900; }
|
||||
.cm-s-erlang-dark span.cm-string-2 { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-tag { color: #9effff; }
|
||||
.cm-s-erlang-dark span.cm-variable { color: #50fe50; }
|
||||
.cm-s-erlang-dark span.cm-variable-2 { color: #ee00ee; }
|
||||
.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
|
||||
.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;}
|
||||
.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -5,16 +5,12 @@ Ported to CodeMirror by Peter Kroon
|
||||
.cm-s-lesser-dark {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.cm-s-lesser-dark {
|
||||
font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important;
|
||||
}
|
||||
|
||||
.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
|
||||
.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
|
||||
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
||||
.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
||||
|
||||
.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
|
||||
.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
|
||||
@@ -32,7 +28,6 @@ div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
||||
.cm-s-lesser-dark span.cm-string { color: #BCD279; }
|
||||
.cm-s-lesser-dark span.cm-string-2 {color: #f50;}
|
||||
.cm-s-lesser-dark span.cm-meta { color: #738C73; }
|
||||
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
|
||||
.cm-s-lesser-dark span.cm-qualifier {color: #555;}
|
||||
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
|
||||
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
|
||||
@@ -42,3 +37,7 @@ div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
||||
.cm-s-lesser-dark span.cm-quote {color: #090;}
|
||||
.cm-s-lesser-dark span.cm-hr {color: #999;}
|
||||
.cm-s-lesser-dark span.cm-link {color: #00c;}
|
||||
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;}
|
||||
.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
37
CodeMirror-4.2/theme/mbo.css
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Based on mbonaci's Brackets mbo theme */
|
||||
|
||||
.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffe9;}
|
||||
.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
|
||||
.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
|
||||
.cm-s-mbo .CodeMirror-linenumber {color: #dadada;}
|
||||
.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;}
|
||||
|
||||
.cm-s-mbo span.cm-comment {color: #95958a;}
|
||||
.cm-s-mbo span.cm-atom {color: #00a8c6;}
|
||||
.cm-s-mbo span.cm-number {color: #00a8c6;}
|
||||
|
||||
.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;}
|
||||
.cm-s-mbo span.cm-keyword {color: #ffb928;}
|
||||
.cm-s-mbo span.cm-string {color: #ffcf6c;}
|
||||
|
||||
.cm-s-mbo span.cm-variable {color: #ffffec;}
|
||||
.cm-s-mbo span.cm-variable-2 {color: #00a8c6;}
|
||||
.cm-s-mbo span.cm-def {color: #ffffec;}
|
||||
.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;}
|
||||
.cm-s-mbo span.cm-tag {color: #9ddfe9;}
|
||||
.cm-s-mbo span.cm-link {color: #f54b07;}
|
||||
.cm-s-mbo span.cm-error {background: #636363; color: #ffffec;}
|
||||
|
||||
.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;}
|
||||
.cm-s-mbo .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: #f5e107 !important;
|
||||
}
|
||||
|
||||
.cm-s-mbo .CodeMirror-matchingtag {background: #4e4e4e;}
|
||||
|
||||
.cm-s-mbo span.cm-searching {
|
||||
background-color: none;
|
||||
background: none;
|
||||
box-shadow: 0 0 0 1px #ffffec;
|
||||
}
|
||||
44
CodeMirror-4.2/theme/mdn-like.css
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
MDN-LIKE Theme - Mozilla
|
||||
Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
|
||||
Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues
|
||||
GitHub: @peterkroon
|
||||
|
||||
The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation
|
||||
|
||||
*/
|
||||
.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
|
||||
.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
|
||||
|
||||
.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
|
||||
.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; margin-left: 3px; }
|
||||
div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
|
||||
|
||||
.cm-s-mdn-like .cm-keyword { color: #6262FF; }
|
||||
.cm-s-mdn-like .cm-atom { color: #F90; }
|
||||
.cm-s-mdn-like .cm-number { color: #ca7841; }
|
||||
.cm-s-mdn-like .cm-def { color: #8DA6CE; }
|
||||
.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; }
|
||||
.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def { color: #07a; }
|
||||
|
||||
.cm-s-mdn-like .cm-variable { color: #07a; }
|
||||
.cm-s-mdn-like .cm-property { color: #905; }
|
||||
.cm-s-mdn-like .cm-qualifier { color: #690; }
|
||||
|
||||
.cm-s-mdn-like .cm-operator { color: #cda869; }
|
||||
.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; }
|
||||
.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; }
|
||||
.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/
|
||||
.cm-s-mdn-like .cm-meta { color: #000; } /*?*/
|
||||
.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/
|
||||
.cm-s-mdn-like .cm-tag { color: #997643; }
|
||||
.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/
|
||||
.cm-s-mdn-like .cm-header { color: #FF6400; }
|
||||
.cm-s-mdn-like .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-mdn-like .cm-link { color:#ad9361; font-style:italic; text-decoration:none; }
|
||||
.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; }
|
||||
|
||||
div.cm-s-mdn-like .CodeMirror-activeline-background {background: #efefff;}
|
||||
div.cm-s-mdn-like span.CodeMirror-matchingbracket {outline:1px solid grey; color: inherit;}
|
||||
|
||||
.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); }
|
||||
43
CodeMirror-4.2/theme/midnight.css
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
|
||||
|
||||
/*<!--match-->*/
|
||||
.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; }
|
||||
.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
|
||||
|
||||
/*<!--activeline-->*/
|
||||
.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;}
|
||||
|
||||
.cm-s-midnight.CodeMirror {
|
||||
background: #0F192A;
|
||||
color: #D1EDFF;
|
||||
}
|
||||
|
||||
.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
|
||||
.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
|
||||
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
|
||||
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
|
||||
.cm-s-midnight .CodeMirror-cursor {
|
||||
border-left: 1px solid #F8F8F0 !important;
|
||||
}
|
||||
|
||||
.cm-s-midnight span.cm-comment {color: #428BDD;}
|
||||
.cm-s-midnight span.cm-atom {color: #AE81FF;}
|
||||
.cm-s-midnight span.cm-number {color: #D1EDFF;}
|
||||
|
||||
.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;}
|
||||
.cm-s-midnight span.cm-keyword {color: #E83737;}
|
||||
.cm-s-midnight span.cm-string {color: #1DC116;}
|
||||
|
||||
.cm-s-midnight span.cm-variable {color: #FFAA3E;}
|
||||
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
|
||||
.cm-s-midnight span.cm-def {color: #4DD;}
|
||||
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
|
||||
.cm-s-midnight span.cm-tag {color: #449;}
|
||||
.cm-s-midnight span.cm-link {color: #AE81FF;}
|
||||
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
|
||||
|
||||
.cm-s-midnight .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
||||
@@ -17,11 +17,12 @@
|
||||
.cm-s-monokai span.cm-variable {color: #a6e22e;}
|
||||
.cm-s-monokai span.cm-variable-2 {color: #9effff;}
|
||||
.cm-s-monokai span.cm-def {color: #fd971f;}
|
||||
.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
|
||||
.cm-s-monokai span.cm-bracket {color: #f8f8f2;}
|
||||
.cm-s-monokai span.cm-tag {color: #f92672;}
|
||||
.cm-s-monokai span.cm-link {color: #ae81ff;}
|
||||
.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
|
||||
|
||||
.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;}
|
||||
.cm-s-monokai .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
@@ -7,3 +7,6 @@
|
||||
.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
|
||||
.cm-s-neat span.cm-meta {color: #555;}
|
||||
.cm-s-neat span.cm-link { color: #3a3; }
|
||||
|
||||
.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
|
||||
40
CodeMirror-4.2/theme/neo.css
Normal file
@@ -0,0 +1,40 @@
|
||||
/* neo theme for codemirror */
|
||||
|
||||
/* Color scheme */
|
||||
|
||||
.cm-s-neo.CodeMirror {
|
||||
background-color:#ffffff;
|
||||
color:#2e383c;
|
||||
line-height:1.4375;
|
||||
}
|
||||
.cm-s-neo .cm-comment {color:#75787b}
|
||||
.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}
|
||||
.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}
|
||||
.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}
|
||||
.cm-s-neo .cm-string {color:#b35e14}
|
||||
.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}
|
||||
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
.cm-s-neo pre {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.cm-s-neo .CodeMirror-gutters {
|
||||
border:none;
|
||||
border-right:10px solid transparent;
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
.cm-s-neo .CodeMirror-linenumber {
|
||||
padding:0;
|
||||
color:#e0e2e5;
|
||||
}
|
||||
|
||||
.cm-s-neo div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: rgba(155,157,162,0.37);
|
||||
z-index: 1;
|
||||
}
|
||||
@@ -14,8 +14,11 @@
|
||||
.cm-s-night span.cm-meta { color: #7678e2; }
|
||||
.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
|
||||
.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }
|
||||
.cm-s-night span.cm-error { color: #9d1e15; }
|
||||
.cm-s-night span.cm-bracket { color: #8da6ce; }
|
||||
.cm-s-night span.cm-comment { color: #6900a1; }
|
||||
.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
|
||||
.cm-s-night span.cm-link { color: #845dc4; }
|
||||
.cm-s-night span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;}
|
||||
.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
34
CodeMirror-4.2/theme/paraiso-dark.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Paraíso (Dark)
|
||||
Author: Jan T. Sott
|
||||
|
||||
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
|
||||
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
|
||||
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
|
||||
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
|
||||
.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
|
||||
.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}
|
||||
|
||||
.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}
|
||||
.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}
|
||||
.cm-s-paraiso-dark span.cm-number {color: #815ba4;}
|
||||
|
||||
.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}
|
||||
.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}
|
||||
.cm-s-paraiso-dark span.cm-string {color: #fec418;}
|
||||
|
||||
.cm-s-paraiso-dark span.cm-variable {color: #48b685;}
|
||||
.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;}
|
||||
.cm-s-paraiso-dark span.cm-def {color: #f99b15;}
|
||||
.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;}
|
||||
.cm-s-paraiso-dark span.cm-tag {color: #ef6155;}
|
||||
.cm-s-paraiso-dark span.cm-link {color: #815ba4;}
|
||||
.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;}
|
||||
|
||||
.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;}
|
||||
.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
34
CodeMirror-4.2/theme/paraiso-light.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Paraíso (Light)
|
||||
Author: Jan T. Sott
|
||||
|
||||
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
|
||||
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
|
||||
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
|
||||
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
|
||||
.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
|
||||
.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
|
||||
|
||||
.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}
|
||||
.cm-s-paraiso-light span.cm-atom {color: #815ba4;}
|
||||
.cm-s-paraiso-light span.cm-number {color: #815ba4;}
|
||||
|
||||
.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}
|
||||
.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}
|
||||
.cm-s-paraiso-light span.cm-string {color: #fec418;}
|
||||
|
||||
.cm-s-paraiso-light span.cm-variable {color: #48b685;}
|
||||
.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}
|
||||
.cm-s-paraiso-light span.cm-def {color: #f99b15;}
|
||||
.cm-s-paraiso-light span.cm-bracket {color: #41323f;}
|
||||
.cm-s-paraiso-light span.cm-tag {color: #ef6155;}
|
||||
.cm-s-paraiso-light span.cm-link {color: #815ba4;}
|
||||
.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}
|
||||
|
||||
.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}
|
||||
.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
48
CodeMirror-4.2/theme/pastel-on-dark.css
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Pastel On Dark theme ported from ACE editor
|
||||
* @license MIT
|
||||
* @copyright AtomicPages LLC 2014
|
||||
* @author Dennis Thompson, AtomicPages LLC
|
||||
* @version 1.1
|
||||
* @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme
|
||||
*/
|
||||
|
||||
.cm-s-pastel-on-dark.CodeMirror {
|
||||
background: #2c2827;
|
||||
color: #8F938F;
|
||||
line-height: 1.5;
|
||||
font-size: 14px;
|
||||
}
|
||||
.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-gutters {
|
||||
background: #34302f;
|
||||
border-right: 0px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
.cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
|
||||
.cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; }
|
||||
.cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; }
|
||||
.cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; }
|
||||
.cm-s-pastel-on-dark span.cm-property { color: #8F938F; }
|
||||
.cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; }
|
||||
.cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; }
|
||||
.cm-s-pastel-on-dark span.cm-string { color: #66A968; }
|
||||
.cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; }
|
||||
.cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; }
|
||||
.cm-s-pastel-on-dark span.cm-variable-3 { color: #DE8E30; }
|
||||
.cm-s-pastel-on-dark span.cm-def { color: #757aD8; }
|
||||
.cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; }
|
||||
.cm-s-pastel-on-dark span.cm-tag { color: #C1C144; }
|
||||
.cm-s-pastel-on-dark span.cm-link { color: #ae81ff; }
|
||||
.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; }
|
||||
.cm-s-pastel-on-dark span.cm-error {
|
||||
background: #757aD8;
|
||||
color: #f8f8f0;
|
||||
}
|
||||
.cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031) !important; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-matchingbracket {
|
||||
border: 1px solid rgba(255,255,255,0.25);
|
||||
color: #8F938F !important;
|
||||
margin: -1px -1px 0 -1px;
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
.cm-s-rubyblue { font:13px/1.4em Trebuchet, Verdana, sans-serif; } /* - customized editor font - */
|
||||
|
||||
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
|
||||
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
|
||||
.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
|
||||
@@ -14,8 +12,10 @@
|
||||
.cm-s-rubyblue span.cm-meta { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
|
||||
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
|
||||
.cm-s-rubyblue span.cm-error { color: #AF2018; }
|
||||
.cm-s-rubyblue span.cm-bracket { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-link { color: #F4C20B; }
|
||||
.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
|
||||
.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
|
||||
.cm-s-rubyblue span.cm-error { color: #AF2018; }
|
||||
|
||||
.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;}
|
||||
167
CodeMirror-4.2/theme/solarized.css
Normal file
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
Solarized theme for code-mirror
|
||||
http://ethanschoonover.com/solarized
|
||||
*/
|
||||
|
||||
/*
|
||||
Solarized color pallet
|
||||
http://ethanschoonover.com/solarized/img/solarized-palette.png
|
||||
*/
|
||||
|
||||
.solarized.base03 { color: #002b36; }
|
||||
.solarized.base02 { color: #073642; }
|
||||
.solarized.base01 { color: #586e75; }
|
||||
.solarized.base00 { color: #657b83; }
|
||||
.solarized.base0 { color: #839496; }
|
||||
.solarized.base1 { color: #93a1a1; }
|
||||
.solarized.base2 { color: #eee8d5; }
|
||||
.solarized.base3 { color: #fdf6e3; }
|
||||
.solarized.solar-yellow { color: #b58900; }
|
||||
.solarized.solar-orange { color: #cb4b16; }
|
||||
.solarized.solar-red { color: #dc322f; }
|
||||
.solarized.solar-magenta { color: #d33682; }
|
||||
.solarized.solar-violet { color: #6c71c4; }
|
||||
.solarized.solar-blue { color: #268bd2; }
|
||||
.solarized.solar-cyan { color: #2aa198; }
|
||||
.solarized.solar-green { color: #859900; }
|
||||
|
||||
/* Color scheme for code-mirror */
|
||||
|
||||
.cm-s-solarized {
|
||||
line-height: 1.45em;
|
||||
color-profile: sRGB;
|
||||
rendering-intent: auto;
|
||||
}
|
||||
.cm-s-solarized.cm-s-dark {
|
||||
color: #839496;
|
||||
background-color: #002b36;
|
||||
text-shadow: #002b36 0 1px;
|
||||
}
|
||||
.cm-s-solarized.cm-s-light {
|
||||
background-color: #fdf6e3;
|
||||
color: #657b83;
|
||||
text-shadow: #eee8d5 0 1px;
|
||||
}
|
||||
|
||||
.cm-s-solarized .CodeMirror-widget {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.cm-s-solarized .cm-keyword { color: #cb4b16 }
|
||||
.cm-s-solarized .cm-atom { color: #d33682; }
|
||||
.cm-s-solarized .cm-number { color: #d33682; }
|
||||
.cm-s-solarized .cm-def { color: #2aa198; }
|
||||
|
||||
.cm-s-solarized .cm-variable { color: #268bd2; }
|
||||
.cm-s-solarized .cm-variable-2 { color: #b58900; }
|
||||
.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
|
||||
|
||||
.cm-s-solarized .cm-property { color: #2aa198; }
|
||||
.cm-s-solarized .cm-operator {color: #6c71c4;}
|
||||
|
||||
.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
|
||||
|
||||
.cm-s-solarized .cm-string { color: #859900; }
|
||||
.cm-s-solarized .cm-string-2 { color: #b58900; }
|
||||
|
||||
.cm-s-solarized .cm-meta { color: #859900; }
|
||||
.cm-s-solarized .cm-qualifier { color: #b58900; }
|
||||
.cm-s-solarized .cm-builtin { color: #d33682; }
|
||||
.cm-s-solarized .cm-bracket { color: #cb4b16; }
|
||||
.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
|
||||
.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
|
||||
.cm-s-solarized .cm-tag { color: #93a1a1 }
|
||||
.cm-s-solarized .cm-attribute { color: #2aa198; }
|
||||
.cm-s-solarized .cm-header { color: #586e75; }
|
||||
.cm-s-solarized .cm-quote { color: #93a1a1; }
|
||||
.cm-s-solarized .cm-hr {
|
||||
color: transparent;
|
||||
border-top: 1px solid #586e75;
|
||||
display: block;
|
||||
}
|
||||
.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
|
||||
.cm-s-solarized .cm-special { color: #6c71c4; }
|
||||
.cm-s-solarized .cm-em {
|
||||
color: #999;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-s-solarized .cm-strong { color: #eee; }
|
||||
.cm-s-solarized .cm-tab:before {
|
||||
content: "➤"; /*visualize tab character*/
|
||||
color: #586e75;
|
||||
position:absolute;
|
||||
}
|
||||
.cm-s-solarized .cm-error,
|
||||
.cm-s-solarized .cm-invalidchar {
|
||||
color: #586e75;
|
||||
border-bottom: 1px dotted #dc322f;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-selected {
|
||||
background: #073642;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-selected {
|
||||
background: #eee8d5;
|
||||
}
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
|
||||
|
||||
/* Little shadow on the view-port of the buffer view */
|
||||
.cm-s-solarized.CodeMirror {
|
||||
-moz-box-shadow: inset 7px 0 12px -6px #000;
|
||||
-webkit-box-shadow: inset 7px 0 12px -6px #000;
|
||||
box-shadow: inset 7px 0 12px -6px #000;
|
||||
}
|
||||
|
||||
/* Gutter border and some shadow from it */
|
||||
.cm-s-solarized .CodeMirror-gutters {
|
||||
border-right: 1px solid;
|
||||
}
|
||||
|
||||
/* Gutter colors and line number styling based of color scheme (dark / light) */
|
||||
|
||||
/* Dark */
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
|
||||
background-color: #002b36;
|
||||
border-color: #00232c;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
|
||||
text-shadow: #021014 0 -1px;
|
||||
}
|
||||
|
||||
/* Light */
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-gutters {
|
||||
background-color: #fdf6e3;
|
||||
border-color: #eee8d5;
|
||||
}
|
||||
|
||||
/* Common */
|
||||
.cm-s-solarized .CodeMirror-linenumber {
|
||||
color: #586e75;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
|
||||
color: #586e75;
|
||||
}
|
||||
|
||||
.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor {
|
||||
border-left: 1px solid #819090;
|
||||
}
|
||||
|
||||
/*
|
||||
Active line. Negative margin compensates left padding of the text in the
|
||||
view-port
|
||||
*/
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
|
||||
background: rgba(0, 0, 0, 0.10);
|
||||
}
|
||||
26
CodeMirror-4.2/theme/the-matrix.css
Normal file
@@ -0,0 +1,26 @@
|
||||
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
|
||||
.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
|
||||
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
|
||||
.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
|
||||
.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }
|
||||
|
||||
.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;}
|
||||
.cm-s-the-matrix span.cm-atom {color: #3FF;}
|
||||
.cm-s-the-matrix span.cm-number {color: #FFB94F;}
|
||||
.cm-s-the-matrix span.cm-def {color: #99C;}
|
||||
.cm-s-the-matrix span.cm-variable {color: #F6C;}
|
||||
.cm-s-the-matrix span.cm-variable-2 {color: #C6F;}
|
||||
.cm-s-the-matrix span.cm-variable-3 {color: #96F;}
|
||||
.cm-s-the-matrix span.cm-property {color: #62FFA0;}
|
||||
.cm-s-the-matrix span.cm-operator {color: #999}
|
||||
.cm-s-the-matrix span.cm-comment {color: #CCCCCC;}
|
||||
.cm-s-the-matrix span.cm-string {color: #39C;}
|
||||
.cm-s-the-matrix span.cm-meta {color: #C9F;}
|
||||
.cm-s-the-matrix span.cm-qualifier {color: #FFF700;}
|
||||
.cm-s-the-matrix span.cm-builtin {color: #30a;}
|
||||
.cm-s-the-matrix span.cm-bracket {color: #cc7;}
|
||||
.cm-s-the-matrix span.cm-tag {color: #FFBD40;}
|
||||
.cm-s-the-matrix span.cm-attribute {color: #FFF700;}
|
||||
.cm-s-the-matrix span.cm-error {color: #FF0000;}
|
||||
|
||||
.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;}
|
||||
34
CodeMirror-4.2/theme/tomorrow-night-eighties.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Tomorrow Night - Eighties
|
||||
Author: Chris Kempson
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
|
||||
.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -16,11 +16,13 @@
|
||||
.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
|
||||
.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/
|
||||
.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
|
||||
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
|
||||
.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
|
||||
.cm-s-twilight .cm-tag { color: #997643; } /**/
|
||||
.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
|
||||
.cm-s-twilight .cm-header { color: #FF6400; }
|
||||
.cm-s-twilight .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/
|
||||
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
|
||||
|
||||
.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;}
|
||||
.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -11,17 +11,20 @@
|
||||
.cm-s-vibrant-ink .cm-atom { color: #FC0; }
|
||||
.cm-s-vibrant-ink .cm-number { color: #FFEE98; }
|
||||
.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #FFC66D }
|
||||
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-cobalt span.cm-def { color: #FFC66D }
|
||||
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D }
|
||||
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D }
|
||||
.cm-s-vibrant-ink .cm-operator { color: #888; }
|
||||
.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
|
||||
.cm-s-vibrant-ink .cm-string { color: #A5C25C }
|
||||
.cm-s-vibrant-ink .cm-string-2 { color: red }
|
||||
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
|
||||
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
|
||||
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
|
||||
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-vibrant-ink .cm-link { color: blue; }
|
||||
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
|
||||
|
||||
.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;}
|
||||
.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-xq-dark span.CodeMirror-selected { background: #a8f !important; }
|
||||
.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
|
||||
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
@@ -38,9 +38,12 @@ THE SOFTWARE.
|
||||
.cm-s-xq-dark span.cm-comment {color: gray;}
|
||||
.cm-s-xq-dark span.cm-string {color: #9FEE00;}
|
||||
.cm-s-xq-dark span.cm-meta {color: yellow;}
|
||||
.cm-s-xq-dark span.cm-error {color: #f00;}
|
||||
.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}
|
||||
.cm-s-xq-dark span.cm-builtin {color: #30a;}
|
||||
.cm-s-xq-dark span.cm-bracket {color: #cc7;}
|
||||
.cm-s-xq-dark span.cm-tag {color: #FFBD40;}
|
||||
.cm-s-xq-dark span.cm-attribute {color: #FFF700;}
|
||||
.cm-s-xq-dark span.cm-error {color: #f00;}
|
||||
|
||||
.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;}
|
||||
.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
43
CodeMirror-4.2/theme/xq-light.css
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright (C) 2011 by MarkLogic Corporation
|
||||
Author: Mike Brevoort <mike@brevoort.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; }
|
||||
.cm-s-xq-light span.cm-atom {color: #6C8CD5;}
|
||||
.cm-s-xq-light span.cm-number {color: #164;}
|
||||
.cm-s-xq-light span.cm-def {text-decoration:underline;}
|
||||
.cm-s-xq-light span.cm-variable {color: black; }
|
||||
.cm-s-xq-light span.cm-variable-2 {color:black;}
|
||||
.cm-s-xq-light span.cm-variable-3 {color: black; }
|
||||
.cm-s-xq-light span.cm-property {}
|
||||
.cm-s-xq-light span.cm-operator {}
|
||||
.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;}
|
||||
.cm-s-xq-light span.cm-string {color: red;}
|
||||
.cm-s-xq-light span.cm-meta {color: yellow;}
|
||||
.cm-s-xq-light span.cm-qualifier {color: grey}
|
||||
.cm-s-xq-light span.cm-builtin {color: #7EA656;}
|
||||
.cm-s-xq-light span.cm-bracket {color: #cc7;}
|
||||
.cm-s-xq-light span.cm-tag {color: #3F7F7F;}
|
||||
.cm-s-xq-light span.cm-attribute {color: #7F007F;}
|
||||
.cm-s-xq-light span.cm-error {color: #f00;}
|
||||
|
||||
.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;}
|
||||
@@ -1,7 +1,7 @@
|
||||
Copyright (C) 2012 Matt Pass
|
||||
Website: mattpass.com
|
||||
Email: matt@mattpass.com
|
||||
Twitter: @mattpass
|
||||
Copyright: © 2014 Matt Pass
|
||||
Website: mattpass.com
|
||||
Email: matt@mattpass.com
|
||||
Twitter: @mattpass
|
||||
|
||||
#ICEcoder License
|
||||
##Standard Open Source Initiative MIT License
|
||||
|
||||
70
README.md
@@ -1,71 +1,37 @@
|
||||
#ICEcoder
|
||||
##Web based IDE for smart web development
|
||||
##Web IDE / browser code editor awesomeness
|
||||
|
||||
Early version of the web based IDE which allows for creation of websites in the web browser. Uses the brilliant CodeMirror for code highlighting & editing, with a slick IDE wrapped around it to make the whole thing work.
|
||||
ICEcoder is a web IDE / browser based code editor, which allows you to develop websites directly within the web browser. It uses the brilliant CodeMirror for code highlighting & editing, with a slick IDE wrapped around it to make the whole thing work.
|
||||
|
||||
<img src="http://icecoder.net/images/icecoder-v1pt4-web-ide.jpg" alt="ICEcoder web IDE">
|
||||
<img src="https://icecoder.net/images/icecoder-v4-1-browser-code-editor.png" alt="ICEcoder web IDE">
|
||||
|
||||
###Features you'd expect
|
||||
* Context aware code highlighting
|
||||
* Supports HTML, CSS, LESS, JavaScript, CoffeeScript, PHP & Ruby
|
||||
* Smart tab key system (selected text indents line)
|
||||
* File manager
|
||||
* Find & replace/replace all
|
||||
* Document tabs indicate current doc & changes made
|
||||
* Code folding
|
||||
* Open last files on load
|
||||
* Web based, access from anywhere
|
||||
* Free, open source & customisable
|
||||
|
||||
###Cool features you wouldn't expect
|
||||
* Find & replace in current doc, open docs, files & filenames
|
||||
* Found match & current position counter
|
||||
* Indicates content type cursor is on
|
||||
* Account login to keep certain files secure
|
||||
* Restrict files, ban files and restrict by IP
|
||||
* Settings to change functionality & editor theme
|
||||
* Code Assist system
|
||||
* Displays nest position of text cursor, hover to select, click to set cursor
|
||||
* Nest structure OK/broken indicator
|
||||
* Highlight word and press CTRL+I to Google search that
|
||||
* Adds end tags as you type and in a context aware way
|
||||
* Can rename open files (whoaah!)
|
||||
* CTRL+Enter open current webpage in new tab
|
||||
* CTRL+S+Enter opens a sticky tab to show live edits
|
||||
* ESC = Comment/Uncomment line, incl partial lines
|
||||
* Image viewer
|
||||
* Colour preview block on CSS colours, ie red, #f00 or RGBA(255,0,0,0.5)
|
||||
* MySQL Database management via Adminer plugin
|
||||
* Backs up files every 10 mins or on click of backup plugin icon
|
||||
* Github repo syncing with ICErepo plugin
|
||||
* Shell terminal
|
||||
* JS Hint validation as you type
|
||||
* Emmet snippet typing booster
|
||||
###Requirements
|
||||
You can run ICEcoder either online or locally, on Linux, Windows or Mac based platforms. The only requirement is to have PHP 5 available (5.3 recommended). You can have this either as a vanilla installation or via a program such as WAMP or XAMPP (for Windows) or MAMP (for Mac).
|
||||
|
||||
###Installation
|
||||
|
||||
####Step 1: Clone the repo
|
||||
####Step 1: Get ICEcoder
|
||||
Either download the zip or clone from Github using:
|
||||
|
||||
```
|
||||
$ git clone git@github:mattpass/ICEcoder
|
||||
$ git clone git://github.com/mattpass/ICEcoder
|
||||
```
|
||||
|
||||
####Step 2: Upload the files (Linux or Windows hosting OK)
|
||||
```
|
||||
Upload to a new sub-dir URL such as yourdomain.com/_coder
|
||||
Set public write permissions on the backups folder and lib/config.php file
|
||||
```
|
||||
####Step 2: Place in your document root (online or local)
|
||||
* Put in a new sub-dir URL such as yourdomain.com/ICEcoder or localhost/ICEcoder
|
||||
* Set write permissions (757 or 775 depending on your system) on the 'backups', 'lib', 'plugins', 'test' and 'tmp' folders
|
||||
|
||||
*(Note: A small number of web servers give an internal server error here, if you get this, try 755 instead)*
|
||||
|
||||
####Step 3: Start coding
|
||||
```
|
||||
Visit the sub-dir URL in your browser and enter a password
|
||||
Now you're setup, auto-logged in and ready to code!
|
||||
```
|
||||
* Visit the sub-dir URL in your browser and enter a password
|
||||
|
||||
**Now you're setup, auto-logged in and ready to code!**
|
||||
|
||||
Suitable for commercial & non-commercial projects, just let me know if it's useful to you and any cool customisations you make to it. I take no responsibility for anything, your usage is all down to you.
|
||||
|
||||
Is fully open source and I'd encourage you to take it, make it your own and customise to your hearts content! :)
|
||||
It's fully open source and MIT licensed. I'm happy for you to take it, make it your own and customise to your hearts content and/or contribute to this main repo! :)
|
||||
|
||||
Plenty of comments included in the code to assist with understanding, customising etc.
|
||||
|
||||
Comments, improvements & feedback welcomed!
|
||||
Comments, improvements & feedback welcomed!
|
||||
|
||||
0
backups/.gitkeep
Normal file
@@ -1 +0,0 @@
|
||||
Zip It! backups are stored in this folder
|
||||
309
editor.php
@@ -1,86 +1,122 @@
|
||||
<?php include("lib/settings.php");?>
|
||||
<?php
|
||||
include("lib/headers.php");
|
||||
include("lib/settings.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html style="margin: 0" onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'editor');top.ICEcoder.canResizeFilesW()}">
|
||||
<html style="margin: 0" onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false; if (!top.ICEcoder.overCloseLink) {top.ICEcoder.tabDragEnd()}" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'editor');top.ICEcoder.canResizeFilesW()}" onDrop="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'editor')}">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> editor</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/hint/show-hint.css">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/lint/lint.css">
|
||||
<!--
|
||||
codemirror-compressed.js
|
||||
incls: codemirror.js
|
||||
modes: clike, coffeescript, css, javascript, less, php, ruby & xml
|
||||
utils: foldcode, searchcursor, match-highlighter
|
||||
incls: codemirror
|
||||
modes: clike, coffeescript, css, erlang, go, htmlmixed, javascript, julia, lua, markdown, perl, php, python, ruby, rust, sass, sql, xml, yaml
|
||||
addon: brace-fold, closebrackets, closetag, css-hint, html-hint, javascript-hint, javascript-lint, lint, match-highlighter, searchcursor, show-hint, sql-hint, trailingspace, xml-fold, xml-hint
|
||||
//-->
|
||||
<script src="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
|
||||
<script src="jshint/jshint-2.1.4.min.js"></script>
|
||||
<script src="lib/mmd.js"></script>
|
||||
<script src="lib/foldcode.js"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
|
||||
echo '<script src="plugins/emmet/emmet.min.js"></script>';
|
||||
};?>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) {
|
||||
echo '<script src="plugins/pesticide/pesticide.js"></script>';
|
||||
};?>
|
||||
<link rel="stylesheet" href="<?php
|
||||
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
|
||||
$activeLineBG = $ICEcoder["theme"]=="eclipse" || $ICEcoder["theme"]=="elegant" || $ICEcoder["theme"]=="neat" ? "#ccc" : "#000";
|
||||
$activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","neat","solarized","xq-light")) !== false ? "#ccc" : "#000";
|
||||
?>">
|
||||
|
||||
<style type="text/css">
|
||||
.CodeMirror {position: absolute; top: 0px; width: 100%; font-size: 13px; z-index: 1}
|
||||
.CodeMirror-scroll {} // was: height: auto; overflow: visible
|
||||
/* Make sure this next one remains the 1st item, updated with JS */
|
||||
.CodeMirror {position: absolute; top: 0; width: 100%; font-size: <?php echo $ICEcoder["fontSize"];?>; z-index: 1}
|
||||
.CodeMirror-scroll {} /* was: height: auto; overflow: visible */
|
||||
/* Make sure this next one remains the 3rd item, updated with JS */
|
||||
.cm-s-activeLine {background: <?php echo $activeLineBG;?> !important}
|
||||
span.CodeMirror-matchhighlight {background: #555}
|
||||
.CodeMirror-focused span.CodeMirror-matchhighlight {color: #000; background: #555; !important}
|
||||
/* Make sure this next one remains the 6th item, updated with JS */
|
||||
.cm-tab:after {position: relative; display: inline-block; width: 0; left: -1.4em; overflow: visible; color: #aaa; content: "<?php if($ICEcoder["visibleTabs"]) {echo '\\21e5';};?>";}
|
||||
.lint-error {font-family: arial; font-size: 80%; background: #ccc; color: #b00; padding: 3px 5px}
|
||||
.lint-error-icon {background-color: #b00; color: #fff; font-weight: bold; border-radius: 50%; padding: 0 3px; margin-right: 5px}
|
||||
.snippetFrame {border: 1px; width: 100%}
|
||||
.cm-matchhighlight, .CodeMirror-focused .cm-matchhighlight {color: #fff !important; background: #06c !important}
|
||||
/* Make sure this next one remains the 5th item, updated with JS */
|
||||
.cm-tab {border-left-width: <?php echo $ICEcoder["visibleTabs"] ? "1px" : "0";?>; margin-left: <?php echo $ICEcoder["visibleTabs"] ? "-1px" : "0";?>; border-left-style: solid; border-left-color: rgba(255,255,255,0.2)}
|
||||
.cm-trailingspace {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.CodeMirror-foldmarker {font-family: arial; line-height: .3; color: #b00; cursor: pointer;
|
||||
text-shadow: #fff 1px 1px 2px, #fff -1px -1px 2px, #fff 1px -1px 2px, #fff -1px 1px 2px;
|
||||
}
|
||||
.folds {display: inline-block; width: 13px}
|
||||
.fold {position: absolute; display: inline-block; width: 13px; height: 13px; font-size: 14px; text-align: center; cursor: pointer}
|
||||
.foldOn {background: #800; color: #ddd}
|
||||
.foldOff {background: rgba(255,255,255,0.04); color: #666}
|
||||
.demoArrow {position: absolute; display: inline-block; width: 99px; height: 50px; top: 0; right: 30px; background: url('images/big-arrow.gif') 0 -10px no-repeat; text-align: center; font-family: arial; font-size: 10px; padding-top: 60px}
|
||||
h2 {color: rgba(0,198,255,0.7)}
|
||||
.heading {color:#888}
|
||||
</style>
|
||||
<link rel="stylesheet" href="lib/file-types.css">
|
||||
<link rel="stylesheet" href="lib/file-type-icons.css">
|
||||
</head>
|
||||
|
||||
<body onLoad="top.ICEcoder.updateFileFolderCount()" style="color: #fff; margin: 0" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);">
|
||||
<body style="color: #fff; margin: 0" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
<div style="margin: 32px 43px; font-family: arial; font-size: 10px; color: #ddd">
|
||||
<div style="float: left; margin-right: 50px">
|
||||
<h2 style="color: rgba(0,198,255,0.7)">server</h2>
|
||||
<span style="color:#888">Server name, OS & IP:</span><br>
|
||||
<?php echo $_SERVER['SERVER_NAME']."   ".$_SERVER['SERVER_SOFTWARE']."   ".$_SERVER['SERVER_ADDR'];?><br><br>
|
||||
<span style="color:#888">Root:</span><br>
|
||||
<?php if ($ICEcoder['demoMode']) {?>
|
||||
<div class="demoArrow"><b>Click icons<br>for help &<br>usage info</b></div>
|
||||
<?php ;}; ?>
|
||||
|
||||
<div style="display: none; margin: 32px 43px 0 43px; padding: 10px; width: 500px; font-family: arial; font-size: 10px; color: #ddd; background: #333" id="dataMessage"></div>
|
||||
|
||||
<div style="margin: 20px 43px 32px 43px; font-family: arial; font-size: 10px; color: #ddd">
|
||||
<div style="float: left; width: 300px; margin-right: 50px">
|
||||
<h2>server</h2>
|
||||
<span class="heading">Server name, OS & IP:</span><br>
|
||||
<?php echo $_SERVER['SERVER_NAME']."   ".$_SERVER['SERVER_SOFTWARE']."   ".(isset($_SERVER['SERVER_ADDR'])?$_SERVER['SERVER_ADDR']:"Unknown");?><br><br>
|
||||
<span class="heading">Root:</span><br>
|
||||
<?php echo $docRoot;?><br><br>
|
||||
<span style="color:#888">ICEcoder root:</span><br>
|
||||
<?php echo $docRoot.$ICEcoder['root'];?><br><br>
|
||||
<span style="color:#888">PHP version:</span><br>
|
||||
<span class="heading">ICEcoder root:</span><br>
|
||||
<?php echo $docRoot.$iceRoot;?><br><br>
|
||||
<span class="heading">PHP version:</span><br>
|
||||
<?php echo phpversion();?><br><br>
|
||||
<span style="color:#888">Date & time:</span><br>
|
||||
<span id="serverDT"></span><br><br><br>
|
||||
<span class="heading">Date & time:</span><br>
|
||||
<span id="serverDT"></span><br><br>
|
||||
<h2>your device</h2>
|
||||
<span class="heading">Browser:</span><br>
|
||||
<?php echo xssClean($_SERVER['HTTP_USER_AGENT'],"html");?><br><br>
|
||||
<span class="heading">Your IP:</span><br>
|
||||
<?php echo $_SERVER['REMOTE_ADDR'];?><br><br>
|
||||
</div>
|
||||
|
||||
<div style="float: left">
|
||||
<h2 style="color: rgba(0,198,255,0.7)">files</h2>
|
||||
<span style="color:#888">Last 10 files opened:</span><br>
|
||||
<h2>files</h2>
|
||||
<span class="heading">Last 10 files opened:</span><br>
|
||||
<ul class="fileManager" style="margin-left: 0; line-height: 20px">
|
||||
<?php
|
||||
$last10FilesArray = explode(",",$ICEcoder["last10Files"]);
|
||||
for ($i=0;$i<count($last10FilesArray);$i++) {
|
||||
if ($ICEcoder["last10Files"]=="") {
|
||||
echo '[none]<br><br>';
|
||||
echo '<div style="display: inline-block; margin-left: -39px; margin-top: -4px">[none]</div><br><br>';
|
||||
} else {
|
||||
$fileFolderName = str_replace("\\","/",$last10FilesArray[$i]);
|
||||
// Get extension (prefix 'ext-' to prevent invalid classes from extensions that begin with numbers)
|
||||
$ext = "ext-".pathinfo($docRoot.$iceRoot.$fileFolderName, PATHINFO_EXTENSION);
|
||||
echo '<li class="pft-file '.strtolower($ext).'" style="margin-left: -21px">';
|
||||
echo '<a style="cursor:pointer" onClick="top.ICEcoder.openFile(\''.str_replace("|","/",$last10FilesArray[$i]).'\')">';
|
||||
echo str_replace($docRoot,"",str_replace("|","/",$last10FilesArray[$i]));
|
||||
echo '</a><br>'.PHP_EOL;
|
||||
echo '</a></li>'.PHP_EOL;
|
||||
if ($i==count($last10FilesArray)-1) {echo '<br>'.PHP_EOL;};
|
||||
}
|
||||
}
|
||||
;?>
|
||||
<span style="color:#888">File & folder count:</span><br>
|
||||
<div id="fileFolderCounts"></div><br><br><br>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div style="clear: both">
|
||||
<h2 style="color: rgba(0,198,255,0.7)">your device</h2>
|
||||
<span style="color:#888">Browser:</span><br>
|
||||
<?php echo $_SERVER['HTTP_USER_AGENT'];?><br><br>
|
||||
<span style="color:#888">Your IP:</span><br>
|
||||
<?php echo $_SERVER['REMOTE_ADDR'];?>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<script>
|
||||
var nDT=<?php echo time()*1000;?>;
|
||||
setInterval(function(){
|
||||
@@ -95,107 +131,153 @@ span.CodeMirror-matchhighlight {background: #555}
|
||||
}
|
||||
},1000);
|
||||
</script>
|
||||
<?php if(is_dir('test') && !$ICEcoder['demoMode']) {?>
|
||||
<div style="float: left; margin-right: 50px">
|
||||
<h2>test suite</h2>
|
||||
<span class="heading">Run unit tests:</span><br>
|
||||
<a nohref onclick="top.ICEcoder.filesFrame.contentWindow.frames['testControl'].location.href = 'test'" style="color: #fff; cursor: pointer">Run unit tests</a><div id="unitTestResults"></div>
|
||||
</div>
|
||||
<?php
|
||||
;};
|
||||
?>
|
||||
<div style="float: left">
|
||||
<h2>dev mode <?php echo $ICEcoder['devMode'] ? "on" : "off";?></h2>
|
||||
<span class="heading">Status:</span><br>
|
||||
Using <?php echo $ICEcoder['devMode'] ? "ice-coder.js" : "ice-coder.min.js";?> <a title="You can switch dev mode on/off
|
||||
in lib/config__settings.php" style="cursor: pointer">[?]</a>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
CodeMirror.keyMap.ICEcoder = {
|
||||
"Tab": function(cm) {CodeMirror.commands[top.ICEcoder.tabsIndent ? "defaultTab" : "insertTab"](cm);},
|
||||
"Shift-Tab": "indentLess",
|
||||
"Ctrl-Up": function() {},
|
||||
"Ctrl-Down": function() {},
|
||||
fallthrough: ["default"]
|
||||
};
|
||||
CodeMirror.keyMap.ICEcoder = {
|
||||
// "Tab": "defaultTab", **Now used by Emmet**
|
||||
"Shift-Tab": "indentLess",
|
||||
"Ctrl-Space": "autocomplete",
|
||||
"Ctrl-Up" : false,
|
||||
"Ctrl-Down" : false,
|
||||
fallthrough: ["default"]
|
||||
};
|
||||
|
||||
function createNewCMInstance(num) {
|
||||
var fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
top.ICEcoder['cM'+num+'waiting'] = "";
|
||||
top.ICEcoder['cM'+num+'widgets'] = [];
|
||||
|
||||
window['cM'+num] = CodeMirror(document.body, {
|
||||
mode: "application/x-httpd-php",
|
||||
lineNumbers: true,
|
||||
gutters: ["folds","CodeMirror-lint-markers","CodeMirror-linenumbers"],
|
||||
lineWrapping: top.ICEcoder.lineWrapping,
|
||||
indentUnit: top.ICEcoder.tabWidth,
|
||||
tabSize: top.ICEcoder.tabWidth,
|
||||
indentWithTabs: true,
|
||||
indentWithTabs: top.ICEcoder.indentWithTabs,
|
||||
indentUnit: top.ICEcoder.indentSize,
|
||||
tabSize: top.ICEcoder.indentSize,
|
||||
electricChars: false,
|
||||
keyMap: "ICEcoder",
|
||||
onKeyEvent: function(thisCM, e) {
|
||||
top.ICEcoder.redoChangedContent(e);
|
||||
top.ICEcoder.findReplace('find',true,false);
|
||||
autoCloseTags: true,
|
||||
autoCloseBrackets: true,
|
||||
highlightSelectionMatches: true,
|
||||
showTrailingSpace: true,
|
||||
lintWith: <?php if ($ICEcoder['codeAssist']) {echo 'fileName && fileName.indexOf(".js")>-1 ? CodeMirror.javascriptValidator : ';};?>false,
|
||||
keyMap: "ICEcoder"
|
||||
});
|
||||
|
||||
window['cM'+num].on("keyup", function(thisCM) {
|
||||
if ("undefined" != typeof top.doFind) {
|
||||
clearInterval(top.doFind);
|
||||
}
|
||||
top.doFind = setTimeout(function() {
|
||||
top.ICEcoder.findReplace(top.document.getElementById('find').value,true,false);
|
||||
},500);
|
||||
top.ICEcoder.getCaretPosition();
|
||||
top.ICEcoder.updateCharDisplay();
|
||||
top.ICEcoder.updateByteDisplay();
|
||||
tok = thisCM.getTokenAt(thisCM.getCursor());
|
||||
if (tok.string!=">") {lastString=tok.string};
|
||||
if (e.type=="keyup"&&e.keyCode=="16"&&lastKeyCode=="190") {
|
||||
canDoEndTag=true;
|
||||
if (top.ICEcoder.tagString!="script" && top.ICEcoder.tagNestExceptions.indexOf(top.ICEcoder.tagString)>-1) {
|
||||
canDoEndTag=false;
|
||||
}
|
||||
if (
|
||||
top.ICEcoder.tagString.slice(0,1)=="/"||
|
||||
top.ICEcoder.tagString.slice(0,1)=="?"||
|
||||
!top.ICEcoder.codeAssist||
|
||||
fileName && (fileName.indexOf(".js")>0||fileName.indexOf(".css")>0||fileName.indexOf(".less")>0)
|
||||
) {canDoEndTag=false}
|
||||
|
||||
contentType = top.ICEcoder.caretLocType;
|
||||
if (canDoEndTag && (contentType!="JavaScript"||(contentType=="JavaScript"&&top.ICEcoder.tagString=="script"))) {
|
||||
numTabs = top.ICEcoder.htmlTagArray.length;
|
||||
if (top.ICEcoder.htmlTagArray[0]=="html") {numTabs--};
|
||||
tabs = "";
|
||||
for (i=0;i<numTabs-1;i++) {
|
||||
tabs += "\t";
|
||||
}
|
||||
endTag = "</" + top.ICEcoder.tagString + ">";
|
||||
if (top.ICEcoder.tagString=="script") {endTag="</"+"script>"};
|
||||
if(top.ICEcoder.tagString=="title"||top.ICEcoder.tagString=="a"||top.ICEcoder.tagString=="li"||top.ICEcoder.tagString=="span"||(top.ICEcoder.tagString.slice(0,1)=="h"&&parseInt(top.ICEcoder.tagString.slice(1,2),10)>=1&&parseInt(top.ICEcoder.tagString.slice(1,2),10)<=7)) {
|
||||
thisCM.replaceSelection(endTag);
|
||||
thisCM.setCursor(thisCM.getCursor().line,thisCM.getCursor().ch-top.ICEcoder.tagString.length-3);
|
||||
} else if(top.ICEcoder.tagString=="html"||top.ICEcoder.tagString=="head") {
|
||||
thisCM.replaceSelection("\n\n"+endTag);
|
||||
thisCM.setCursor(thisCM.getCursor().line-1,numTabs);
|
||||
} else {
|
||||
thisCM.replaceSelection("\n"+tabs+"\t\n"+tabs+endTag);
|
||||
thisCM.setCursor(thisCM.getCursor().line-1,numTabs);
|
||||
}
|
||||
}
|
||||
};
|
||||
lastKeyCode = e.keyCode;
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
window['cM'+num].on("cursorActivity", function(thisCM) {
|
||||
top.ICEcoder.getCaretPosition();
|
||||
top.ICEcoder.updateCharDisplay();
|
||||
top.ICEcoder.updateByteDisplay();
|
||||
window['cM'+num].removeLineClass(top.ICEcoder['cMActiveLine'+num], "background");
|
||||
if(!window['cM'+num].somethingSelected()) {
|
||||
if(window['cM'+num].getCursor('start').line == window['cM'+num].getCursor().line) {
|
||||
top.ICEcoder['cMActiveLine'+num] = window['cM'+num].addLineClass(window['cM'+num].getCursor().line, "background","cm-s-activeLine");
|
||||
}
|
||||
thisCM.matchHighlight("CodeMirror-matchhighlight");
|
||||
top.ICEcoder.cssColorPreview();
|
||||
if (top.ICEcoder.caretLocType=="CSS") {
|
||||
top.ICEcoder.cssColorPreview();
|
||||
}
|
||||
if (top.ICEcoder.prevLine != window['cM'+num].getCursor().line &&
|
||||
window['cM'+num].getLine(top.ICEcoder.prevLine) &&
|
||||
window['cM'+num].getLine(top.ICEcoder.prevLine).length > 0 &&
|
||||
window['cM'+num].getLine(top.ICEcoder.prevLine).replace(/\s/g, '').length == 0) {
|
||||
window['cM'+num].replaceRange("",{line: top.ICEcoder.prevLine, ch: 0},{line: top.ICEcoder.prevLine, ch: 1000000});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
window['cM'+num].on("beforeSelectionChange", function(thisCM, changeObj) {
|
||||
top.ICEcoder.prevLine = window['cM'+num].getCursor().line;
|
||||
}
|
||||
);
|
||||
|
||||
window['cM'+num].on("change", function(thisCM, changeObj) {
|
||||
// If we're not loading the file, it's a change, so update tab
|
||||
if (!top.ICEcoder.loadingFile) {
|
||||
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 1;
|
||||
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);
|
||||
}
|
||||
top.ICEcoder.getCaretPosition();
|
||||
top.ICEcoder.dontUpdateNest = false;
|
||||
top.ICEcoder.updateCharDisplay();
|
||||
top.ICEcoder.updateByteDisplay();
|
||||
top.ICEcoder.updateNestingIndicator();
|
||||
if (top.ICEcoder.findMode) {
|
||||
top.ICEcoder.results.splice(top.ICEcoder.findResult,1);
|
||||
top.document.getElementById('results').innerHTML = top.ICEcoder.results.length + " results";
|
||||
top.ICEcoder.findMode = false;
|
||||
}
|
||||
if (top.ICEcoder.codeAssist) {
|
||||
clearTimeout(window['cM'+num+'waiting']);
|
||||
window['cM'+num+'waiting'] = setTimeout(top.ICEcoder.updateHints, 100);
|
||||
var filepath = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
if (filepath) {
|
||||
var filename = filepath.substr(filepath.lastIndexOf("/")+1);
|
||||
var fileExt = filename.substr(filename.lastIndexOf(".")+1);
|
||||
for (var i=changeObj.from.line; i<changeObj.from.line+changeObj.text.length; i++) {
|
||||
top.ICEcoder.content.contentWindow.CodeMirror.doFold(window['cM'+num].getLine(i).indexOf("{")>-1 ? "brace" : "xml" ,null ,"+" ,"-", true, thisCM, i);
|
||||
}
|
||||
if (changeObj.text[0] == "}" || changeObj.removed && changeObj.removed[0] == "}") {
|
||||
cursor = window['cM'+num].getSearchCursor("{",window['cM'+num].getCursor(),false);
|
||||
cursor.findPrevious();
|
||||
for (var i=cursor.from().line; i<window['cM'+num].getCursor().line; i++) {
|
||||
top.ICEcoder.content.contentWindow.CodeMirror.doFold(window['cM'+num].getLine(i).indexOf("{")>-1 ? "brace" : "xml" ,null ,"+" ,"-", true, thisCM, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Update HTML edited files live
|
||||
if (filepath && top.ICEcoder.previewWindow.location) {
|
||||
if (top.ICEcoder.previewWindow.location.pathname==filepath) {
|
||||
if (["htm","html","txt"].indexOf(fileExt) > -1) {
|
||||
top.ICEcoder.previewWindow.document.documentElement.innerHTML = window['cM'+num].getValue();
|
||||
} else if (["md"].indexOf(fileExt) > -1) {
|
||||
top.ICEcoder.previewWindow.document.documentElement.innerHTML = mmd(window['cM'+num].getValue());
|
||||
}
|
||||
} else if (["css"].indexOf(fileExt) > -1) {
|
||||
if (top.ICEcoder.previewWindow.document.documentElement.innerHTML.indexOf(filename) > -1) {
|
||||
var css = window['cM'+num].getValue();
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.id = "ICEcoder"+filepath.replace(/\//g,"_");
|
||||
if (style.styleSheet){
|
||||
style.styleSheet.cssText = css;
|
||||
} else {
|
||||
style.appendChild(document.createTextNode(css));
|
||||
}
|
||||
if (top.ICEcoder.previewWindow.document.getElementById(style.id)) {
|
||||
top.ICEcoder.previewWindow.document.documentElement.removeChild(top.ICEcoder.previewWindow.document.getElementById(style.id));
|
||||
}
|
||||
top.ICEcoder.previewWindow.document.documentElement.appendChild(style);
|
||||
}
|
||||
}
|
||||
// Do the pesticide plugin if it exists
|
||||
try {top.ICEcoder.doPesticide();} catch(err) {};
|
||||
}
|
||||
// Update the title tag to indicate any changes
|
||||
top.ICEcoder.indicateChanges();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -205,12 +287,19 @@ function createNewCMInstance(num) {
|
||||
);
|
||||
|
||||
window['cM'+num].on("gutterClick", function(thisCM, line, gutter, clickEvent) {
|
||||
["JavaScript","CoffeeScript","PHP","Ruby"].indexOf(top.ICEcoder.caretLocType) > -1
|
||||
? codeFoldBrace(window['cM'+num], line) : codeFoldTag(window['cM'+num], line);
|
||||
window['cM'+num].setGutterMarker(line, "CodeMirror-linenumbers", document.createTextNode("+ "+(line+1)));
|
||||
setTimeout(function() {
|
||||
window['cM'+num].setGutterMarker(line, "CodeMirror-linenumbers", null);
|
||||
},1000);
|
||||
CodeMirror.doFold(window['cM'+num].getLine(line).indexOf("{")>-1 ? "brace" : "xml",null,"+","-",false)(window['cM'+num], line);
|
||||
}
|
||||
);
|
||||
|
||||
window['cM'+num].on("inputRead", function(thisCM) {
|
||||
if (top.ICEcoder.autoComplete == "keypress" && top.ICEcoder.codeAssist) {
|
||||
clearTimeout(debounce);
|
||||
if (!thisCM.state.completionActive) {
|
||||
debounce = setTimeout(function() {
|
||||
CodeMirror.commands.autocomplete(window['cM'+num]);
|
||||
},200);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -218,11 +307,13 @@ function createNewCMInstance(num) {
|
||||
top.ICEcoder['cMActiveLine'+num] = window['cM'+num].addLineClass(0, "background", "cm-s-activeLine");
|
||||
};
|
||||
|
||||
// var top.ICEcoder.foldStyle = '<span style="position: absolute; display: inline-block; width: 13px; height: 13px; left: 0; background-color: #b00; color: #fff; text-align: center; cursor: pointer"><span style="position: relative; left: -1px">+</span></span> %N%';
|
||||
var codeFoldTag = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder);
|
||||
var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);
|
||||
var debounce;
|
||||
</script>
|
||||
|
||||
<div style="position: absolute; display: none; width: 5px; height: 100%; top: 0; right: 0; background: rgba(255,255,255,0.1); overflow: hidden; z-index: 2" id="resultsBar"></div>
|
||||
|
||||
<?php include_once("processes/on-editor-load.php"); ?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
49
farbtastic/farbtastic.css
Normal file
@@ -0,0 +1,49 @@
|
||||
.picker {
|
||||
display: inline-block;
|
||||
}
|
||||
.farbtastic {
|
||||
position: relative;
|
||||
}
|
||||
.farbtastic * {
|
||||
position: absolute;
|
||||
cursor: crosshair;
|
||||
}
|
||||
.farbtastic, .farbtastic .wheel {
|
||||
width: 195px;
|
||||
height: 195px;
|
||||
}
|
||||
.farbtastic .color, .farbtastic .overlay {
|
||||
top: 47px;
|
||||
left: 47px;
|
||||
width: 101px;
|
||||
height: 101px;
|
||||
}
|
||||
.farbtastic .wheel {
|
||||
background: url(wheel.png) no-repeat;
|
||||
width: 195px;
|
||||
height: 195px;
|
||||
}
|
||||
.farbtastic .overlay {
|
||||
background: url(mask.png) no-repeat;
|
||||
}
|
||||
.farbtastic .marker {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
margin: -8px 0 0 -8px;
|
||||
overflow: hidden;
|
||||
background: url(marker.png) no-repeat;
|
||||
}
|
||||
.colorValue {
|
||||
border: 0;
|
||||
width: 105px;
|
||||
padding-left: 5px
|
||||
}
|
||||
.insertColorValue {
|
||||
background: #888;
|
||||
color: #fff;
|
||||
height: 18px;
|
||||
width: 60px;
|
||||
border: 0;
|
||||
margin-left: 5px;
|
||||
cursor: pointer
|
||||
}
|
||||
253
farbtastic/farbtastic.js
Normal file
@@ -0,0 +1,253 @@
|
||||
/*!
|
||||
* Farbtastic: NON jQuery color picker plug-in v1.4, based on v1.3u
|
||||
*
|
||||
* Licensed under the GPL license:
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
farbtasticFunc = function (options) {
|
||||
farbtastic(this, options);
|
||||
return this;
|
||||
};
|
||||
|
||||
farbtastic = function (container, callback) {
|
||||
var container = document.getElementById(container);
|
||||
var callback = document.getElementById(callback);
|
||||
return container.farbtastic || (container.farbtastic = new _farbtastic(container, callback));
|
||||
};
|
||||
|
||||
_farbtastic = function (container, callback) {
|
||||
// Store farbtastic object
|
||||
var fb = this;
|
||||
|
||||
// Insert markup
|
||||
container.innerHTML = '<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>';
|
||||
fb.wheel = document.getElementsByClassName('wheel')[0];
|
||||
// Dimensions
|
||||
fb.radius = 84;
|
||||
fb.square = 100;
|
||||
fb.width = 194;
|
||||
|
||||
/**
|
||||
* Link to the given element(s) or callback.
|
||||
*/
|
||||
fb.linkTo = function (callback) {
|
||||
// Unbind previous nodes
|
||||
if (typeof fb.callback == 'object') {
|
||||
console.log("Doesn't do anything?");
|
||||
fb.callback.removeEventListener('keyup', fb.updateValue);
|
||||
}
|
||||
|
||||
// Reset color
|
||||
fb.color = null;
|
||||
|
||||
// Bind callback or elements
|
||||
if (typeof callback == 'function') {
|
||||
fb.callback = callback;
|
||||
}
|
||||
else if (typeof callback == 'object' || typeof callback == 'string') {
|
||||
fb.callback = callback;
|
||||
fb.callback.addEventListener('keyup',fb.updateValue);
|
||||
if (fb.callback.value) {
|
||||
fb.setColor(fb.callback.value);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
fb.updateValue = function (event) {
|
||||
if (this.value && this.value != fb.color) {
|
||||
fb.setColor(this.value);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change color with HTML syntax #123456
|
||||
*/
|
||||
fb.setColor = function (color) {
|
||||
var unpack = fb.unpack(color);
|
||||
if (fb.color != color && unpack) {
|
||||
fb.color = color;
|
||||
fb.rgb = unpack;
|
||||
fb.hsl = fb.RGBToHSL(fb.rgb);
|
||||
fb.updateDisplay();
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Change color with HSL triplet [0..1, 0..1, 0..1]
|
||||
*/
|
||||
fb.setHSL = function (hsl) {
|
||||
fb.hsl = hsl;
|
||||
fb.rgb = fb.HSLToRGB(hsl);
|
||||
fb.color = fb.pack(fb.rgb);
|
||||
fb.updateDisplay();
|
||||
return this;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Retrieve the coordinates of the given event relative to the center
|
||||
* of the widget.
|
||||
*/
|
||||
fb.widgetCoords = function (event) {
|
||||
return { x: (event.pageX - fb.wheel.offsetParent.offsetLeft) - fb.width / 2, y: (event.pageY - fb.wheel.offsetParent.offsetTop) - fb.width / 2 };
|
||||
};
|
||||
|
||||
/**
|
||||
* Mousedown handler
|
||||
*/
|
||||
fb.mousedown = function (event) {
|
||||
// Capture mouse
|
||||
if (!document.dragging) {
|
||||
document.addEventListener('mousemove', fb.mousemove);
|
||||
document.addEventListener('mouseup', fb.mouseup);
|
||||
document.dragging = true;
|
||||
}
|
||||
|
||||
// Check which area is being dragged
|
||||
var pos = fb.widgetCoords(event);
|
||||
fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square;
|
||||
|
||||
// Process
|
||||
fb.mousemove(event);
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Mousemove handler
|
||||
*/
|
||||
fb.mousemove = function (event) {
|
||||
// Get coordinates relative to color picker center
|
||||
var pos = fb.widgetCoords(event);
|
||||
|
||||
// Set new HSL parameters
|
||||
if (fb.circleDrag) {
|
||||
var hue = Math.atan2(pos.x, -pos.y) / 6.28;
|
||||
if (hue < 0) hue += 1;
|
||||
fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]);
|
||||
}
|
||||
else {
|
||||
var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5));
|
||||
var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5));
|
||||
fb.setHSL([fb.hsl[0], sat, lum]);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Mouseup handler
|
||||
*/
|
||||
fb.mouseup = function () {
|
||||
// Uncapture mouse
|
||||
document.removeEventListener('mousemove', fb.mousemove);
|
||||
document.removeEventListener('mouseup', fb.mouseup);
|
||||
document.dragging = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update the markers and styles
|
||||
*/
|
||||
fb.updateDisplay = function () {
|
||||
// Markers
|
||||
var angle = fb.hsl[0] * 6.28;
|
||||
document.getElementsByClassName('h-marker')[0].style.left = Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px';
|
||||
document.getElementsByClassName('h-marker')[0].style.top = Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px';
|
||||
|
||||
document.getElementsByClassName('sl-marker')[0].style.left = Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px';
|
||||
document.getElementsByClassName('sl-marker')[0].style.top = Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px';
|
||||
|
||||
// Saturation/Luminance gradient
|
||||
document.getElementsByClassName('color')[0].style.backgroundColor = fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]));
|
||||
|
||||
// Linked elements or callback
|
||||
if (typeof fb.callback == 'object') {
|
||||
// Set background/foreground color
|
||||
document.getElementById(fb.callback.id).style.backgroundColor = document.getElementById(fb.callback.id + 'RGB').style.backgroundColor = fb.color;
|
||||
document.getElementById(fb.callback.id).style.color = document.getElementById(fb.callback.id + 'RGB').style.color = fb.hsl[2] > 0.5 ? '#000' : '#fff';
|
||||
document.getElementById('colorRGB').value = document.getElementById(fb.callback.id).style.backgroundColor.replace(/\s/g,'');
|
||||
|
||||
// Change linked value
|
||||
if (callback.value && callback.value != fb.color) {
|
||||
callback.value = fb.color;
|
||||
}
|
||||
}
|
||||
else if (typeof fb.callback == 'function') {
|
||||
fb.callback.call(fb, fb.color);
|
||||
}
|
||||
};
|
||||
|
||||
/* Various color utility functions */
|
||||
fb.pack = function (rgb) {
|
||||
var r = Math.round(rgb[0] * 255);
|
||||
var g = Math.round(rgb[1] * 255);
|
||||
var b = Math.round(rgb[2] * 255);
|
||||
return '#' + (r < 16 ? '0' : '') + r.toString(16) +
|
||||
(g < 16 ? '0' : '') + g.toString(16) +
|
||||
(b < 16 ? '0' : '') + b.toString(16);
|
||||
};
|
||||
|
||||
fb.unpack = function (color) {
|
||||
if (color.length == 7) {
|
||||
return [parseInt('0x' + color.substring(1, 3)) / 255,
|
||||
parseInt('0x' + color.substring(3, 5)) / 255,
|
||||
parseInt('0x' + color.substring(5, 7)) / 255];
|
||||
}
|
||||
else if (color.length == 4) {
|
||||
return [parseInt('0x' + color.substring(1, 2)) / 15,
|
||||
parseInt('0x' + color.substring(2, 3)) / 15,
|
||||
parseInt('0x' + color.substring(3, 4)) / 15];
|
||||
}
|
||||
};
|
||||
|
||||
fb.HSLToRGB = function (hsl) {
|
||||
var m1, m2, r, g, b;
|
||||
var h = hsl[0], s = hsl[1], l = hsl[2];
|
||||
m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s;
|
||||
m1 = l * 2 - m2;
|
||||
return [this.hueToRGB(m1, m2, h+0.33333),
|
||||
this.hueToRGB(m1, m2, h),
|
||||
this.hueToRGB(m1, m2, h-0.33333)];
|
||||
};
|
||||
|
||||
fb.hueToRGB = function (m1, m2, h) {
|
||||
h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);
|
||||
if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;
|
||||
if (h * 2 < 1) return m2;
|
||||
if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;
|
||||
return m1;
|
||||
};
|
||||
|
||||
fb.RGBToHSL = function (rgb) {
|
||||
var min, max, delta, h, s, l;
|
||||
var r = rgb[0], g = rgb[1], b = rgb[2];
|
||||
min = Math.min(r, Math.min(g, b));
|
||||
max = Math.max(r, Math.max(g, b));
|
||||
delta = max - min;
|
||||
l = (min + max) / 2;
|
||||
s = 0;
|
||||
if (l > 0 && l < 1) {
|
||||
s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
|
||||
}
|
||||
h = 0;
|
||||
if (delta > 0) {
|
||||
if (max == r && max != g) h += (g - b) / delta;
|
||||
if (max == g && max != b) h += (2 + (b - r) / delta);
|
||||
if (max == b && max != r) h += (4 + (r - g) / delta);
|
||||
h /= 6;
|
||||
}
|
||||
return [h, s, l];
|
||||
};
|
||||
|
||||
// Install mousedown handler (the others are set on the document on-demand)
|
||||
document.getElementsByClassName('farbtastic')[0].onmousedown = fb.mousedown;
|
||||
|
||||
// Init color
|
||||
fb.setColor('#000000');
|
||||
|
||||
// Set linked elements/callback
|
||||
if (callback) {
|
||||
fb.linkTo(callback);
|
||||
}
|
||||
};
|
||||
BIN
farbtastic/marker.png
Normal file
|
After Width: | Height: | Size: 652 B |
BIN
farbtastic/mask.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
farbtastic/wheel.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
favicon.png
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 1.3 KiB |
201
files.php
@@ -1,157 +1,46 @@
|
||||
<?php include("lib/settings.php");?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files');top.ICEcoder.canResizeFilesW()}" onContextMenu="top.ICEcoder.rightClickedFile=top.ICEcoder.thisFileFolderLink; return top.ICEcoder.showMenu()" onClick="top.ICEcoder.selectFileFolder()">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager</title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="lib/files.css">
|
||||
<script src="lib/ice-coder.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body onLoad="top.ICEcoder.fileManager()" onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);">
|
||||
|
||||
<div title="Refresh" onClick="top.ICEcoder.refreshFileManager()" class="refresh"></div>
|
||||
|
||||
<?php
|
||||
// Function to sort given values alphabetically
|
||||
function alphasort($a, $b) {
|
||||
return strcasecmp($a->getPathname(), $b->getPathname());
|
||||
}
|
||||
|
||||
// Class to put forward the values for sorting
|
||||
class SortingIterator implements IteratorAggregate {
|
||||
private $iterator = null;
|
||||
public function __construct(Traversable $iterator, $callback) {
|
||||
$array = iterator_to_array($iterator);
|
||||
usort($array, $callback);
|
||||
$this->iterator = new ArrayIterator($array);
|
||||
}
|
||||
public function getIterator() {
|
||||
return $this->iterator;
|
||||
}
|
||||
}
|
||||
|
||||
class IgnorantRecursiveDirectoryIterator extends RecursiveDirectoryIterator {
|
||||
function getChildren() {
|
||||
try {
|
||||
if (!isset($GLOBALS['ICEcoder']['bannedPaths']) ||
|
||||
!in_array($this->key(), $GLOBALS['ICEcoder']['bannedPaths'])) {
|
||||
return parent::getChildren();
|
||||
} else {
|
||||
return new RecursiveArrayIterator(array());
|
||||
}
|
||||
} catch(UnexpectedValueException $e) {
|
||||
return new RecursiveArrayIterator(array());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get a full list of dirs & files and begin sorting using above class & function
|
||||
$objectList = new SortingIterator(new RecursiveIteratorIterator(new IgnorantRecursiveDirectoryIterator($docRoot.$iceRoot), RecursiveIteratorIterator::SELF_FIRST), 'alphasort');
|
||||
|
||||
// With that done, create arrays for out final ordered list and a temp container of files
|
||||
$finalArray = $tempArray = array();
|
||||
|
||||
// To start, push folders from object into finalArray, files into tempArray
|
||||
foreach ($objectList as $objectRef) {
|
||||
$fileFolderName = substr($objectRef->getPathname(), strlen($docRoot.$iceRoot));
|
||||
$canAdd = true;
|
||||
for ($i=0;$i<count($_SESSION['bannedFiles']);$i++) {
|
||||
if(strpos($fileFolderName,$_SESSION['bannedFiles'][$i])!==false) {$canAdd = false;}
|
||||
}
|
||||
if ($objectRef->getFilename()!="." && $objectRef->getFilename()!=".." && $fileFolderName[strlen($fileFolderName)-1]!="/" && $canAdd) {
|
||||
$fileFolderName!="/" && is_dir($docRoot.$iceRoot.$fileFolderName)
|
||||
? array_push($finalArray,$fileFolderName)
|
||||
: array_push($tempArray,$fileFolderName);
|
||||
}
|
||||
}
|
||||
|
||||
// Now push root files onto the end of finalArray and splice from the temp, leaving only files that reside in subdirs
|
||||
for ($i=0;$i<count($tempArray);$i++) {
|
||||
if (count(explode("/",$tempArray[$i]))==2) {
|
||||
array_push($finalArray,$tempArray[$i]);
|
||||
array_splice($tempArray,$i,1);
|
||||
$i--;
|
||||
}
|
||||
}
|
||||
|
||||
// Lastly we push remaining files into the right subdirs in finalArray
|
||||
for ($i=0;$i<count($tempArray);$i++) {
|
||||
$insertAt = array_search(dirname($tempArray[$i]),$finalArray)+1;
|
||||
for ($j=$insertAt;$j<count($finalArray);$j++) {
|
||||
if ( strcasecmp(dirname($finalArray[$j]), dirname($tempArray[$i]))==0 &&
|
||||
strcasecmp(basename($finalArray[$j]), basename($tempArray[$i]))<0 ||
|
||||
(strpos(dirname($finalArray[$j]),dirname($tempArray[$i]))===0 && substr($finalArray[$j],strlen(dirname($tempArray[$i])),1)=="/")) {
|
||||
$insertAt++;
|
||||
}
|
||||
}
|
||||
array_splice($finalArray, $insertAt, 0, $tempArray[$i]);
|
||||
}
|
||||
|
||||
// Finally, we have our ordered list, so display in a UL
|
||||
$fileAtts = "";
|
||||
if ($serverType=="Linux") {
|
||||
$chmodInfo = substr(sprintf('%o', fileperms($docRoot.$iceRoot)), -3);
|
||||
$fileAtts = '<span style="color: #888; font-size: 8px" id="|_perms">'.$chmodInfo.'</span>';
|
||||
}
|
||||
?>
|
||||
<ul class="fileManager">
|
||||
<li class="pft-directory">
|
||||
<a nohref title="/" onMouseOver="top.ICEcoder.overFileFolder('folder','/')" onMouseOut="top.ICEcoder.overFileFolder('folder','')" style="position: relative; left:-22px">
|
||||
|
||||
<span id="|">/
|
||||
<?php echo $iceRoot == "" ? "[ROOT]" : trim($iceRoot,"/");?>
|
||||
</span>
|
||||
<?php echo $fileAtts;?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
$lastPath="";
|
||||
$fileCount=0;
|
||||
$fileBytes=0;
|
||||
$dirCount=0;
|
||||
for ($i=0;$i<count($finalArray);$i++) {
|
||||
$fileFolderName = str_replace("\\","/",$finalArray[$i]);
|
||||
$type = is_dir($docRoot.$iceRoot.$fileFolderName) ? "folder" : "file";
|
||||
$type=="folder" ? $dirCount++ : $fileCount++;
|
||||
if ($type=="file") {
|
||||
$fileBytes+=filesize($docRoot.$iceRoot.$fileFolderName);
|
||||
// Get extension (prefix 'ext-' to prevent invalid classes from extensions that begin with numbers)
|
||||
$ext = "ext-".pathinfo($docRoot.$iceRoot.$fileFolderName, PATHINFO_EXTENSION);
|
||||
}
|
||||
$thisDepth = count(explode("/",$fileFolderName));
|
||||
$lastDepth = count(explode("/",$lastPath));
|
||||
if ($thisDepth > $lastDepth) {echo "<ul>\n";}
|
||||
if ($thisDepth < $lastDepth) {
|
||||
for ($j=$lastDepth;$j>$thisDepth;$j--) {
|
||||
echo "</ul>\n";
|
||||
}
|
||||
}
|
||||
if ($serverType=="Linux") {
|
||||
$chmodInfo = substr(sprintf('%o', fileperms($docRoot.$iceRoot.$fileFolderName)), -3);
|
||||
$fileAtts = '<span style="color: #888; font-size: 8px" id="'.str_replace($docRoot,"",str_replace("/","|",$fileFolderName)).'_perms">'.$chmodInfo.'</span>';
|
||||
}
|
||||
$type == "folder" ? $class = 'pft-directory' : $class = 'pft-file '.strtolower($ext);
|
||||
echo "<li class=\"".$class."\"><a nohref title=\"$fileFolderName\" onMouseOver=\"top.ICEcoder.overFileFolder('$type','".str_replace($docRoot,"",str_replace("/","|",$fileFolderName))."')\" onMouseOut=\"top.ICEcoder.overFileFolder('$type','')\" style=\"position: relative; left:-22px\"> <span id=\"".str_replace($docRoot,"",str_replace("/","|",$fileFolderName))."\">".basename($fileFolderName)."</span> ".$fileAtts."</a>\n";
|
||||
if ($i<count($finalArray)) {echo "</li>\n";}
|
||||
$lastPath = $fileFolderName;
|
||||
}
|
||||
echo "</ul>\n</ul>\n";
|
||||
|
||||
// Output the JS vars
|
||||
echo "<script>\n";
|
||||
echo "top.ICEcoder.dirCount=";
|
||||
echo $dirCount ? $dirCount : "0";
|
||||
echo ";\ntop.ICEcoder.fileCount=";
|
||||
echo $fileCount ? $fileCount : "0";
|
||||
echo ";\ntop.ICEcoder.fileBytes=";
|
||||
echo $fileBytes ? $fileBytes : "0";
|
||||
echo ";\n</script>";
|
||||
?>
|
||||
|
||||
<iframe name="fileControl" style="display: none"></iframe>
|
||||
|
||||
</body>
|
||||
|
||||
<?php
|
||||
include("lib/headers.php");
|
||||
include("lib/settings.php");
|
||||
|
||||
// Is our dir in the list of GitHub local paths?
|
||||
$isGitHubRepoDir = in_array($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false; if (!top.ICEcoder.overCloseLink) {top.ICEcoder.tabDragEnd()}" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files');top.ICEcoder.canResizeFilesW()}" onDrop="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files')}" onContextMenu="top.ICEcoder.selectFileFolder(event); return top.ICEcoder.showMenu(event)" onClick="top.ICEcoder.selectFileFolder(event)" onDragStart="top.ICEcoder.selectFileFolder(event);" onDragOver="event.preventDefault();event.stopPropagation()">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager</title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="lib/files.css">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-types.css">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-type-icons.css">
|
||||
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
<div title="Lock" onClick="top.ICEcoder.lockUnlockNav()" id="fmLock" class="lock"></div>
|
||||
<div title="Refresh" onClick="top.ICEcoder.refreshFileManager()" class="refresh"></div>
|
||||
<?php
|
||||
if ($isGitHubRepoDir) {
|
||||
$classExtra = !isset($_GET["githubDiff"]) || $_GET["githubDiff"] == "false" ? "Off" : "On";
|
||||
echo '<div title="GitHub" onClick="top.ICEcoder.githubDiffToggle()" class="github'.$classExtra.'"></div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<ul class="fileManager">
|
||||
<li class="pft-directory dirOpen"><a nohref title="/" onMouseOver="top.ICEcoder.overFileFolder('folder','/')" onMouseOut="top.ICEcoder.overFileFolder('folder','')" onClick="top.ICEcoder.openCloseDir(this)" style="position: relative; left:-22px"> <span id="|">/ <?php echo $iceRoot == "" ? "[ROOT]" : trim($iceRoot,"/");?></span> <span style="color: #888; font-size: 8px" id="|_perms"><?php echo $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot)), -3) : "";?></span></a></li><?php
|
||||
$_GET['location'] = "|";
|
||||
include("lib/get-branch.php");
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<iframe name="fileControl" style="display: none"></iframe>
|
||||
|
||||
<iframe name="testControl" style="display: none"></iframe>
|
||||
|
||||
<iframe name="processControl" style="display: none"></iframe>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
images/big-arrow.gif
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
images/bug-reporting-icons.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
images/checkbox.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/color-picker.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 73 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 8.9 KiB |
BIN
images/nav-alpha.png
Normal file
|
After Width: | Height: | Size: 999 B |
|
Before Width: | Height: | Size: 435 B |
BIN
images/nav-close-all.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 480 B |
|
Before Width: | Height: | Size: 65 B |
BIN
images/select-arrow.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
480
index.php
@@ -1,191 +1,291 @@
|
||||
<!DOCTYPE html>
|
||||
<?php include("lib/settings.php");
|
||||
|
||||
// Check IP permissions
|
||||
if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*", $_SESSION['allowedIPs'])) {
|
||||
header('Location: /');
|
||||
};
|
||||
|
||||
$updateMsg = '';
|
||||
// Check for updates
|
||||
if ($ICEcoder["checkUpdates"]) {
|
||||
$icv = json_encode(file_get_contents("http://icecoder.net/latest-version.txt"));
|
||||
$icv = rtrim(ltrim($icv,'"'),'"\\n');
|
||||
if ($ICEcoder["versionNo"]<$icv) {
|
||||
$updateMsg = ';top.ICEcoder.message(\'ICEcoder '.$icv.' now released\n\nPlease upgrade\')';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'top');top.ICEcoder.canResizeFilesW()}">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<script>
|
||||
iceRoot = "<?php echo $ICEcoder["root"]; ?>";
|
||||
|
||||
window.onbeforeunload = function() {
|
||||
if (top.ICEcoder.changedContent.indexOf(1)>-1) {
|
||||
return "You have some unsaved changes.";
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script language="JavaScript" src="lib/ice-coder.js"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
|
||||
echo '<script src="plugins/jshint/jshint.js"></script>';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body onLoad="<?php
|
||||
echo 'top.ICEcoder.previousFiles = [';
|
||||
if ($ICEcoder["previousFiles"]!="") {
|
||||
$openFilesArray = explode(",",$ICEcoder["previousFiles"]);
|
||||
echo "'".implode("','",$openFilesArray)."'";
|
||||
}
|
||||
echo "];top.ICEcoder.theme = '";
|
||||
echo $ICEcoder["theme"]=="default" ? 'icecoder' : $ICEcoder["theme"];
|
||||
echo "'";
|
||||
echo ';top.ICEcoder.tabsIndent = ';
|
||||
echo $ICEcoder["tabsIndent"] ? 'true' : 'false';
|
||||
echo ';top.ICEcoder.openLastFiles = ';
|
||||
echo $ICEcoder["openLastFiles"] ? 'true' : 'false';
|
||||
echo ';top.ICEcoder.lineWrapping = ';
|
||||
echo $ICEcoder["lineWrapping"] ? 'true' : 'false';
|
||||
echo ';top.ICEcoder.tabWidth = ';
|
||||
echo $ICEcoder["tabWidth"];
|
||||
?>;ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
<div id="blackMask" class="blackMask" onClick="ICEcoder.showHide('hide',this)" onContextMenu="return false">
|
||||
<div class="popupVCenter">
|
||||
<div class="popup" id="mediaContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingMask" class="blackMask" style="visibility: visible" onContextMenu="return false">
|
||||
<span class="progressBar" id="progressBar" style="-webkit-animation:fullexpand 10s ease-out; -moz-animation:fullexpand 10s ease-out"></span>
|
||||
<div class="popupVCenter">
|
||||
<div class="popup">
|
||||
<div class="circleOutside"></div>
|
||||
<div class="circleInside"></div>
|
||||
working...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fileMenu" class="fileMenu" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract');this.style.display='none'" onContextMenu="return false">
|
||||
<span id="folderMenuItems">
|
||||
<a href="javascript:top.ICEcoder.newFile()" onMouseOver="ICEcoder.showFileMenu()">New File</a>
|
||||
<a href="javascript:top.ICEcoder.newFolder()" onMouseOver="ICEcoder.showFileMenu()">New Folder</a>
|
||||
<a href="javascript:top.ICEcoder.pasteFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Paste</a>
|
||||
<a href="javascript:top.ICEcoder.uploadFilesSelect(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Upload File(s)</a>
|
||||
<div style="display: none">
|
||||
<form enctype="multipart/form-data" id="uploadFilesForm" action="lib/file-control.php?action=upload&file=/uploaded" method="POST" target="fileControl">
|
||||
<input type="hidden" name="folder" id="uploadDir" value="/">
|
||||
<input type="file" name="filesInput[]" id="fileInput" onchange="top.ICEcoder.uploadFilesSubmit(this)" multiple>
|
||||
<input type="submit" value="Upload File">
|
||||
</form>
|
||||
</div>
|
||||
</span>
|
||||
<a href="javascript:top.ICEcoder.deleteFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Delete</a>
|
||||
<span id="singleFileMenuItems">
|
||||
<a href="javascript:top.ICEcoder.copyFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Copy</a>
|
||||
<a href="javascript:top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Rename</a>
|
||||
<a href="javascript:window.open(top.ICEcoder.rightClickedFile.replace(/\|/g,'/'))" onMouseOver="ICEcoder.showFileMenu()">View Webpage</a>
|
||||
</span>
|
||||
<a href="javascript:top.ICEcoder.zipIt(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Zip It!</a>
|
||||
<a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Properties</a>
|
||||
</div>
|
||||
|
||||
<div id="header" class="header" onContextMenu="return false">
|
||||
<div class="plugins" id="pluginsContainer">
|
||||
<?php echo $pluginsDisplay; ?>
|
||||
</div>
|
||||
<div class="version"><a href="javascript:top:ICEcoder.logout()">logout</a> : v <?php echo $ICEcoder["versionNo"];?></div><img src="images/full-screen.gif" id="screenMode" class="screenModeIcon" onClick="top.ICEcoder.fullScreenSwitcher()">
|
||||
<img src="images/ice-coder.png" class="logo" onClick="ICEcoder.helpScreen()" onContextMenu="ICEcoder.settingsScreen()">
|
||||
</div>
|
||||
|
||||
<div id="files" class="files" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract'); top.document.getElementById('fileMenu').style.display='none';">
|
||||
<div class="account" id="account">
|
||||
<div class="accountOptions">
|
||||
<div title="Save" onClick="ICEcoder.fMIcon('save')" id="fMSave" class="save"></div>
|
||||
<div title="Open" onClick="ICEcoder.fMIcon('open')" id="fMOpen" class="open"></div>
|
||||
<div title="New File" onClick="ICEcoder.fMIcon('newFile')" id="fMNewFile" class="newFile"></div>
|
||||
<div title="New Folder" onClick="ICEcoder.fMIcon('newFolder')" id="fMNewFolder" class="newFolder"></div>
|
||||
<div title="Delete" onClick="ICEcoder.fMIcon('delete')" id="fMDelete" class="delete"></div>
|
||||
<div title="Rename" onClick="ICEcoder.fMIcon('rename')" id="fMRename" class="rename"></div>
|
||||
<div title="View" onClick="ICEcoder.fMIcon('view')" id="fMView" class="view"></div>
|
||||
|
||||
<div title="Lock" onClick="ICEcoder.lockUnlockNav()" id="fmLock" class="lock"></div>
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="filesFrame" class="frame" name="ff" src="files.php" style="opacity: 0" onLoad="this.style.opacity='1';this.contentWindow.onscroll=function(){top.ICEcoder.mouseDown=false}"></iframe>
|
||||
<div class="serverMessage" id="serverMessage"></div>
|
||||
</div>
|
||||
|
||||
<div id="editor" class="editor">
|
||||
<div id="tabsBar" class="tabsBar" onContextMenu="return false">
|
||||
<a nohref onClick="top.ICEcoder.closeAllTabs()"><img src="images/nav-close.gif" class="closeAllTabs"></a>
|
||||
<?php
|
||||
for ($i=1;$i<=100;$i++) {
|
||||
echo '<div id="tab'.$i.'" class="tab" draggable="true" onClick="ICEcoder.canSwitchTabs ? ICEcoder.switchTab('.$i.') : ICEcoder.canSwitchTabs=true; thisColor=\'#000\'" onMouseOver="thisColor=this.style.color;this.style.color=\'#000\'" onMouseOut="this.style.color=thisColor"></div>';
|
||||
}
|
||||
?><div class="newTab" onClick="ICEcoder.newTab()"><img src="images/nav-new.png"></div>
|
||||
</div>
|
||||
<div id="findBar" class="findBar" onContextMenu="return false">
|
||||
<form name="findAndReplace" onSubmit="ICEcoder.findReplace('findReplace',false,true);return false">
|
||||
<div class="findReplace">
|
||||
<div class="findText">Find</div>
|
||||
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace('find',true,false)">
|
||||
|
||||
<select name="connector" onChange="ICEcoder.findReplaceOptions()">
|
||||
<option>in</option>
|
||||
<option>and</option>
|
||||
</select>
|
||||
<div class="replaceText" id="rText" style="display: none">
|
||||
<select name="replaceAction" class="replaceAction">
|
||||
<option>replace</option>
|
||||
<option>replace all</option>
|
||||
</select>
|
||||
with
|
||||
</div>
|
||||
<input type="text" name="replace" value="" id="replace" class="textbox replace" style="display: none">
|
||||
<div class="targetText" id="rTarget" style="display: none">in</div>
|
||||
<select name="target" onChange="ICEcoder.updateResultsDisplay(this.value=='this document' ? 'show' : 'hide')">
|
||||
<option>this document</option>
|
||||
<option>open documents</option>
|
||||
<option>all files</option>
|
||||
<option>all filenames</option>
|
||||
</select>
|
||||
<input type="submit" name="submit" value=">>" class="submit">
|
||||
<div class="results" id="results"></div>
|
||||
</div>
|
||||
</form>
|
||||
<form onSubmit="return ICEcoder.goToLine()">
|
||||
<div class="codeAssist"><input type="checkbox" name="codeAssist" id="codeAssist" checked onClick="top.ICEcoder.codeAssistToggle()">Code Assist</div>
|
||||
<div class="goLine">Go to Line<input type="text" name="goToLine" value="" id="goToLineNo" class="textbox goToLine">
|
||||
</form>
|
||||
</div>
|
||||
<iframe name="contentFrame" id="content" src="editor.php" class="code"></iframe>
|
||||
</div>
|
||||
|
||||
<div class="footer" id="footer" onContextMenu="return false">
|
||||
<div class="nesting" id="nestValid">Nesting OK</div>
|
||||
<div class="nestLoc">cursor nest location</div>
|
||||
<div class="nestDisplay" id="nestDisplay"></div>
|
||||
<div class="charDisplay" id="charDisplay"><span id="char"></span></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
ICEcoder.initAliases();
|
||||
ICEcoder.setLayout('dontSetEditor');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
<?php
|
||||
include("lib/headers.php");
|
||||
include("lib/settings.php");
|
||||
|
||||
// Check IP permissions
|
||||
if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*", $_SESSION['allowedIPs'])) {
|
||||
header('Location: /');
|
||||
};
|
||||
|
||||
$updateMsg = '';
|
||||
// Check for updates
|
||||
if ($ICEcoder["checkUpdates"]) {
|
||||
$icv_url = "https://icecoder.net/latest-version?thisVersion=".$ICEcoder["versionNo"];
|
||||
if (ini_get('allow_url_fopen')) {
|
||||
$icvInfo = @file_get_contents($icv_url,false,$context);
|
||||
if (!$icvInfo) {
|
||||
$icvInfo = file_get_contents(str_replace("https:","http:",$icv_url), false, $context);
|
||||
}
|
||||
$icvInfo = explode("\n",$icvInfo);
|
||||
} elseif (function_exists('curl_init')) {
|
||||
$ch = curl_init($icv_url);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$icvInfo = explode("\n", curl_exec($ch));
|
||||
}
|
||||
$icv = $icvInfo[0];
|
||||
$icvI = str_replace('"','\\\'',$icvInfo[1]);
|
||||
$thisV = $ICEcoder["versionNo"];
|
||||
if (strpos($thisV,"beta")>-1 && !strpos($icv,"beta") && str_replace(" beta","",$thisV) == $icv) {$thisV-=0.1;};
|
||||
if ($thisV<$icv) {
|
||||
$updateMsg = ";top.ICEcoder.dataMessage('<b>UPDATE INFO:</b> ICEcoder v ".$icv." now available. (Your version is v ".$ICEcoder["versionNo"].").<br><br><a onclick=\\'top.ICEcoder.update()\\' style=\\'color:#fff; background: #b00; padding: 5px; text-decoration: none; cursor: pointer\\'>Update now</a><br><br>".$icvI."');";
|
||||
}
|
||||
}
|
||||
|
||||
$isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false; if (!top.ICEcoder.overCloseLink) {top.ICEcoder.tabDragEnd()}" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'top');top.ICEcoder.canResizeFilesW()}" onMouseWheel="if (!top.ICEcoder.getcMInstance().hasFocus()) {event.wheelDelta > 0 ? top.ICEcoder.nextTab() : top.ICEcoder.previousTab();}">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<script>
|
||||
iceRoot = "<?php echo $ICEcoder['root']; ?>";
|
||||
|
||||
window.onbeforeunload = function() {
|
||||
for(var i=1;i<=ICEcoder.savedPoints.length;i++) {
|
||||
if (ICEcoder.savedPoints[i-1]!=top.ICEcoder.getcMInstance(i).changeGeneration()) {
|
||||
return "You have some unsaved changes.";
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js"></script>
|
||||
<script src="lib/mmd.js"></script>
|
||||
<script src="farbtastic/farbtastic.js"></script>
|
||||
<link rel="stylesheet" href="farbtastic/farbtastic.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body onLoad="<?php
|
||||
echo "top.ICEcoder.versionNo = '".$ICEcoder["versionNo"]."';".
|
||||
'top.ICEcoder.previousFiles = [';
|
||||
if ($ICEcoder["previousFiles"]!="") {
|
||||
$openFilesArray = explode(",",$ICEcoder["previousFiles"]);
|
||||
echo "'".implode("','",$openFilesArray)."'";
|
||||
}
|
||||
echo "];";
|
||||
echo "top.ICEcoder.theme = '".($ICEcoder["theme"]=="default" ? 'icecoder' : $ICEcoder["theme"])."';".
|
||||
"top.ICEcoder.fontSize = '".$ICEcoder["fontSize"]."';".
|
||||
"top.ICEcoder.openLastFiles = ".($ICEcoder["openLastFiles"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.codeAssist = ".($ICEcoder["codeAssist"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.lineWrapping = ".($ICEcoder["lineWrapping"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.indentWithTabs = ".($ICEcoder["indentWithTabs"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.indentSize = ".$ICEcoder["indentSize"].";".
|
||||
"top.ICEcoder.demoMode = ".($ICEcoder["demoMode"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.tagWrapperCommand = '".$ICEcoder["tagWrapperCommand"]."';".
|
||||
"top.ICEcoder.autoComplete = '".$ICEcoder["autoComplete"]."';".
|
||||
"top.ICEcoder.bugFilePaths = ['".implode("','",$ICEcoder["bugFilePaths"])."'];".
|
||||
"top.ICEcoder.bugFileCheckTimer = ".$ICEcoder["bugFileCheckTimer"].";".
|
||||
"top.ICEcoder.bugFileMaxLines = ".$ICEcoder["bugFileMaxLines"].";".
|
||||
"top.ICEcoder.csrf = '".$_SESSION["csrf"]."'";
|
||||
?>;ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;top.ICEcoder.content.style.visibility='visible';top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = 'processes/on-load.php';" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
<div id="blackMask" class="blackMask" onClick="if (!ICEcoder.overPopup) {ICEcoder.showHide('hide',this)}" onContextMenu="return false">
|
||||
<div class="popupVCenter">
|
||||
<div class="popup" id="mediaContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingMask" class="blackMask" style="visibility: visible" onContextMenu="return false">
|
||||
<div class="popupVCenter">
|
||||
<div class="popup">
|
||||
<div class="spinner"></div>
|
||||
working...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plugins" class="plugins" style="<?php echo $ICEcoder["pluginPanelAligned"];?>: 0" onMouseOver="top.ICEcoder.showHidePlugins('show')" onMouseOut="top.ICEcoder.showHidePlugins('hide')" onClick="top.ICEcoder.showHidePlugins('hide')">
|
||||
<div style="padding: 15px">
|
||||
<a nohref onClick="top.ICEcoder.showColorPicker(top.document.getElementById('color') ? top.document.getElementById('color').value : '#123456')" title="Farbtastic
|
||||
Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Color Picker"></a><br><br>
|
||||
<div id="pluginsOptional"><?php echo $pluginsDisplay; ?></div>
|
||||
<a nohref onclick="top.ICEcoder.pluginsManager()" title="Plugins Manager" style="color: #fff; cursor: pointer">+ / -</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fileMenu" class="fileMenu" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract');top.ICEcoder.hideFileMenu()" style="opacity: 0" onContextMenu="return false">
|
||||
<span id="folderMenuItems">
|
||||
<a href="javascript:top.ICEcoder.newFile()" onMouseOver="ICEcoder.showFileMenu()">New File</a>
|
||||
<a href="javascript:top.ICEcoder.newFolder()" onMouseOver="ICEcoder.showFileMenu()">New Folder</a>
|
||||
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
|
||||
<a href="javascript:top.ICEcoder.uploadFilesSelect(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Upload File(s)</a>
|
||||
<div style="display: none">
|
||||
<form enctype="multipart/form-data" id="uploadFilesForm" action="lib/file-control.php?action=upload&file=/uploaded" method="POST" target="fileControl">
|
||||
<input type="hidden" name="folder" id="uploadDir" value="/">
|
||||
<input type="file" name="filesInput[]" id="fileInput" onchange="top.ICEcoder.uploadFilesSubmit(this)" multiple>
|
||||
<input type="submit" value="Upload File">
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</div>
|
||||
<a href="javascript:top.ICEcoder.pasteFiles(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()" id="fmMenuPasteOption" style="display: none">Paste</a>
|
||||
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
|
||||
</span>
|
||||
<a href="javascript:top.ICEcoder.openFilesFromList(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Open</a>
|
||||
<a href="javascript:top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Copy</a>
|
||||
<a href="javascript:top.ICEcoder.duplicateFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Duplicate</a>
|
||||
<a href="javascript:top.ICEcoder.deleteFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Delete</a>
|
||||
<span id="singleFileMenuItems">
|
||||
<a href="javascript:top.ICEcoder.renameFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Rename</a>
|
||||
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
|
||||
<a nohref onClick="window.open(iceRoot + top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'))" onMouseOver="ICEcoder.showFileMenu()" style="cursor: pointer">View Webpage</a>
|
||||
</span>
|
||||
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/zip-it/index.php")) {
|
||||
echo '<a href="javascript:top.ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Zip It!</a>'.PHP_EOL;
|
||||
};
|
||||
?>
|
||||
<a href="javascript:top.ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Download</a>
|
||||
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
|
||||
<a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Properties</a>
|
||||
</div>
|
||||
|
||||
<div id="header" class="header" onContextMenu="return false"></div>
|
||||
|
||||
<div id="files" class="files" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract'); top.ICEcoder.hideFileMenu();" onContextMenu="return false">
|
||||
<div id="fileNav" class="fileNav">
|
||||
<ul>
|
||||
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsFile')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsFile')}" id="optionsFileNav">File</a></li>
|
||||
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsEdit')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsEdit')}" id="optionsEditNav">Edit</a></li>
|
||||
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsRemote')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsRemote')}" id="optionsRemoteNav">Remote</a></li>
|
||||
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsHelp')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsHelp')}" id="optionsHelpNav">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="options" id="fileOptions">
|
||||
<div id="optionsFile" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
|
||||
<ul>
|
||||
<li><a nohref onClick="ICEcoder.newFile()">New File...</a></li>
|
||||
<li><a nohref onClick="ICEcoder.newFolder()">New Folder...</a></li>
|
||||
<li><a nohref onClick="ICEcoder.openPrompt()">Open...</a></li>
|
||||
<li><a nohref onClick="ICEcoder.saveFile()">Save</a></li>
|
||||
<li><a nohref onclick="ICEcoder.saveFile('saveAs')">Save As...</a></li>
|
||||
<li><a nohref onclick="ICEcoder.openPreviewWindow()">Live Preview</a></li>
|
||||
<li><a nohref onclick="ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Download</a></li>
|
||||
<li><a nohref onclick="ICEcoder.copyFiles(top.ICEcoder.selectedFiles)">Copy</a></li>
|
||||
<li><a nohref onclick="ICEcoder.pasteFiles(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Paste</a></li>
|
||||
<li><a nohref onclick="ICEcoder.deleteFiles(top.ICEcoder.selectedFiles)">Delete</a></li>
|
||||
<li><a nohref onclick="ICEcoder.duplicateFiles(top.ICEcoder.selectedFiles)">Duplicate</a></li>
|
||||
<li><a nohref onclick="ICEcoder.renameFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Rename</a></li>
|
||||
<li><a nohref onclick="ICEcoder.uploadFilesSelect(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Upload...</a></li>
|
||||
<li><a nohref onclick="ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Zip</a></li>
|
||||
<li><a nohref onclick="ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Properties...</a></li>
|
||||
<li><a nohref onClick="ICEcoder.printCode()">Print...</a></li>
|
||||
<li><a nohref onClick="ICEcoder.fullScreenSwitcher()">Fullscreen toggle</a></li>
|
||||
<li><a nohref onClick="ICEcoder.logout()">Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="optionsEdit" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
|
||||
<ul>
|
||||
<li><a nohref onclick="ICEcoder.undo()">Undo</a></li>
|
||||
<li><a nohref onclick="ICEcoder.redo()">Redo</a></li>
|
||||
<li><a nohref onclick="ICEcoder.indent('more')">Indent more</a></li>
|
||||
<li><a nohref onclick="ICEcoder.indent('less')">Indent less</a></li>
|
||||
<li><a nohref onclick="ICEcoder.autocomplete()">Autocomplete</a></li>
|
||||
<li><a nohref onclick="ICEcoder.lineCommentToggle()">Comment/Uncomment</a></li>
|
||||
<li><a nohref onclick="ICEcoder.jumpToDefinition()">Jump to Definition</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="optionsRemote" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
|
||||
<ul>
|
||||
<li><a nohref onclick="ICEcoder.githubManager()">GitHub</a></li>
|
||||
<li><a nohref onclick="ICEcoder.message('SVN integration coming soon')">SVN</a></li>
|
||||
<li><a nohref onclick="ICEcoder.message('Bitbucket integration coming soon\n\nCan you help with this? Get involved at icecoder.net')">Bitbucket</a></li>
|
||||
<li><a nohref onclick="ICEcoder.message('Amazon AWS integration coming soon\n\nCan you help with this? Get involved at icecoder.net')">Amazon AWS</a></li>
|
||||
<li><a nohref onclick="ICEcoder.message('Dropbox integration coming soon\n\nCan you help with this? Get involved at icecoder.net')">Dropbox</a></li>
|
||||
<li><a nohref onclick="ICEcoder.message('FTP integration coming soon\n\nCan you help with this? Get involved at icecoder.net')">FTP</a></li>
|
||||
<li><a nohref onclick="ICEcoder.message('SSH integration coming soon\n\nCan you help with this? Get involved at icecoder.net')">SSH</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="optionsHelp" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
|
||||
<ul>
|
||||
<li><a nohref onclick="ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>')">Manual</a></li>
|
||||
<li><a nohref onClick="ICEcoder.helpScreen()">Shortcuts</a></li>
|
||||
<li><a nohref onClick="ICEcoder.settingsScreen()">Settings</a></li>
|
||||
<li><a nohref onclick="ICEcoder.searchForSelected()">Search for selected</a></li>
|
||||
<li><a href="https://icecoder.net" target="_blank">ICEcoder website</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="filesFrame" class="frame" name="ff" src="files.php" style="opacity: 0" onLoad="this.style.opacity='1';this.contentWindow.onscroll=function(){top.ICEcoder.mouseDown=false}"></iframe>
|
||||
<div class="serverMessage" id="serverMessage"></div>
|
||||
</div>
|
||||
|
||||
<div id="editor" class="editor">
|
||||
<div id="tabsBar" class="tabsBar" onContextMenu="return false">
|
||||
<a nohref onClick="top.ICEcoder.closeAllTabs()"><img src="images/nav-close-all.gif" class="closeAllTabs" title="Close all tabs"></a>
|
||||
<a nohref onClick="top.ICEcoder.alphaTabs()"><img src="images/nav-alpha.png" class="alphaTabs" title="Alphabetize tabs"></a>
|
||||
<?php
|
||||
for ($i=1;$i<=100;$i++) {
|
||||
echo '<div id="tab'.$i.'" class="tab" onMouseDown="ICEcoder.canSwitchTabs ? ICEcoder.switchTab(parseInt(this.id.slice(3),10)) : ICEcoder.canSwitchTabs=true; thisColor=top.ICEcoder.tabFGselected; if (!top.ICEcoder.overCloseLink) {ICEcoder.tabDragStart(parseInt(this.id.slice(3),10))}; if (event.button==1) {ICEcoder.closeTab(parseInt(this.id.slice(3),10)); return false};" onMouseOver="thisColor=this.style.color;this.style.color=top.ICEcoder.tabFGselected" onMouseOut="this.style.color=thisColor"></div>';
|
||||
}
|
||||
?><div class="newTab" onClick="ICEcoder.newTab()" id="newTab">+</div>
|
||||
</div>
|
||||
<div id="findBar" class="findBar" onContextMenu="return false">
|
||||
<form name="findAndReplace" onSubmit="ICEcoder.findReplace(top.document.getElementById('find').value,false,true);return false">
|
||||
<div class="findReplace">
|
||||
<div class="findText">Find</div>
|
||||
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false)">
|
||||
|
||||
<div class="selectWrapper" style="width: 41px">
|
||||
<select name="connector" onChange="ICEcoder.findReplaceOptions()" style="width: 40px; margin-top: 4px">
|
||||
<option>in</option>
|
||||
<option>and</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="replaceText" id="rText" style="display: none">
|
||||
<div class="selectWrapper" style="width: 75px; overflow: visible">
|
||||
<select name="replaceAction" style="width: 72px; margin-top: -2px">
|
||||
<option>replace</option>
|
||||
<option>replace all</option>
|
||||
</select>
|
||||
</div>
|
||||
with
|
||||
</div>
|
||||
<input type="text" name="replace" value="" id="replace" class="textbox replace" style="display: none">
|
||||
<div class="targetText" id="rTarget" style="display: none">in</div>
|
||||
<div class="selectWrapper" style="width: 104px">
|
||||
<select name="target" onChange="ICEcoder.updateResultsDisplay(this.value=='this document' ? 'show' : 'hide')" style="width: 101px; margin-top: 4px; margin-left: 2px">
|
||||
<option>this document</option>
|
||||
<option>open documents</option>
|
||||
<option>all files</option>
|
||||
<option>all filenames</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="submit" name="submit" value=">>" class="submit">
|
||||
<div class="results" id="results"></div>
|
||||
</div>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
<form onSubmit="return ICEcoder.goToLine()">
|
||||
<div class="codeAssist" title="Turn on/off JS Hint & CSS color previews">
|
||||
<input type="checkbox" name="codeAssist" id="codeAssist" class="codeAssistCheckbox" <?php if ($ICEcoder['codeAssist']) {echo 'checked ';};?>>
|
||||
<span class="codeAssistDisplay" id="codeAssistDisplay" style="background-position: <?php echo $ICEcoder['codeAssist'] ? "0" : "-16";?> 0" onClick="top.ICEcoder.codeAssistToggle()"></span> Code Assist
|
||||
</div>
|
||||
<div class="goLine">Go to Line <input type="text" name="goToLine" value="" id="goToLineNo" class="textbox goToLine">
|
||||
<div class="view" title="View" onClick="top.ICEcoder.openPreviewWindow()" id="fMView"></div>
|
||||
<div class="bug" title="Bug reporting not active" onClick="top.ICEcoder.openBugReport()" id="bugIcon"></div>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</div>
|
||||
<iframe name="contentFrame" id="content" src="editor.php" class="code"></iframe>
|
||||
</div>
|
||||
|
||||
<div class="footer" id="footer" onContextMenu="return false">
|
||||
<div class="nesting" id="nestValid"></div>
|
||||
<div class="nestDisplay" id="nestDisplay"></div>
|
||||
<div class="byteDisplay" id="byteDisplay" style="display: none" onClick="top.ICEcoder.showDisplay('char')"></div>
|
||||
<div class="charDisplay" id="charDisplay" style="display: inline-block" onClick="top.ICEcoder.showDisplay('byte')"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
ICEcoder.initAliases();
|
||||
ICEcoder.setLayout('dontSetEditor');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
5
jshint/jshint-2.1.4.min.js
vendored
Normal file
111
lib/bug-files-check.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
// Load common functions
|
||||
include("headers.php");
|
||||
include_once("settings-common.php");
|
||||
|
||||
$files = explode(",",str_replace("|","/",$_GET['files']));
|
||||
$filesSizesSeen = explode(",",$_GET['filesSizesSeen']);
|
||||
$maxLines = $_GET['maxLines'];
|
||||
|
||||
$result = "ok";
|
||||
|
||||
for ($i=0; $i<count($files); $i++) {
|
||||
$files[$i] = $_SERVER['DOCUMENT_ROOT'].$files[$i];
|
||||
if (!file_exists($files[$i])) {
|
||||
$result = "error";
|
||||
} else {
|
||||
$filesSizesSeen[$i] = filesize($files[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($result != "error") {
|
||||
|
||||
$filesWithNewBugs = 0;
|
||||
|
||||
for ($i=0; $i<count($files); $i++) {
|
||||
// If we have set a filesize value previously and it's different to now, there's new bugs
|
||||
$fileSizesSeenArray = explode(",",$_GET['filesSizesSeen']);
|
||||
if ($fileSizesSeenArray[$i]!="null" && $fileSizesSeenArray[$i] != $filesSizesSeen[$i]) {
|
||||
$result = "bugs";
|
||||
$filesWithNewBugs++;
|
||||
|
||||
$filename = $files[$i];
|
||||
$chars = ($filesSizesSeen[$i]-$fileSizesSeenArray[$i]);
|
||||
$buffer = 4096;
|
||||
$lines = $maxLines+1+1; // 1 (possibly) for end of file and 1 for partial lines
|
||||
|
||||
// Open the file
|
||||
$f = fopen($filename, "rb");
|
||||
|
||||
// Jump to last character
|
||||
fseek($f, 0, SEEK_END);
|
||||
|
||||
// If we don't have a line at end, deduct 1 from $lines to get
|
||||
if(fread($f, 1) != "\n") $lines -= 1;
|
||||
|
||||
// Start reading
|
||||
$output = "";
|
||||
$chunk = "";
|
||||
|
||||
// While we would like more
|
||||
while(ftell($f) > 0 && $chars > 0 && $lines > 0) {
|
||||
|
||||
// Figure out how far back we should jump
|
||||
$seek = min($chars, $buffer);
|
||||
|
||||
// Do the jump (backwards, relative to where we are)
|
||||
fseek($f, -$seek, SEEK_CUR);
|
||||
|
||||
// Read a chunk and prepend it to our output
|
||||
$output = ($chunk = fread($f, $seek)).$output;
|
||||
|
||||
// Jump back to where we started reading
|
||||
fseek($f, -mb_strlen($chunk, '8bit'), SEEK_CUR);
|
||||
|
||||
// Take this seek chunk off the number of chars
|
||||
$chars -= $seek;
|
||||
|
||||
// Deduct new lines found in this chunk from $lines
|
||||
$lines -= substr_count($chunk, "\n");
|
||||
}
|
||||
|
||||
// Close file
|
||||
fclose($f);
|
||||
|
||||
// OK, now we have bug lines to output, save to our file
|
||||
$output = rtrim(str_replace("\r\n","\n",$output));
|
||||
$output = explode("\n",$output);
|
||||
$output = array_slice($output, -$maxLines);
|
||||
$output = "Found in: ".$filename."...\n".implode("\n",$output);
|
||||
|
||||
if ($filesWithNewBugs==1) {
|
||||
file_put_contents("../tmp/bug-report.log", $output);
|
||||
} else {
|
||||
file_put_contents("../tmp/bug-report.log", "\n\n".$output, FILE_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Get dir name tmp dir's parent
|
||||
$tmpLoc = dirname(__FILE__);
|
||||
$tmpLoc = explode(DIRECTORY_SEPARATOR,$tmpLoc);
|
||||
$tmpLoc = $tmpLoc[count($tmpLoc)-2];
|
||||
|
||||
// Output result and status array
|
||||
$status = array(
|
||||
"files" => $files,
|
||||
"filesSizesSeen" => $filesSizesSeen,
|
||||
"maxLines" => $maxLines,
|
||||
"bugReportPath" => "|".$tmpLoc."|tmp|bug-report.log",
|
||||
"result" => $result
|
||||
);
|
||||
|
||||
// Include our process once our bug checking work is done
|
||||
include("../processes/on-bug-check.php");
|
||||
|
||||
// Finally, display our status in JSON format as the XHR response text
|
||||
echo json_encode($status);
|
||||
|
||||
?>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
$ICEcoder = array(
|
||||
"root" => "",
|
||||
"tabsIndent" => true,
|
||||
"checkUpdates" => true,
|
||||
"openLastFiles" => true,
|
||||
"findFilesExclude" => array("_coder","ICEcoder",".doc",".gif",".jpg",".jpeg",".pdf",".png",".swf",".xml",".zip"),
|
||||
"codeAssist" => true,
|
||||
"visibleTabs" => false,
|
||||
"lockedNav" => true,
|
||||
"accountPassword" => "",
|
||||
"bannedFiles" => array("_coder","ICEcoder"),
|
||||
"bannedPaths" => array("/var/www/.git","/var/www/sites/all/modules","/var/www/sites/default/files"),
|
||||
"allowedIPs" => array("*"),
|
||||
"plugins" => array(
|
||||
array("Terminal","plugins/terminal/icon.gif","margin-top: 3px","plugins/terminal","_blank",""),
|
||||
array("Adminer","plugins/adminer/icon.png","margin-top: 3px","plugins/adminer/adminer-3.4.0-mysql-en.php","_blank",""),
|
||||
array("JS Hint","plugins/jshint/icon.png","margin-top: 3px","http://www.jshint.com","_blank",""),
|
||||
array("Emmet","plugins/emmet/icon.png","margin-top: 3px","http://docs.emmet.io","_blank",""),
|
||||
array("ICErepo","plugins/ice-repo/icon.png","margin-top: 3px","plugins/ice-repo","_blank",""),
|
||||
array("Dochub","plugins/dochub/icon.png","margin-top: 3px","http://dochub.io","_blank",""),
|
||||
array("JS Regex","plugins/jsregex/icon.png","margin-top: 3px","http://jsregex.herokuapp.com","_blank",""),
|
||||
array("Zip It!","plugins/zip-it/icon.png","margin-top: 3px; margin-left: 3px","plugins/zip-it/?zip=|&exclude=*.doc*.gif*.jpg*.jpeg*.pdf*.png*.swf*.xml*.zip","fileControl:<b>Zipping Files</b>","30")
|
||||
),
|
||||
"theme" => "default",
|
||||
"lineWrapping" => true,
|
||||
"tabWidth" => 4,
|
||||
"previousFiles" => "",
|
||||
"last10Files" => ""
|
||||
);
|
||||
?>
|
||||
14
lib/config___settings.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// ICEcoder system settings
|
||||
$ICEcoderSettings = array(
|
||||
"versionNo" => "4.1",
|
||||
"codeMirrorDir" => "CodeMirror-4.2",
|
||||
"docRoot" => $_SERVER['DOCUMENT_ROOT'],
|
||||
"demoMode" => false,
|
||||
"devMode" => false,
|
||||
"loginRequired" => true,
|
||||
"multiUser" => false,
|
||||
"lineEnding" => "\n",
|
||||
"enableRegistration" => true
|
||||
);
|
||||
?>
|
||||
32
lib/config___users-template.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
$ICEcoderUserSettings = array(
|
||||
"versionNo" => "4.1",
|
||||
"root" => "",
|
||||
"checkUpdates" => true,
|
||||
"openLastFiles" => true,
|
||||
"findFilesExclude" => array(".doc",".gif",".jpg",".jpeg",".pdf",".png",".swf",".xml",".zip"),
|
||||
"codeAssist" => true,
|
||||
"visibleTabs" => false,
|
||||
"lockedNav" => true,
|
||||
"tagWrapperCommand" => "ctrl+alt",
|
||||
"autoComplete" => "ctrl+space",
|
||||
"password" => "",
|
||||
"bannedFiles" => array(),
|
||||
"bannedPaths" => array("/var/www/.git","/var/www/sites/all/modules","/var/www/sites/default/files"),
|
||||
"allowedIPs" => array("*"),
|
||||
"theme" => "default",
|
||||
"fontSize" => "13px",
|
||||
"lineWrapping" => true,
|
||||
"indentWithTabs" => true,
|
||||
"indentSize" => 4,
|
||||
"bugFilePaths" => array(),
|
||||
"bugFileCheckTimer" => 0,
|
||||
"bugFileMaxLines" => 0,
|
||||
"pluginPanelAligned" => "left",
|
||||
"plugins" => array(),
|
||||
"githubLocalPaths" => array(),
|
||||
"githubRemotePaths" => array(),
|
||||
"previousFiles" => "",
|
||||
"last10Files" => ""
|
||||
);
|
||||
?>
|
||||
16
lib/download.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
|
||||
$file = $docRoot.$iceRoot.str_replace("../","",str_replace("|","/",$_GET['file']));
|
||||
|
||||
if (file_exists($file)) {
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Disposition: attachment; filename='.basename($file));
|
||||
header('Content-Length: '.filesize($file));
|
||||
ob_clean();
|
||||
flush();
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
@@ -1,40 +1,40 @@
|
||||
/* ICE coder default theme: Based VERY loosely on Monokai */
|
||||
/* ICEcoder default theme by Matt Pass */
|
||||
|
||||
.cm-s-icecoder {color: #666; background: #1c1c19}
|
||||
.cm-s-icecoder {color: #666; background: #161612}
|
||||
|
||||
.cm-s-icecoder span.cm-keyword {color: #f8f8f8; font-weight:bold}
|
||||
.cm-s-icecoder span.cm-atom {color: #ae81ff}
|
||||
.cm-s-icecoder span.cm-number {color: #0a0}
|
||||
.cm-s-icecoder span.cm-def {color: #fd971f}
|
||||
.cm-s-icecoder span.cm-keyword {color: #eee; font-weight:bold}
|
||||
.cm-s-icecoder span.cm-atom {color: #8b67cc}
|
||||
.cm-s-icecoder span.cm-number {color: #080}
|
||||
.cm-s-icecoder span.cm-def {color: #ca7919}
|
||||
|
||||
.cm-s-icecoder span.cm-variable {color: #a6e22e}
|
||||
.cm-s-icecoder span.cm-variable-2 {color: #f92672}
|
||||
.cm-s-icecoder span.cm-variable-3 {color: #0a0}
|
||||
.cm-s-icecoder span.cm-variable {color: #85b525}
|
||||
.cm-s-icecoder span.cm-variable-2 {color: #c71e5b}
|
||||
.cm-s-icecoder span.cm-variable-3 {color: #080}
|
||||
|
||||
.cm-s-icecoder span.cm-property {color: #a6e22e}
|
||||
.cm-s-icecoder span.cm-operator {color: #0a0}
|
||||
.cm-s-icecoder span.cm-property {color: #85b525}
|
||||
.cm-s-icecoder span.cm-operator {color: #080}
|
||||
.cm-s-icecoder span.cm-comment {color: #444}
|
||||
|
||||
.cm-s-icecoder span.cm-string {color: #fd0}
|
||||
.cm-s-icecoder span.cm-string-2 {color: #f80}
|
||||
.cm-s-icecoder span.cm-string {color: #ccb100}
|
||||
.cm-s-icecoder span.cm-string-2 {color: #cc6d00}
|
||||
|
||||
.cm-s-icecoder span.cm-meta {color: #555}
|
||||
.cm-s-icecoder span.cm-error {color: #f00}
|
||||
.cm-s-icecoder span.cm-error {color: #d00}
|
||||
|
||||
.cm-s-icecoder span.cm-qualifier {color: #555}
|
||||
.cm-s-icecoder span.cm-builtin {color: #06c}
|
||||
.cm-s-icecoder span.cm-builtin {color: #0052a3}
|
||||
.cm-s-icecoder span.cm-bracket {color: #cc7}
|
||||
|
||||
.cm-s-icecoder span.cm-tag {color: #e8e8e8}
|
||||
.cm-s-icecoder span.cm-attribute {color: #00b8bb}
|
||||
.cm-s-icecoder span.cm-attribute {color: #099}
|
||||
|
||||
.cm-s-icecoder span.cm-header {color: #a0a}
|
||||
.cm-s-icecoder span.cm-quote {color: #090}
|
||||
.cm-s-icecoder span.cm-hr {color: #999}
|
||||
.cm-s-icecoder span.cm-link {color: #ff0}
|
||||
.cm-s-icecoder span.cm-header {color: #808}
|
||||
.cm-s-icecoder span.cm-quote {color: #070}
|
||||
.cm-s-icecoder span.cm-hr {color: #888}
|
||||
.cm-s-icecoder span.cm-link {color: #cc0}
|
||||
|
||||
.cm-s-icecoder .CodeMirror-cursor {border-left: 1px solid white !important}
|
||||
.cm-s-icecoder .CodeMirror-selected {background: #037 !important}
|
||||
.cm-s-icecoder .CodeMirror-gutters {background: #333; width: 41px; text-align: right; border-right: 1px solid #ccc}
|
||||
.cm-s-icecoder .CodeMirror-linenumber {color: #999; cursor: default}
|
||||
.cm-s-icecoder .CodeMirror-selected {color: #fff !important; background: #037 !important}
|
||||
.cm-s-icecoder .CodeMirror-gutters {background: #161612; min-width: 41px; border-right: 0}
|
||||
.cm-s-icecoder .CodeMirror-linenumber {color: #555; cursor: default}
|
||||
.cm-s-icecoder .CodeMirror-matchingbracket {border: 1px solid grey; color: black !important}
|
||||
@@ -1,8 +1,11 @@
|
||||
<?php include("settings.php");?>
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
?>
|
||||
<script>
|
||||
<?php
|
||||
// Get the save type if any
|
||||
$saveType = "";
|
||||
if (isset($_GET['saveType'])) {$saveType = strClean($_GET['saveType']);};
|
||||
$saveType = isset($_GET['saveType']) ? strClean($_GET['saveType']) : "";
|
||||
|
||||
// Establish the filename/new filename
|
||||
$file = str_replace("|","/",strClean(
|
||||
@@ -11,55 +14,92 @@ $file = str_replace("|","/",strClean(
|
||||
: $_GET['file']
|
||||
));
|
||||
|
||||
// Trim any +'s or spaces from the end of file and clear any ../'s
|
||||
$file = str_replace("../","",rtrim(rtrim($file,'+'),' '));
|
||||
|
||||
// Make $file a full path and establish the $fileLoc and $fileName
|
||||
if (strpos($file,$docRoot)===false) {$file=str_replace("|","/",$docRoot.$iceRoot.$file);};
|
||||
if (strpos($file,$docRoot)===false && $_GET['action']!="getRemoteFile") {$file=str_replace("|","/",$docRoot.$iceRoot.$file);};
|
||||
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));
|
||||
$fileName = basename($file);
|
||||
|
||||
// If we're due to open a file...
|
||||
if ($_GET['action']=="load") {
|
||||
echo '<script>action="load";</script>';
|
||||
echo 'action="load";';
|
||||
|
||||
if (file_exists($file)) {
|
||||
$finfo = "text";
|
||||
// Determine what to do based on mime type
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
if (strpos(finfo_file($finfo, $file),"text")===0) {
|
||||
echo '<script>fileType="text";';
|
||||
echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
|
||||
echo '</script>';
|
||||
$loadedFile = file_get_contents($file);
|
||||
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
|
||||
} else if (strpos(finfo_file($finfo, $file),"image")===0) {
|
||||
echo '<script>fileType="image";fileName=\''.$fileLoc."/".$fileName.'\'</script>';
|
||||
if (function_exists('finfo_open')) {
|
||||
$finfoMIME = finfo_open(FILEINFO_MIME);
|
||||
$finfo = finfo_file($finfoMIME, $file);
|
||||
finfo_close($finfoMIME);
|
||||
} else {
|
||||
echo '<script>fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');</script>';
|
||||
$fileExt = explode(" ",pathinfo($file, PATHINFO_EXTENSION));
|
||||
$fileExt = $fileExt[0];
|
||||
if (array_search($fileExt,array("gif","jpg","jpeg","png"))!==false) {$finfo = "image";};
|
||||
if (array_search($fileExt,array("doc","docx","ppt","rtf","pdf","zip","tar","gz","swf","asx","asf","midi","mp3","wav","aiff","mov","qt","wmv","mp4","odt","odg","odp"))!==false) {$finfo = "other";};
|
||||
}
|
||||
if (strpos($finfo,"text")===0 || strpos($finfo,"empty")!==false) {
|
||||
echo 'fileType="text";';
|
||||
echo 'top.ICEcoder.shortURL = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
echo '</script><textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&",$loadedFile)).'</textarea><script>';
|
||||
} else if (strpos($finfo,"image")===0) {
|
||||
echo 'fileType="image";fileName=\''.$fileLoc."/".$fileName.'\';';
|
||||
} else {
|
||||
echo 'fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');';
|
||||
};
|
||||
} else {
|
||||
echo '<script>fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');</script>';
|
||||
echo 'fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');';
|
||||
}
|
||||
finfo_close($finfo);
|
||||
|
||||
};
|
||||
|
||||
// Get the contents of a remote URL
|
||||
if ($_GET['action']=="getRemoteFile") {
|
||||
if ($remoteFile = toUTF8noBOM(file_get_contents($file,false,$context),true)) {
|
||||
// replace \r\n (Windows), \r (old Mac) and \n (Linux) line endings with whatever we chose to be lineEnding
|
||||
$remoteFile = str_replace("\r\n", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$remoteFile = str_replace("\r", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$remoteFile = str_replace("\n", $ICEcoder["lineEnding"], $remoteFile);
|
||||
echo 'top.ICEcoder.newTab();';
|
||||
echo '</script><textarea name="remoteFile" id="remoteFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&",$remoteFile)).'</textarea><script>';
|
||||
echo 'top.ICEcoder.getcMInstance().setValue(document.getElementById("remoteFile").value);action="getRemoteFile";';
|
||||
} else {
|
||||
echo 'action="nothing"; top.ICEcoder.message(\'Sorry, could\\\'t get contents of '.$file.'\');';
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to add a new folder...
|
||||
if ($_GET['action']=="newFolder") {
|
||||
if (!$demoMode && is_writable($docRoot.$fileLoc)) {
|
||||
mkdir($file, 0705);
|
||||
// Reload file manager
|
||||
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');action="newFolder";</script>';
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'folder\');action="newFolder";';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot create folder at\\n".$fileLoc."')</script>";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot create folder at\\n".$fileLoc."');";
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to paste a new file...
|
||||
if ($_GET['action']=="paste") {
|
||||
$source = $file;
|
||||
$dest = str_replace("//","/",$docRoot.strClean(str_replace("|","/",$_GET['location']))."/".basename($source));
|
||||
$dest = str_replace("//","/",$docRoot.$iceRoot.strClean(str_replace("|","/",$_GET['location']))."/".basename($source));
|
||||
if (!$demoMode && is_writable(dirname($dest))) {
|
||||
if (is_dir($source)) {
|
||||
$fileOrFolder = "folder";
|
||||
if (!is_dir($dest)) {
|
||||
mkdir($dest, 0705);
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!is_dir($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
mkdir($dest, 0705);
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
@@ -72,6 +112,7 @@ if ($_GET['action']=="paste") {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$fileOrFolder = "file";
|
||||
if (!file_exists($dest)) {
|
||||
copy($source, $dest);
|
||||
} else {
|
||||
@@ -85,33 +126,33 @@ if ($_GET['action']=="paste") {
|
||||
}
|
||||
}
|
||||
// Reload file manager
|
||||
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\');action="pasteFile";</script>';
|
||||
echo 'top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\',false,false,false,\''.$fileOrFolder.'\');action="pasteFile";';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot copy \\n".str_replace($docRoot,"",$source)."\\n into \\n".str_replace($docRoot,"",$dest)."')</script>";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot copy \\n".str_replace($docRoot,"",$source)."\\n into \\n".str_replace($docRoot,"",$dest)."');";
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to upload files...
|
||||
if ($_GET['action']=="upload") {
|
||||
if (!$demoMode) {
|
||||
class fileUploader {
|
||||
public function __construct($uploads) {
|
||||
global $docRoot;
|
||||
public function __construct($uploads) {
|
||||
global $docRoot,$iceRoot;
|
||||
$uploadDir=$docRoot.$iceRoot.str_replace("..","",str_replace("|","/",strClean($_POST['folder'])."/"));
|
||||
foreach($uploads as $current) {
|
||||
$this->uploadFile=$uploadDir.$current->name;
|
||||
$fileName = $current->name;
|
||||
if ($this->upload($current,$this->uploadFile)) {
|
||||
echo '<script>action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.rightClickedFile.replace(/\|/g,\'/\'),\''.$fileName.'\');</script>';
|
||||
echo 'action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,\'/\'),\''.str_replace("'","\'",$fileName).'\',false,false,true,\'file\'); top.ICEcoder.serverMessage("Uploaded file(s) OK");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.rightClickedFile.replace(/\|/g,'/'))</script>";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'));";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function upload($current,$uploadFile){
|
||||
if(move_uploaded_file($current->tmp_name,$uploadFile)){
|
||||
if(move_uploaded_file($current->tmp_name,$uploadFile)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -132,39 +173,67 @@ if ($_GET['action']=="upload") {
|
||||
$fileUploader=new fileUploader($uploads);
|
||||
}
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot upload whilst in demo mode');</script>";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot upload whilst in demo mode');";
|
||||
}
|
||||
|
||||
echo "<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.hideFileMenu();top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));</script>";
|
||||
echo "top.ICEcoder.hideFileMenu();top.document.getElementById('fileInput').value='';top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));";
|
||||
}
|
||||
|
||||
// If we're due to rename a file/folder...
|
||||
if ($_GET['action']=="rename") {
|
||||
$renamed=false;
|
||||
if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
|
||||
rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName);
|
||||
// Reload file manager
|
||||
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');';
|
||||
echo 'action="rename";</script>';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot rename\\n".strClean($_GET['oldFileName'])."');</script>";
|
||||
if(rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName)) {
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');';
|
||||
echo 'action="rename";';
|
||||
$renamed=true;
|
||||
}
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
if (!$renamed) {
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot rename\\n".strClean($_GET['oldFileName'])."\\n\\nMaybe public write permissions needed on this or parent folder?');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to move a file/folder...
|
||||
if ($_GET['action']=="move") {
|
||||
$moved=false;
|
||||
$srcDir = $docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName']));
|
||||
$tgtDir = $docRoot.$fileLoc."/".$fileName;
|
||||
if ($srcDir != $tgtDir && $fileLoc != "") {
|
||||
if (!$demoMode && is_writable($srcDir)) {
|
||||
if(rename($srcDir,$tgtDir)) {
|
||||
// Reload file manager
|
||||
$fileOrFolder = is_dir($docRoot.$fileLoc."/".$fileName) ? "folder" : "file";
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'move\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\',false,\''.$fileOrFolder.'\');';
|
||||
echo 'action="move";';
|
||||
$moved=true;
|
||||
}
|
||||
}
|
||||
if (!$moved) {
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot move\\n".strClean($_GET['oldFileName'])."\\n\\nMaybe public write permissions needed on this or parent folder?');";
|
||||
}
|
||||
} else {
|
||||
echo "action='nothing';";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to replace text in a file...
|
||||
if ($_GET['action']=="replaceText") {
|
||||
if (!$demoMode && is_writable(str_replace("|","/",strClean($_GET['fileRef'])))) {
|
||||
$file = str_replace("|","/",strClean($_GET['fileRef']));
|
||||
$loadedFile = file_get_contents($file);
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
$newContent = str_replace(strClean($_GET['find']),strClean($_GET['replace']),$loadedFile);
|
||||
$fh = fopen($file, 'w') or die("Sorry, cannot save");
|
||||
fwrite($fh, $newContent);
|
||||
fclose($fh);
|
||||
echo '<script>action="replaceText";</script>';
|
||||
echo 'action="replaceText";';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot replace text in\\n".strClean($_GET['fileRef'])."');</script>";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot replace text in\\n".strClean($_GET['fileRef'])."');";
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to change permissions on a file/folder...
|
||||
@@ -172,36 +241,40 @@ if ($_GET['action']=="perms") {
|
||||
if (!$demoMode && is_writable($file)) {
|
||||
chmod($file,octdec(numClean($_GET['perms'])));
|
||||
// Reload file manager
|
||||
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
|
||||
echo 'action="perms";</script>';
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
|
||||
echo 'action="perms";';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot change permissions on \\n".strClean($file)."');</script>";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot change permissions on \\n".strClean($file)."');";
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to delete a file...
|
||||
if ($_GET['action']=="delete") {
|
||||
$filesArray = explode(";",$file); // May contain more than one file here
|
||||
for ($i=0;$i<=count($filesArray)-1;$i++) {
|
||||
for ($i=0;$i<count($filesArray);$i++) {
|
||||
$fullPath = str_replace($docRoot,"",$filesArray[$i]);
|
||||
$fullPath = str_replace($iceRoot,"",$fullPath);
|
||||
$fullPath = $docRoot.$iceRoot.$fullPath;
|
||||
if (!$demoMode && is_writable($fullPath)) {
|
||||
|
||||
if (rtrim($fullPath,"/") == rtrim($docRoot,"/")) {
|
||||
echo "top.ICEcoder.message('Sorry can\\'t delete the root level');";
|
||||
} else if (!$demoMode && is_writable($fullPath)) {
|
||||
is_dir($fullPath)
|
||||
? rrmdir($fullPath)
|
||||
: unlink($fullPath);
|
||||
$fileName = basename($fullPath);
|
||||
$fileLoc = dirname(str_replace($docRoot,"",$fullPath));
|
||||
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";};
|
||||
// Reload file manager
|
||||
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
echo 'action="delete";</script>';
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
echo 'action="delete";';
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Sorry can\\'t delete\\n".str_replace($docRoot,"",$fullPath)."');</script>";
|
||||
echo "top.ICEcoder.message('Sorry can\\'t delete\\n".str_replace($docRoot,"",$fullPath)."');";
|
||||
}
|
||||
echo '<script>action="nothing";</script>';
|
||||
echo 'action="nothing";';
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// The function to recursively remove folders & files
|
||||
@@ -221,29 +294,48 @@ function rrmdir($dir) {
|
||||
}
|
||||
|
||||
if ($_GET['action']=="save") {
|
||||
echo '<script>action="save";</script>';
|
||||
echo 'action="save";';
|
||||
// on the form posting via a reload, save the file
|
||||
if (isset($_POST['contents'])) {
|
||||
if (!$demoMode && ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="")) {
|
||||
if (filemtime($file)==$_GET['fileMDT']||!(isset($_GET['fileMDT']))) {
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
if (!(isset($_GET['fileMDT']))||$filemtime==$_GET['fileMDT']) {
|
||||
$fh = fopen($file, 'w') or die("Sorry, cannot save");
|
||||
fwrite($fh, $_POST['contents']);
|
||||
// replace \r\n (Windows), \r (old Mac) and \n (Linux) line endings with whatever we chose to be lineEnding
|
||||
$contents = $_POST['contents'];
|
||||
$contents = str_replace("\r\n", $ICEcoder["lineEnding"], $contents);
|
||||
$contents = str_replace("\r", $ICEcoder["lineEnding"], $contents);
|
||||
$contents = str_replace("\n", $ICEcoder["lineEnding"], $contents);
|
||||
// Now write that content, close the file and clear the statcache
|
||||
fwrite($fh, $contents);
|
||||
fclose($fh);
|
||||
clearstatcache();
|
||||
echo '<script>top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.filemtime($file).'";</script>';
|
||||
// Reload file manager & rename tab if it was a new file
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
echo 'top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.$filemtime.'";';
|
||||
// Reload file manager, rename tab & remove old file highlighting if it was a new file
|
||||
if (isset($_POST['newFileName']) && $_POST['newFileName']!="") {
|
||||
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
echo 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');</script>';
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'file\');';
|
||||
echo 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');';
|
||||
if (!strpos($_GET['file'],"[NEW]")) {
|
||||
// We're saving as a new file, so unhighlight the old name in the file manager if visible
|
||||
echo "fileLink = top.ICEcoder.filesFrame.contentWindow.document.getElementById('".str_replace("/","|",$fileLoc)."|".basename($_GET['file'])."');";
|
||||
echo "if (fileLink) {fileLink.style.backgroundColor = top.ICEcoder.tabBGnormal; fileLink.style.color = top.ICEcoder.tabFGnormalFile};";
|
||||
}
|
||||
}
|
||||
// Reload stickytab window
|
||||
echo '<script>if (top.ICEcoder.stickyTab.location) {top.ICEcoder.stickyTab.location.reload()};action="doneSave";</script>';
|
||||
// Reload previewWindow window if not a Markdown file
|
||||
echo 'if (top.ICEcoder.previewWindow.location && top.ICEcoder.previewWindow.location.pathname.indexOf(".md")==-1) {
|
||||
top.ICEcoder.previewWindow.location.reload();
|
||||
// Do the pesticide plugin if it exists
|
||||
try {top.ICEcoder.doPesticide();} catch(err) {};
|
||||
};';
|
||||
echo 'top.ICEcoder.setPreviousFiles();action="doneSave";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-save.php");
|
||||
} else {
|
||||
$loadedFile = file_get_contents($file);
|
||||
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
|
||||
echo '<textarea name="userVersionFile" id="userVersionFile"></textarea>';
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
echo '</script><textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
|
||||
echo '<textarea name="userVersionFile" id="userVersionFile"></textarea><script>';
|
||||
?>
|
||||
<script>
|
||||
var refreshFile = top.ICEcoder.ask('Sorry, this file has changed, cannot save\n<?php echo $file;?>\n\nReload this file and copy your version to a new document?');
|
||||
if (refreshFile) {
|
||||
var cM = top.ICEcoder.getcMInstance();
|
||||
@@ -251,8 +343,8 @@ if ($_GET['action']=="save") {
|
||||
document.getElementById('userVersionFile').value = cM.getValue();
|
||||
// Revert back to original
|
||||
cM.setValue(document.getElementById('loadedFile').value);
|
||||
top.ICEcoder.changedContent[thisTab-1] = 0;
|
||||
top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "<?php echo filemtime($file); ?>";
|
||||
top.ICEcoder.savedPoints[thisTab-1] = cM.changeGeneration();
|
||||
top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "<?php echo $filemtime; ?>";
|
||||
cM.clearHistory();
|
||||
// Now for the new file
|
||||
top.ICEcoder.newTab();
|
||||
@@ -263,17 +355,15 @@ if ($_GET['action']=="save") {
|
||||
top.ICEcoder.switchTab(thisTab);
|
||||
}
|
||||
action='nothing';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "<script>action='nothing';top.ICEcoder.message('Sorry, cannot write\\n".$file."')</script>";
|
||||
echo "action='nothing';top.ICEcoder.message('Sorry, cannot write\\n".$file."');";
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
};
|
||||
?>
|
||||
<script>
|
||||
if (action=="load") {
|
||||
if (fileType=="text") {
|
||||
setTimeout(function() {
|
||||
@@ -294,20 +384,24 @@ if (action=="load") {
|
||||
top.ICEcoder.setLayout();
|
||||
top.ICEcoder.content.contentWindow.createNewCMInstance(top.ICEcoder.nextcMInstance);
|
||||
|
||||
// Set the value & innerHTML of the code textarea to that of our loaded file plus make it visible (it's hidden on _coder's load)
|
||||
// Set the value & innerHTML of the code textarea to that of our loaded file plus make it visible (it's hidden on ICEcoder's load)
|
||||
top.ICEcoder.switchMode();
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
cM.setValue(document.getElementById('loadedFile').value);
|
||||
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
|
||||
top.document.getElementById('content').style.visibility='visible';
|
||||
top.ICEcoder.switchTab(top.ICEcoder.selectedTab);
|
||||
cM.focus();
|
||||
top.ICEcoder.focus();
|
||||
|
||||
// Then clean it up, set the text cursor, update the display and get the character data
|
||||
top.ICEcoder.contentCleanUp();
|
||||
top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], "background");
|
||||
top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]], "background");
|
||||
top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].addLineClass(0, "background", "cm-s-activeLine");
|
||||
top.ICEcoder.nextcMInstance++;
|
||||
top.ICEcoder.openFileMDTs.push('<?php echo filemtime($file); ?>');
|
||||
top.ICEcoder.openFileMDTs.push('<?php echo $serverType=="Linux" ? filemtime($file) : "1000000"; ?>');
|
||||
for (var i=0; i<cM.lineCount(); i++) {
|
||||
top.ICEcoder.content.contentWindow.CodeMirror.doFold(cM.getLine(i).indexOf("{")>-1?"brace":"xml",null,"+","-",true)(cM, i);
|
||||
}
|
||||
top.ICEcoder.loadingFile = false;
|
||||
<?php
|
||||
;};
|
||||
@@ -318,7 +412,16 @@ if (action=="load") {
|
||||
|
||||
if (fileType=="image") {
|
||||
top.document.getElementById('blackMask').style.visibility = "visible";
|
||||
top.document.getElementById('mediaContainer').innerHTML = "<img src=\"<?php echo $fileLoc."/".$fileName;?>\" class=\"whiteGlow\" style=\"border: solid 10px #fff; max-width: 700px; max-height: 500px; background-color: #000; background-image: url('images/checkerboard.png')\" onClick=\"return false\"><br><span class=\"whiteGlow\" style=\"border: solid 10px #fff; color: #000; background-color: #fff\" onClick=\"return false\"><?php echo $fileLoc."/".$fileName;?></span>";
|
||||
top.document.getElementById('mediaContainer').innerHTML =
|
||||
"<canvas id=\"canvasPicker\" width=\"1\" height=\"1\" style=\"position: absolute; margin: 10px 0 0 10px; cursor: crosshair\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\"></canvas>" +
|
||||
"<img src=\"<?php echo $fileLoc."/".$fileName;?>\" class=\"whiteGlow\" style=\"border: solid 10px #fff; max-width: 700px; max-height: 500px; background-color: #000; background-image: url('images/checkerboard.png')\" onLoad=\"reducedImgMsg = (this.naturalWidth > 700 || this.naturalHeight > 500) ? ', displayed at ' + this.width + ' x ' + this.height : ''; document.getElementById('imgInfo').innerHTML += ' (' + this.naturalWidth + ' x ' + this.naturalHeight + reducedImgMsg + ')'; top.ICEcoder.drawCanvasImage(this)\"><br>" +
|
||||
"<div class=\"whiteGlow\" style=\"display: inline-block; margin-top: -10px; border: solid 10px #fff; color: #000; background-color: #fff\" id=\"imgInfo\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\">" +
|
||||
"<b><?php echo $fileLoc."/".$fileName;?></b>" +
|
||||
"</div><br>" +
|
||||
"<input type=\"text\" id=\"hexMouseXY\" style=\"border: 1px solid #888; border-right: 0; width: 70px\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\"></input>" +
|
||||
"<input type=\"text\" id=\"rgbMouseXY\" style=\"border: 1px solid #888; margin-right: 10px; width: 70px\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\"></input>" +
|
||||
"<input type=\"text\" id=\"hex\" style=\"border: 1px solid #888; border-right: 0; width: 70px\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\"></input>" +
|
||||
"<input type=\"text\" id=\"rgb\" style=\"border: 1px solid #888; width: 70px\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\"></input>";
|
||||
}
|
||||
|
||||
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);
|
||||
@@ -328,24 +431,22 @@ if (action=="load") {
|
||||
<form name="saveFile" action="file-control.php?action=save&file=<?php if (isset($file)) {echo $file;}; if (isset($_GET['fileMDT']) && $_GET['fileMDT']!="undefined") {echo "&fileMDT=".numClean($_GET['fileMDT']);};?>" method="POST">
|
||||
<textarea name="contents"></textarea>
|
||||
<input type="hidden" name="newFileName" value="">
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
if (action=="save") {
|
||||
<?php
|
||||
if (strpos($file,"[NEW]")>0||$saveType=="saveAs") {
|
||||
if (strpos($fileName,"[NEW]")>0) {echo "fileLoc = '".$fileLoc."';";} else {echo "fileLoc = '';";};
|
||||
?>
|
||||
newFileName = top.ICEcoder.getInput(fileLoc != ""
|
||||
? 'Enter filename to save at '+fileLoc
|
||||
: 'Enter filename (including path, prefixed with /)'
|
||||
,'');
|
||||
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName}
|
||||
fileLoc = '<?php echo $fileLoc;?>';
|
||||
newFileName = top.ICEcoder.getInput('Enter filename to save at '+(fileLoc!='' ? fileLoc : '/'),'');
|
||||
if (newFileName) {
|
||||
newFileName = fileLoc == "" ? newFileName : fileLoc + "/" + fileName;
|
||||
}
|
||||
if (newFileName && top.document.getElementById('filesFrame').contentWindow.document.getElementById(newFileName.replace(/\//g,"|"))) {
|
||||
overwriteOK = top.ICEcoder.ask('That file exists already, overwrite?');
|
||||
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName}
|
||||
newFileName = fileLoc + newFileName;
|
||||
if (top.document.getElementById('filesFrame').contentWindow.document.getElementById(newFileName.replace(/\//g,"|"))) {
|
||||
overwriteOK = top.ICEcoder.ask('That file exists already, overwrite?');
|
||||
}
|
||||
}
|
||||
document.saveFile.newFileName.value = '<?php echo $docRoot; ?>' + newFileName;
|
||||
<?php ;};?>
|
||||
@@ -358,11 +459,13 @@ if (action=="save") {
|
||||
action=="nothing";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
if (action=="doneSave") {
|
||||
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 0;
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
|
||||
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);
|
||||
}
|
||||
|
||||
// Finally, switch mode in case we have saved, renamed file etc
|
||||
top.ICEcoder.switchMode();
|
||||
</script>
|
||||
29
lib/file-type-icons.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Additional file types */
|
||||
.fileManager LI.ext-c:before {background-position: -48px 0}
|
||||
.fileManager LI.ext-cpp:before {background-position: -64px 0}
|
||||
.fileManager LI.ext-cs:before {background-position: -80px 0}
|
||||
.fileManager LI.ext-coffee:before {background-position: -96px 0}
|
||||
.fileManager LI.ext-css:before {background-position: -112px 0}
|
||||
.fileManager LI.ext-erl:before {background-position: -128px 0}
|
||||
.fileManager LI.ext-gif:before {background-position: -144px 0}
|
||||
.fileManager LI.ext-go:before {background-position: -160px 0}
|
||||
.fileManager LI.ext-htm:before, .fileManager LI.ext-html:before {background-position: -176px 0}
|
||||
.fileManager LI.ext-jpg:before, .fileManager LI.ext-jpeg:before {background-position: -192px 0}
|
||||
.fileManager LI.ext-java:before {background-position: -208px 0}
|
||||
.fileManager LI.ext-js:before, .fileManager LI.ext-json:before {background-position: -224px 0}
|
||||
.fileManager LI.ext-jl:before {background-position: -240px 0}
|
||||
.fileManager LI.ext-less:before {background-position: -256px 0}
|
||||
.fileManager LI.ext-lua:before {background-position: -272px 0}
|
||||
.fileManager LI.ext-md:before {background-position: -288px 0}
|
||||
.fileManager LI.ext-pl:before {background-position: -304px 0}
|
||||
.fileManager LI.ext-php:before {background-position: -320px 0}
|
||||
.fileManager LI.ext-png:before {background-position: -336px 0}
|
||||
.fileManager LI.ext-py:before {background-position: -352px 0}
|
||||
.fileManager LI.ext-rb:before, .fileManager LI.ext-ruby:before {background-position: -368px 0}
|
||||
.fileManager LI.ext-rs:before {background-position: -384px 0}
|
||||
.fileManager LI.ext-scss:before {background-position: -400px 0}
|
||||
.fileManager LI.ext-sql:before {background-position: -416px 0}
|
||||
.fileManager LI.ext-txt:before {background-position: -432px 0}
|
||||
.fileManager LI.ext-xml:before {background-position: -448px 0}
|
||||
.fileManager LI.ext-yaml:before {background-position: -464px 0}
|
||||
.fileManager LI.ext-zip:before {background-position: -480px 0}
|
||||
25
lib/file-types.css
Normal file
@@ -0,0 +1,25 @@
|
||||
.fileManager {
|
||||
margin: 0 0 15px 20px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.fileManager span {font-family: helvetica, arial, swiss, verdana; padding: 1px 3px; border-radius: 3px}
|
||||
.fileManager a {color: #eee; text-decoration: none; cursor: pointer}
|
||||
.fileManager .pft-directory, .fileManager .pft-file {list-style-image: url(../images/blank.gif)}
|
||||
.fileManager ul, .fileManager li {margin-left: 15px}
|
||||
|
||||
/* Default file */
|
||||
.fileManager LI.pft-directory:before, .fileManager LI.pft-file:before {
|
||||
position: absolute; display: block; width: 16px; height: 16px; content: ""; margin-top: -2px; margin-left: -20px; background:url(../images/file-folder-icons.png) no-repeat 0 0;
|
||||
}
|
||||
.fileManager LI.dirOpen:before {background-position: -16px 0}
|
||||
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) { /* hacked for chrome and safari */
|
||||
.fileManager LI.pft-directory:before, .fileManager LI.pft-file:before {
|
||||
margin-top: -19px;
|
||||
}
|
||||
}
|
||||
.fileManager LI.pft-file:before {background-position: -32px 0}
|
||||
@@ -19,44 +19,7 @@ table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
|
||||
body {margin: 0; overflow: auto}
|
||||
|
||||
.refresh {position: fixed; display: inline-block; width: 14px; height: 14px; background: url('../images/file-manager-icons.png') -100px -16px no-repeat; right: 0; margin-right: 15px; cursor: pointer}
|
||||
|
||||
.fileManager {
|
||||
margin: 15px 0 15px 22px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.fileManager span {font-family: helvetica, arial, swiss, verdana}
|
||||
.fileManager a {color: #eee; text-decoration: none; cursor: pointer}
|
||||
.fileManager .pft-directory, .fileManager .pft-file {list-style-image: url(../images/blank.gif)}
|
||||
.fileManager ul, .fileManager li {margin-left: 15px}
|
||||
|
||||
/* Default file */
|
||||
.fileManager LI.pft-directory:before, .fileManager LI.pft-file:before {
|
||||
position: absolute; display: block; width: 16px; height: 16px; content: ""; margin-top: -2px; margin-left: -23px; background:url(../images/file-folder-icons.png) no-repeat 0 0;
|
||||
}
|
||||
.fileManager LI.dirOpen:before {background-position: -16px 0}
|
||||
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) { /* hacked for chrome and safari */
|
||||
.fileManager LI.pft-directory:before, .fileManager LI.pft-file:before {
|
||||
margin-top: -19px;
|
||||
}
|
||||
}
|
||||
.fileManager LI.pft-file:before {background-position: -32px 0}
|
||||
|
||||
/* Additional file types */
|
||||
.fileManager LI.ext-coffee:before {background-position: -48px 0}
|
||||
.fileManager LI.ext-css:before {background-position: -64px 0}
|
||||
.fileManager LI.ext-gif:before {background-position: -80px 0}
|
||||
.fileManager LI.ext-htm:before, .fileManager LI.ext-html:before {background-position: -96px 0}
|
||||
.fileManager LI.ext-jpg:before, .fileManager LI.ext-jpeg:before {background-position: -112px 0}
|
||||
.fileManager LI.ext-js:before {background-position: -128px 0}
|
||||
.fileManager LI.ext-less:before {background-position: -144px 0}
|
||||
.fileManager LI.ext-php:before {background-position: -160px 0}
|
||||
.fileManager LI.ext-png:before {background-position: -176px 0}
|
||||
.fileManager LI.ext-rb:before, .fileManager LI.ext-ruby:before {background-position: -192px 0}
|
||||
.fileManager LI.ext-txt:before {background-position: -208px 0}
|
||||
.fileManager LI.ext-zip:before {background-position: -224px 0}
|
||||
.lock {position: fixed; display: inline-block; width: 12px; height: 16px; background: url('../images/file-manager-icons.png') 0 0 no-repeat; right: 0; margin-right: 16px; top: 0; cursor: pointer}
|
||||
.refresh {position: fixed; display: inline-block; width: 14px; height: 14px; background: url('../images/file-manager-icons.png') -32px 0 no-repeat; right: 0; margin-right: 15px; top: 25px; cursor: pointer}
|
||||
.githubOn {position: fixed; display: inline-block; width: 14px; height: 14px; background: url('../images/file-manager-icons.png') -64px 0 no-repeat; right: 0; margin-right: 15px; top: 48px; cursor: pointer}
|
||||
.githubOff {position: fixed; display: inline-block; width: 14px; height: 14px; background: url('../images/file-manager-icons.png') -80px 0 no-repeat; right: 0; margin-right: 15px; top: 48px; cursor: pointer}
|
||||
55
lib/foldcode.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// Modified version of CodeMirror's codefold.js to show guttermarkers
|
||||
|
||||
CodeMirror.doFold = function(foldType, widget, markOn, markOff, dontCollapse) {
|
||||
|
||||
if (widget == null) widget = "\u2194";
|
||||
if (typeof widget == "string") {
|
||||
var text = document.createTextNode(widget);
|
||||
widget = document.createElement("span");
|
||||
widget.appendChild(text);
|
||||
widget.className = "CodeMirror-foldmarker";
|
||||
}
|
||||
if (markOn == null) markOn = "+";
|
||||
if (typeof markOn == "string") {
|
||||
var text = document.createTextNode(markOn);
|
||||
markOn = document.createElement("span");
|
||||
markOn.appendChild(text);
|
||||
markOn.className = "fold foldOn";
|
||||
}
|
||||
if (markOff == null) markOff = "-";
|
||||
if (typeof markOff == "string") {
|
||||
var text = document.createTextNode(markOff);
|
||||
markOff = document.createElement("span");
|
||||
markOff.appendChild(text);
|
||||
markOff.className = "fold foldOff";
|
||||
}
|
||||
|
||||
return function(cm, pos) {
|
||||
if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);
|
||||
var range = CodeMirror.fold[foldType](cm, pos);
|
||||
foldable = range && (range.from.line != range.to.line || range.from.ch != range.to.ch) ? true : false;
|
||||
if (!foldable) cm.setGutterMarker(pos.line, "folds", null);
|
||||
if (!range) return;
|
||||
|
||||
var present = cm.findMarksAt(range.from), cleared = 0;
|
||||
for (var i = 0; i < present.length; ++i) {
|
||||
if (present[i].__isFold) {
|
||||
++cleared;
|
||||
present[i].clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (foldable) {
|
||||
cm.setGutterMarker(pos.line, "folds", cleared || dontCollapse ? markOff.cloneNode(true) : markOn.cloneNode(true));
|
||||
}
|
||||
|
||||
if (cleared || dontCollapse) return;
|
||||
var myWidget = widget.cloneNode(true);
|
||||
CodeMirror.on(myWidget, "mousedown", function() {myRange.clear();cm.setGutterMarker(pos.line, "folds", markOff.cloneNode(true));});
|
||||
var myRange = cm.markText(range.from, range.to, {
|
||||
replacedWith: myWidget,
|
||||
clearOnEnter: true,
|
||||
__isFold: true
|
||||
});
|
||||
};
|
||||
};
|
||||
111
lib/get-branch.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if (!isset($ICEcoder['root'])) {
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
}
|
||||
|
||||
if (!$_SESSION['loggedIn']) {
|
||||
header("Location: ../");
|
||||
}
|
||||
|
||||
// If we're just getting a branch, get that and set as the finalArray
|
||||
$scanDir = $docRoot.$iceRoot;
|
||||
$location = "";
|
||||
if (isset($_GET['location'])) {
|
||||
echo '<div id="branch" style="display: none">';
|
||||
$location = str_replace("|","/",$_GET['location']);
|
||||
}
|
||||
if ($location=="/") {$location = "";};
|
||||
|
||||
$dirArray = $filesArray = $finalArray = array();
|
||||
$finalArray = scanDir($scanDir.$location);
|
||||
foreach($finalArray as $entry) {
|
||||
$canAdd = true;
|
||||
for ($i=0;$i<count($_SESSION['bannedFiles']);$i++) {
|
||||
if($_SESSION['bannedFiles'][$i] != "" && strpos($entry,$_SESSION['bannedFiles'][$i])!==false) {$canAdd = false;}
|
||||
}
|
||||
if ("/".$entry == $ICEcoderDir) {
|
||||
$canAdd = false;
|
||||
}
|
||||
if ($entry != "." && $entry != ".." && $canAdd) {
|
||||
is_dir($docRoot.$iceRoot.$location."/".$entry)
|
||||
? array_push($dirArray,$location."/".$entry)
|
||||
: array_push($filesArray,$location."/".$entry);
|
||||
}
|
||||
}
|
||||
natcasesort($dirArray);
|
||||
natcasesort($filesArray);
|
||||
|
||||
$finalArray = array_merge($dirArray,$filesArray);
|
||||
for ($i=0;$i<count($finalArray);$i++) {
|
||||
$fileFolderName = str_replace("\\","/",$finalArray[$i]);
|
||||
$type = is_dir($docRoot.$iceRoot.$fileFolderName) ? "folder" : "file";
|
||||
if ($type=="file") {
|
||||
// Get extension (prefix 'ext-' to prevent invalid classes from extensions that begin with numbers)
|
||||
$ext = "ext-".pathinfo($docRoot.$iceRoot.$fileFolderName, PATHINFO_EXTENSION);
|
||||
}
|
||||
if ($i==0) {echo "<ul style=\"display: block\">\n";}
|
||||
if ($i==count($finalArray)-1 && isset($_GET['location'])) {
|
||||
echo "</ul>\n";
|
||||
}
|
||||
$type == "folder" ? $class = 'pft-directory' : $class = 'pft-file '.strtolower($ext);
|
||||
$loadParam = $type == "folder" ? "true" : "false";
|
||||
echo "<li class=\"".$class."\" draggable=\"true\" ondrag=\"top.ICEcoder.draggingWithKeyTest(event);if(top.ICEcoder.getcMInstance()){top.ICEcoder.getcMInstance().focus()}\" ondragend=\"top.ICEcoder.dropFile(this)\"><a nohref title=\"$fileFolderName\" onMouseOver=\"top.ICEcoder.overFileFolder('$type',this.childNodes[1].id)\" onMouseOut=\"top.ICEcoder.overFileFolder('$type','')\" onClick=\"if(!event.ctrlKey && !top.ICEcoder.cmdKey) {top.ICEcoder.openCloseDir(this,$loadParam); if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}\" style=\"position: relative; left:-22px\"> <span id=\"".str_replace($docRoot,"",str_replace("/","|",$fileFolderName))."\">".xssClean(basename($fileFolderName),"html")."</span> ";
|
||||
echo '<span style="color: #888; font-size: 8px" id="'.str_replace($docRoot,"",str_replace("/","|",$fileFolderName)).'_perms">';
|
||||
echo $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot.$fileFolderName)), -3) : '';
|
||||
echo "</span></a></li>\n";
|
||||
}
|
||||
|
||||
if (isset($_GET['location'])) {
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
targetElem = top.ICEcoder.filesFrame.contentWindow.document.getElementById('<?php echo $_GET['location'];?>');
|
||||
newUL = document.createElement("ul");
|
||||
newUL.style = "display: block";
|
||||
locNest = targetElem.parentNode.parentNode;
|
||||
if(locNest.nextSibling && locNest.nextSibling.tagName=="UL") {
|
||||
x = locNest.nextSibling;
|
||||
x.parentNode.removeChild(x);
|
||||
}
|
||||
folderContent = document.getElementById('branch').innerHTML;
|
||||
if (folderContent.indexOf('<ul')>-1 || folderContent.indexOf('<li')>-1) {
|
||||
// Now animate folders & files into view
|
||||
i=0;
|
||||
animFolders = setInterval(function() {
|
||||
i++;
|
||||
showContent = "";
|
||||
folderItems = folderContent.split("\n");
|
||||
for (j=0; j<=i; j++) {
|
||||
showContent += folderItems[j];
|
||||
if (j<i) {showContent += "\n";};
|
||||
}
|
||||
showContent = showContent.slice(28);
|
||||
if (j==folderItems.length) {
|
||||
clearInterval(animFolders);
|
||||
showContent = showContent.slice(0,-2);
|
||||
setTimeout(function(){top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);},4);
|
||||
if (!top.ICEcoder.fmReady) {top.ICEcoder.fmReady=true;};
|
||||
}
|
||||
newUL.innerHTML = showContent;
|
||||
locNest.parentNode.insertBefore(newUL,locNest.nextSibling);
|
||||
},4);
|
||||
} else {
|
||||
<?php
|
||||
$iceGithubLocalPaths = $ICEcoder["githubLocalPaths"];
|
||||
$iceGithubRemotePaths = $ICEcoder["githubRemotePaths"];
|
||||
$pathPos = array_search($iceRoot,$iceGithubLocalPaths);
|
||||
if ($pathPos !== false) {
|
||||
?>
|
||||
if (top.ICEcoder.ask("Your local folder is empty, would you like to clone <?php echo $iceGithubRemotePaths[$pathPos];?>?")) {
|
||||
setTimeout(function() {
|
||||
top.ICEcoder.showHide('show',top.get('loadingMask'));
|
||||
top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "lib/github.php?action=clone&csrf="+top.ICEcoder.csrf;
|
||||
},4);
|
||||
}
|
||||
<?php ;}; ?>
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
;};
|
||||
?>
|
||||
36
lib/github-manager.css
Normal file
@@ -0,0 +1,36 @@
|
||||
/* First, reset everything to a standard */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
a {color: #fff; text-decoration: none}
|
||||
input {padding: 4px; border: 1px solid #555; background-color: #444; color: #fff}
|
||||
input:focus {
|
||||
outline: none;
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
}
|
||||
|
||||
.githubManager {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
245
lib/github-manager.php
Normal file
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
|
||||
// If we have an action to perform
|
||||
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action'])) {
|
||||
|
||||
// Get our old paths & user settings
|
||||
$oldLocal = $ICEcoder["githubLocalPaths"];
|
||||
$oldRemote = $ICEcoder["githubRemotePaths"];
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
|
||||
// ========
|
||||
// CHOOSING
|
||||
// ========
|
||||
if ($_GET['action']=="choose") {
|
||||
|
||||
$pathPair = numClean($_GET['pathPair']);
|
||||
|
||||
$chosenLocal = $oldLocal[$pathPair];
|
||||
$chosenRemote = $oldRemote[$pathPair];
|
||||
|
||||
$pathValid = false;
|
||||
|
||||
if (!is_dir($docRoot.$chosenLocal)) {
|
||||
if (is_writable($docRoot)) {
|
||||
mkdir($docRoot.$chosenLocal, 0705);
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Sorry, cannot create folder at\\n".$chosenLocal."');</script>";
|
||||
}
|
||||
}
|
||||
|
||||
if (is_dir($docRoot.$chosenLocal)) {
|
||||
$pathValid = true;
|
||||
}
|
||||
|
||||
if ($pathValid) {
|
||||
|
||||
// New setting for the root path
|
||||
$settingsNew = '"root" => "'.$chosenLocal.'",'.PHP_EOL;
|
||||
|
||||
// Identify the bit to replace
|
||||
$repPosStart = strpos($settingsContents,'"root"');
|
||||
$repPosEnd = strpos($settingsContents,'"checkUpdates"');
|
||||
|
||||
// Compile our new settings
|
||||
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));
|
||||
|
||||
// Now update the config file
|
||||
if (is_writeable($settingsFile)) {
|
||||
$fh = fopen($settingsFile, 'w');
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
// Hide this popup and reload file manager
|
||||
echo "<script>top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));top.ICEcoder.refreshFileManager();</script>";
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ======
|
||||
// ADDING
|
||||
// ======
|
||||
|
||||
if ($_GET['action']=="add") {
|
||||
|
||||
// Start creating a new chunk for the github paths
|
||||
$settingsNew = '"githubLocalPaths" => array(';
|
||||
|
||||
// Add the new one
|
||||
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
|
||||
$settingsNew .= '"'.xssClean($_POST['githubLocalPathNEW'],"html").'",';
|
||||
}
|
||||
|
||||
// Then set all the old local paths
|
||||
for ($i=0; $i<count($oldLocal); $i++) {
|
||||
$settingsNew .= '"'.$oldLocal[$i].'",';
|
||||
}
|
||||
// Rtrim off the last comma
|
||||
$settingsNew = rtrim($settingsNew,',');
|
||||
$settingsNew .= '),'.PHP_EOL;
|
||||
|
||||
// Now do the same for the remote paths
|
||||
$settingsNew .= '"githubRemotePaths" => array(';
|
||||
|
||||
// Add the new one
|
||||
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
|
||||
$settingsNew .= '"'.xssClean($_POST['githubRemotePathNEW'],"html").'",';
|
||||
}
|
||||
|
||||
// Then set all the old remote paths
|
||||
for ($i=0; $i<count($oldRemote); $i++) {
|
||||
$settingsNew .= '"'.$oldRemote[$i].'",';
|
||||
}
|
||||
// Rtrim off the last comma
|
||||
$settingsNew = rtrim($settingsNew,',');
|
||||
$settingsNew .= '),'.PHP_EOL;
|
||||
|
||||
}
|
||||
|
||||
// ===================
|
||||
// UPDATING & REMOVING
|
||||
// ===================
|
||||
|
||||
if ($_GET['action']=="update") {
|
||||
|
||||
// Start creating a new chunk for the github paths
|
||||
$settingsNew = '"githubLocalPaths" => array(';
|
||||
|
||||
// Redo the arrays using the form data
|
||||
for ($i=0; $i<count($oldLocal); $i++) {
|
||||
if ($_POST['githubLocalPath'.$i] != "") {
|
||||
$settingsNew .= '"'.xssClean($_POST['githubLocalPath'.$i],"html").'",';
|
||||
}
|
||||
}
|
||||
// Rtrim off the last comma
|
||||
$settingsNew = rtrim($settingsNew,',');
|
||||
$settingsNew .= '),'.PHP_EOL;
|
||||
|
||||
// Now do the same for the remote paths
|
||||
$settingsNew .= '"githubRemotePaths" => array(';
|
||||
|
||||
// Redo the arrays using the form data
|
||||
for ($i=0; $i<count($oldRemote); $i++) {
|
||||
if ($_POST['githubRemotePath'.$i] != "") {
|
||||
$settingsNew .= '"'.xssClean($_POST['githubRemotePath'.$i],"html").'",';
|
||||
}
|
||||
}
|
||||
// Rtrim off the last comma
|
||||
$settingsNew = rtrim($settingsNew,',');
|
||||
$settingsNew .= '),'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($_GET['action']!="choose") {
|
||||
// Now we have a new settingsNew string to use
|
||||
// we can update the path arrays in the settings file
|
||||
|
||||
// Identify the bit to replace
|
||||
$repPosStart = strpos($settingsContents,'"githubLocalPaths"');
|
||||
$repPosEnd = strpos($settingsContents,'"previousFiles"');
|
||||
|
||||
// Compile our new settings
|
||||
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));
|
||||
|
||||
// Now update the config file
|
||||
if (is_writeable($settingsFile)) {
|
||||
$fh = fopen($settingsFile, 'w');
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
// Finally, reload the iFrame screen for the user
|
||||
header("Location: github-manager.php?updatedGithubPaths&csrf=".$_SESSION["csrf"]);
|
||||
echo "<script>window.location='github-manager.php?updatedGithubPaths&csrf='+top.ICEcoder.csrf;</script>";
|
||||
die('saving github paths...');
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub manager</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="github-manager.css">
|
||||
</head>
|
||||
|
||||
<body class="githubManager">
|
||||
|
||||
<h1>github paths</h1>
|
||||
|
||||
<div style="display: inline-block; width: 620px; height: 340px; overflow-y: auto">
|
||||
<?php
|
||||
$pathsLocal = $ICEcoder['githubLocalPaths'];
|
||||
$pathsRemote = $ICEcoder['githubRemotePaths'];
|
||||
if (count($pathsLocal) > 0) {
|
||||
?>
|
||||
<div style="display: inline-block; width: 600px; margin-bottom: 30px">
|
||||
<h2>Choose existing path</h2><br>
|
||||
|
||||
<form id="githubUpdateForm" action="github-manager.php?action=update" method="POST">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-left: 5px">Local path</td>
|
||||
<td style="padding-left: 5px">Remote GitHub path</td>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i=0; $i<count($pathsLocal); $i++) {
|
||||
echo '<tr>';
|
||||
echo '<td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPath'.$i.'" value="'.$pathsLocal[$i].'" style="width: 250px"></td>';
|
||||
echo '<td style="padding: 0 10px 8px 0"><input type="text" name="githubRemotePath'.$i.'" value="'.$pathsRemote[$i].'" style="width: 250px"></td>';
|
||||
echo '<td style="padding: 2px 0 8px 0"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'github-manager.php?action=choose&pathPair='.$i.'&csrf='.$_SESSION["csrf"].'\'">Choose</div></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td style="padding-top: 7px; color: #444">Set local and remote path to blanks to remove</td>';
|
||||
echo '<td style="padding: 3px 10px 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'githubUpdateForm\').submit()">Update</div></td>';
|
||||
echo '</tr>';
|
||||
?>
|
||||
</table>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
;};
|
||||
?>
|
||||
|
||||
<div style="display: inline-block; width: 600px">
|
||||
<h2>Add new path</h2><br>
|
||||
|
||||
<form id="githubAddForm" action="github-manager.php?action=add" method="POST">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-left: 5px">Local path</td>
|
||||
<td style="padding-left: 5px">Remote GitHub path</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPathNEW" value="" style="width: 250px"></td>
|
||||
<td style="padding: 0 0 8px 0"><input type="text" name="githubRemotePathNEW" value="" style="width: 250px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding: 3px 0 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById('githubAddForm').submit()">Add</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2 style="margin-bottom: 10px">Usage Info:</h2>
|
||||
|
||||
<p style="color: #888; margin: 0 10px 10px 0">Enter relative local paths (eg /server/myfiles) and absolute GitHub paths (eg https://github.com/user/repo or https://github.com/user/repo/tree/branch for branches), as per the examples. With this done you have established the source paths at both locations, as a pair.</p>
|
||||
<p style="color: #888; margin: 0 10px 10px 0">You can then choose a path pair and this then becomes your new root path in ICEcoder.</p>
|
||||
<p style="color: #888; margin: 0 10px 10px 0">The file manager then displays a new GitHub icon, which you can click on to perform and show a diff check between the 2 sources. These diffs can then be committed and pushed to the remote path at GitHub or cloned to your local path, to sync your files.</p>
|
||||
<p style="color: #888; margin: 0 10px 0 0">If you want to set another root path, this can be done in the Help > Settings screen.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
87
lib/github.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
|
||||
// SSL check, as everything is over https
|
||||
$wrappers = stream_get_wrappers();
|
||||
$sslAvail = true;
|
||||
if (!extension_loaded('openssl') || !in_array('https', $wrappers)) {
|
||||
$sslAvail = false;
|
||||
echo "<script>top.ICEcoder.message('Sorry, you don\'t appear to have OpenSSL loaded on your PHP instance, so https is not available. This is required for GitHub data transfer, please amend php.ini settings, restart your server and try again');top.ICEcoder.showHide('hide',top.get('loadingMask'));</script>";
|
||||
die();
|
||||
}
|
||||
|
||||
// If we have an action to perform
|
||||
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action']) && $sslAvail) {
|
||||
|
||||
// =====
|
||||
// CLONE
|
||||
// =====
|
||||
if ($_GET['action']=="clone") {
|
||||
|
||||
$iceGithubLocalPaths = $ICEcoder["githubLocalPaths"];
|
||||
$iceGithubRemotePaths = $ICEcoder["githubRemotePaths"];
|
||||
$pathPos = array_search($iceRoot,$iceGithubLocalPaths);
|
||||
if ($pathPos !== false) {
|
||||
|
||||
// USE: https://github.com/mattpass/ICEcoder/zipball/master
|
||||
// Store the plugin zip to the tmp dir
|
||||
$target = $docRoot.$iceGithubLocalPaths[$pathPos]."/";
|
||||
$zipURL = $iceGithubRemotePaths[$pathPos].'/zipball/master';
|
||||
$zipFile = "../tmp/".basename($zipURL);
|
||||
|
||||
if (ini_get('allow_url_fopen')) {
|
||||
$fileData = file_get_contents($zipURL, false, $context);
|
||||
} elseif (function_exists('curl_init')) {
|
||||
$client = curl_init($zipURL);
|
||||
curl_setopt($client, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($client, CURLOPT_RETURNTRANSFER, 1); //fixed this line
|
||||
$fileData = curl_exec($client);
|
||||
}
|
||||
file_put_contents($zipFile, $fileData);
|
||||
|
||||
// Now unpack the zip
|
||||
$zip = new ZipArchive;
|
||||
$zip->open($zipFile);
|
||||
|
||||
// Create all files & dirs, in 1kb chunks
|
||||
for($i=0; $i<$zip->numFiles; $i++) {
|
||||
|
||||
$name = $zip->getNameIndex($i);
|
||||
if ($i==0) {
|
||||
$dirName = $name;
|
||||
} else {
|
||||
$tgtName = str_replace($dirName,"",$name);
|
||||
// Determine output filename
|
||||
$file = $target.$tgtName;
|
||||
|
||||
// Create the directories if necessary
|
||||
$dir = dirname($file);
|
||||
if (!is_dir($dir)) mkdir($dir, 0777, true);
|
||||
|
||||
// Read from zip and write to disk
|
||||
$fpr = $zip->getStream($name);
|
||||
if (!is_dir($file)) {
|
||||
$fpw = fopen($file, 'w');
|
||||
while ($data = fread($fpr, 1024)) {
|
||||
fwrite($fpw, $data);
|
||||
}
|
||||
fclose($fpw);
|
||||
}
|
||||
fclose($fpr);
|
||||
}
|
||||
}
|
||||
$zip->close();
|
||||
|
||||
// Remove the tmp zip file
|
||||
unlink($zipFile);
|
||||
|
||||
// Refresh the file manager
|
||||
echo "<script>top.ICEcoder.refreshFileManager();</script>";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
27
lib/headers.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// Load common functions
|
||||
include_once(dirname(__FILE__)."/settings-common.php");
|
||||
|
||||
// CSRF synchronizer token pattern, 32 chars
|
||||
if (!isset($_SESSION["csrf"])) {
|
||||
$_SESSION["csrf"] = md5(uniqid(mt_rand(), true));
|
||||
}
|
||||
|
||||
if (($_GET || $_POST) && (!isset($_REQUEST["csrf"]) || $_REQUEST["csrf"] !== $_SESSION["csrf"])) {
|
||||
$req = isset($_REQUEST["csrf"]) ? xssClean($_REQUEST["csrf"],"html") : "";
|
||||
die("Bad CSRF token. Please report the error info at https://github.com/mattpass/ICEcoder so it can be fixed.<br><br>
|
||||
CSRF issue:<br>
|
||||
REQUEST: ".$req."<br>
|
||||
SESSION: ".xssClean($_SESSION["csrf"],"html")."<br>
|
||||
FILE: ".xssClean($_SERVER["SCRIPT_NAME"],"html")."<br>
|
||||
GET: ".xssClean(var_export($_GET, true),"html")."<br>
|
||||
POST: ".xssClean(var_export($_POST, true),"html")."<br>
|
||||
<br>Many thanks!");
|
||||
}
|
||||
|
||||
// Set our security related headers
|
||||
header("X-Frame-Options: SAMEORIGIN"); // Only frames of same origin
|
||||
header("X-XSS-Protection: 1; mode=block"); // Turn on IE8-9 XSS prevention tools
|
||||
// header("X-Content-Security-Policy: allow 'self'"); // Only allows JS on same domain & not inline to run
|
||||
header("X-Content-Type-Options: nosniff"); // Prevent MIME based attacks
|
||||
?>
|
||||
15
lib/help.css
@@ -17,16 +17,17 @@ table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select:none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
a {color: #fff; text-decoration: none}
|
||||
|
||||
.help {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
.help .key {display: inline-block; width: 175px; text-align: right; margin-right: 5px; float: left}
|
||||
.help .key .plus {color: #888}
|
||||
.help .shortcut {display: inline-block; width: 175px; color: #888; margin-left: 5px; float: left}
|
||||
.key {display: inline-block; width: 175px; text-align: right; margin-right: 5px; float: left}
|
||||
.key .plus {color: #888}
|
||||
.shortcut {display: inline-block; width: 175px; color: #888; margin-left: 5px; float: left}
|
||||
.info {color: #bbb; cursor: help}
|
||||
87
lib/help.php
@@ -1,4 +1,7 @@
|
||||
<?php include("settings.php");?>
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
@@ -11,36 +14,64 @@
|
||||
|
||||
<body class="help">
|
||||
|
||||
<h1 id="title">help</h1>
|
||||
<h1 id="title">shortcuts</h1>
|
||||
|
||||
<a href="javascript:top.ICEcoder.showManual(<?php echo $ICEcoder["versionNo"];?>)" style="position: absolute; top: 26px; right: 20px"><div style="padding: 10px; background: #2187e7; color: #fff; font-size: 18px">ICEcoder manual</div></a>
|
||||
<?php $isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false;?>
|
||||
<div style="display: inline-block; width: 365px; margin-right: 20px">
|
||||
<h2>Within document</h2>
|
||||
<!-- This can only be CTRL+space as Cmd+space is a reserved apple shortcut -->
|
||||
<span class="key">Ctrl <span class="plus">+</span> Space</span> <span class="shortcut">Autocomplete / add snippet</span><br>
|
||||
<span class="key">Ctrl <span class="plus">+</span> Click <span class="plus">or</span> Alt <span class="plus">+</span> Drag</span> <span class="shortcut">Multiple select</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> ↑</span> <span class="shortcut">Move line up</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> ↓</span> <span class="shortcut">Move line down</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> +</span> <span class="shortcut">Duplicate line(s)</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut">Remove line(s)</span><br>
|
||||
<span class="key">Shift <span class="plus">+</span> Enter</span> <span class="shortcut">Insert line before</span><br>
|
||||
<span class="key">Alt <span class="plus">+</span> Enter</span> <span class="shortcut">Insert line after</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> i</span> <span class="shortcut">Search for selected <span class="info" title="Popups need to be enabled">[?]</span></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> j</span> <span class="shortcut">Jump to definition / jump back</span><br>
|
||||
<span class="key">Esc</span> <span class="shortcut">Comment / uncomment</span><br>
|
||||
<span class="key">Tab</span> <span class="shortcut">Insert tab / indent selected</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> d</span> <span class="shortcut">Wrap with <div></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> s</span> <span class="shortcut">Wrap with <span></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> p</span> <span class="shortcut">Wrap / unwrap with <p></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> a</span> <span class="shortcut">Wrap / unwrap with <a></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> b</span> <span class="shortcut">Wrap / unwrap with <b></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> i</span> <span class="shortcut">Wrap / unwrap with <i></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> g</span> <span class="shortcut">Wrap / unwrap with <strong></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> e</span> <span class="shortcut">Wrap / unwrap with <em></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> nums 1 - 3</span> <span class="shortcut">Wrap/unwrap with <h1> - <h3></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> Enter</span> <span class="shortcut">End line with <br></span><br><br>
|
||||
<h2>On Tabs</h2>
|
||||
<span class="key">Middle click</span> <span class="shortcut">Close tab</span><br>
|
||||
</div>
|
||||
|
||||
<h2>In file manager</h2>
|
||||
<span class="key">Delete</span> <span class="shortcut">Delete file</span><br><br>
|
||||
<div style="display: inline-block; width: 365px">
|
||||
<h2>Within file manager</h2>
|
||||
<span class="key">Left click</span> <span class="shortcut">Select file / folder</span><br>
|
||||
<span class="key">Double click / click (mobile)</span> <span class="shortcut">Open file</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> left click</span> <span class="shortcut">Multiple select</span><br>
|
||||
<span class="key">Shift <span class="plus">+</span> left click</span> <span class="shortcut">Range select</span><br>
|
||||
<span class="key">Right click</span> <span class="shortcut">Options for selected</span><br>
|
||||
<span class="key">Delete</span> <span class="shortcut">Delete selected</span><br><br>
|
||||
|
||||
<h2>Within document</h2>
|
||||
<span class="key">CTRL <span class="plus">+</span> ↑</span> <span class="shortcut">Move line up</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> ↓</span> <span class="shortcut">Move line down</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> I</span> <span class="shortcut">Search selected text</span><br>
|
||||
<span class="key">Esc</span> <span class="shortcut">Comment / uncomment text</span><br>
|
||||
<span class="key">Tab</span> <span class="shortcut">Insert tab / indent selected text</span><br><br>
|
||||
|
||||
<h2>Anywhere</h2>
|
||||
<span class="key">CTRL <span class="plus">+</span> →</span> <span class="shortcut">Next tab</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> ←</span> <span class="shortcut">Previous tab</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> +</span> <span class="shortcut">New tab</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> -</span> <span class="shortcut">Close current tab</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> F</span> <span class="shortcut">Find</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> G</span> <span class="shortcut">Go to line</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> S</span> <span class="shortcut">Save</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> Shift <span class="plus">+</span> S</span> <span class="shortcut">Save as...</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage</span><br>
|
||||
<span class="key">CTRL <span class="plus">+</span> S <span class="plus">+</span> Enter</span> <span class="shortcut">Save & create sticky tab</span><br>
|
||||
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br>
|
||||
|
||||
<h2>Logo</h2>
|
||||
<span class="key">Left click</span> <span class="shortcut">Help</span><br>
|
||||
<span class="key">Right click</span> <span class="shortcut">Settings</span><br>
|
||||
<h2>Anywhere</h2>
|
||||
<span class="key">Middle scrollwheel</span> <span class="shortcut">Next/previous tab</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> →</span> <span class="shortcut">Next tab</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> ←</span> <span class="shortcut">Previous tab</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> +</span> <span class="shortcut">New tab</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut">Close current tab</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> o</span> <span class="shortcut">Open file prompt</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> f</span> <span class="shortcut">Find</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> g</span> <span class="shortcut">Focus on Go to line input</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> s</span> <span class="shortcut">Save</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Shift <span class="plus">+</span> s</span> <span class="shortcut">Save as...</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage <span class="info" title="Popups need to be enabled">[?]</span></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> `</span> <span class="shortcut">Contract/expand file manager</span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> .</span> <span class="shortcut">Fold/unfold current line</span><br>
|
||||
<span class="key">Space</span> <span class="shortcut">Refocus on document</span><br>
|
||||
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
/* First, reset everything to a standard */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
font-family: arial, verdana, helvetica, sans-serif;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
|
||||
.blackMask {position: fixed; display: table; width: 100%; height: 100%; top: 0; left: 0; visibility: hidden; background-color: rgba(0,0,0,0.8); text-align: center; z-index: 100}
|
||||
.blackMask .popupVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
|
||||
.popupVCenter .popup {#position: relative; #top: -50%; text-align: center; color: #fff; font-size: 10px}
|
||||
.whiteGlow {box-shadow: 0 0 8px 2px rgba(255,255,255,0.6)}
|
||||
|
||||
.circleOutside {background-color: rgba(0,0,0,0); border:5px solid rgba(0,183,229,0.9); opacity:.9; border-top:5px solid rgba(0,0,0,0); border-left:5px solid rgba(0,0,0,0); border-radius:50px; box-shadow: 0 0 35px #2187e7;
|
||||
width:50px; height:50px; margin:0 auto; -moz-animation:spin .5s infinite linear; -webkit-animation:spin .5s infinite linear;
|
||||
}
|
||||
.circleInside {background-color: rgba(0,0,0,0); border:5px solid rgba(0,183,229,0.9); opacity:.9; border-top:5px solid rgba(0,0,0,0); border-left:5px solid rgba(0,0,0,0); border-radius:50px; box-shadow: 0 0 15px #2187e7;
|
||||
width:30px; height:30px; margin:0 auto; position:relative; top:-50px; -moz-animation:spinoff .5s infinite linear; -webkit-animation:spinoff .5s infinite linear;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {-moz-transform:rotate(0deg)}
|
||||
100% {-moz-transform:rotate(360deg)}
|
||||
}
|
||||
@-moz-keyframes spinoff {
|
||||
0% {-moz-transform:rotate(0deg)}
|
||||
100% {-moz-transform:rotate(-360deg)}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {-webkit-transform:rotate(0deg)}
|
||||
100% {-webkit-transform:rotate(360deg)}
|
||||
}
|
||||
@-webkit-keyframes spinoff {
|
||||
0% {-webkit-transform:rotate(0deg)}
|
||||
100% {-webkit-transform:rotate(-360deg)}
|
||||
}
|
||||
|
||||
.progressBar {position:absolute; top: 0; left: 0; width:100%; height:1px; margin:2px 0; background:#2187e7; box-shadow:0 0 10px 1px rgba(0,198,255,0.7)}
|
||||
@-moz-keyframes fullexpand {
|
||||
0% {width:0}
|
||||
100%{width:100%}
|
||||
}
|
||||
@-webkit-keyframes fullexpand {
|
||||
0% {width:0}
|
||||
100%{width:100%}
|
||||
}
|
||||
|
||||
.header {position: absolute; display: inline-block; top: 0; left: 0; width: 100%; height: 40px; background-color: #fff; text-align: right; z-index: 2}
|
||||
.header .plugins {position: absolute; display: inline-block; left: 15px; top: 3px}
|
||||
.header .plugins img {position: relative; display: inline-block; margin-right: 15px}
|
||||
.header .screenModeIcon {position: absolute; top: 5px; right: 178px; cursor: pointer}
|
||||
.header .version {position: relative; display: inline-block; margin-top: 25px; font-size: 10px; color: #bbb}
|
||||
.header .version a {font-size: 10px; color: #bbb; text-decoration: none}
|
||||
.header .logo {position: relative; margin: 5px 10px 0 5px; cursor: pointer}
|
||||
|
||||
.files {position: absolute; display: inline-block; top: 0; left: 0; height: 100%; width: 250px; background-color: #444; background-image: url('../images/files-arrow.png'); background-repeat: no-repeat; background-position: 100% 50%; overflow: hidden; z-index: 1;
|
||||
box-shadow: 0 50px 10px 4px rgba(0,0,0,0.4);
|
||||
}
|
||||
.files .account {display: inline-block; height: 50px; width: 250px; margin-top: 40px; background-color: #888}
|
||||
.files .accountOptions {position: relative; height: 32px; width: 100%; margin-left: 15px; margin-top: 8px}
|
||||
.files .accountOptions div {display: inline-block; background: url('../images/file-manager-icons.png') 0 0 no-repeat; cursor: pointer}
|
||||
.files .accountOptions .save {width: 30px; height: 32px; opacity: 0.3}
|
||||
.files .accountOptions .open {width: 25px; height: 32px; background-position: -32px -3px; margin: 3px 0 0 7px; opacity: 0.3}
|
||||
.files .accountOptions .newFile {width: 15px; height: 16px; background-position: -64px 0; margin: 8px 0 0 10px; opacity: 0.3}
|
||||
.files .accountOptions .newFolder {width: 20px; height: 16px; background-position: -80px 0; margin: 8px 0 0 5px; opacity: 0.3}
|
||||
.files .accountOptions .delete {width: 16px; height: 16px; background-position: -100px 0; margin: 8px 0 0 5px; opacity: 0.3}
|
||||
.files .accountOptions .rename {width: 16px; height: 16px; background-position: -116px 0; margin: 8px 0 0 5px; opacity: 0.3}
|
||||
.files .accountOptions .view {width: 16px; height: 16px; background-position: -132px 0; margin: 8px 0 0 5px; opacity: 0.3}
|
||||
.files .accountOptions .lock {position: relative; margin-left: 208px; margin-top: -27px; width: 12px; height: 16px; background-position: -64px -16px; z-index: 1}
|
||||
.files input:focus, .findReplace input:focus, .findReplace select:focus, .accountPassword:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)}
|
||||
.files .button {position: absolute; border: 0; background: #444; color: #eee; height:20px; margin-top: 16px; margin-left: 5px; font-size: 11px; cursor: pointer}
|
||||
.files .button:hover {background-color: #222; color: #eee}
|
||||
.files .frame {display: inline-block; width: 250px}
|
||||
.files .serverMessage {position: absolute; display: none; width: 450px; bottom: 0; margin-bottom: 30px; background-color: rgba(255,255,255,0.8); font-size: 10px; padding: 7px 12px; opacity: 0;
|
||||
-webkit-transition: opacity 0.2s;
|
||||
-moz-transition: opacity 0.2s;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
.files .serverMessage b {font-size: 10px}
|
||||
|
||||
.editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px}
|
||||
.editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 40px; padding-left: 41px; background: #ddd}
|
||||
.tabsBar .tab {display: none; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 5px 8px 2px 8px; font-size: 10px; border-left: solid 1px #eee; border-right: solid 1px #777; border-radius: 4px 4px 0 0; color: #fff; direction: rtl; text-align: right; white-space: nowrap; overflow: hidden; cursor: pointer;
|
||||
-webkit-transition: all 0.15s;
|
||||
-moz-transition: all 0.15s;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.tabsBar .tab .closeTab, .tabsBar .closeAllTabs {margin: 1px 0 0 5px; border-radius: 6px; cursor: pointer}
|
||||
.tabsBar .closeAllTabs {position: absolute; margin: 6px 0 0 -25px; background: #bbb}
|
||||
.tabsBar .closeAllTabs:hover {background: #000}
|
||||
.tabsBar .newTab {display: inline-block; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 6px 5px 5px 5px; border-left: solid 1px #eee; border-right: solid 1px #777; border-radius: 4px 4px 0 0; cursor: pointer;}
|
||||
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #141414}
|
||||
.findBar .findReplace {position: absolute; z-index: 1}
|
||||
.findReplace select {position: relative; font-size: 10px; margin: 8px 2px 0 2px; top: -2px;}
|
||||
.findReplace .findText {display: inline-block; height: 21px; font-size: 10px; margin: 8px 2px 0 2px; margin-left: 43px}
|
||||
.findReplace .find {position: relative; width: 120px; height: 16px; border: 0; top: -3px; font-size: 10px; padding-left: 5px; margin-right: 3px}
|
||||
.findReplace .replaceAction {margin: 0 2px 0 0; top: -2px}
|
||||
.findReplace .replaceText {height: 21px; font-size: 10px; margin: 8px 2px 0 2px}
|
||||
.findReplace .replace {position: relative; width: 120px; height: 16px; border: 0; top: -3px; font-size: 10px; padding-left: 5px}
|
||||
.findReplace .targetText {height: 21px; font-size: 10px; margin: 8px 2px 0 2px}
|
||||
.findReplace .submit {position: relative; top: -2px; height: 17px; border: 0; background-color: #444; color: #eee; font-size: 10px; margin-left: 2px; cursor: pointer}
|
||||
.findReplace .submit:hover {background-color: #2187e7; color: #eee}
|
||||
.findReplace .results {position: relative; display: inline-block; width: 200px; height: 20px; font-size: 10px; margin: 8px 0 0 20px}
|
||||
.findBar .codeAssist {position: fixed; display: inline-block; width: 100px; right: 74px; top: 70px; height: 21px; font-size: 10px; z-index: 1}
|
||||
.findBar .codeAssist input {margin-top: -1px}
|
||||
.findBar .goLine {position: fixed; display: inline-block; width: 100px; right: -10px; top: 70px; height: 21px; font-size: 10px; z-index: 1}
|
||||
.goLine .goToLine {width: 25px; height: 16px; border: 0; font-size: 10px; margin: -3px 0 0 3px}
|
||||
.goLine .goToLine:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)}
|
||||
.editor .code {position: relative; display: inline-block; top: 28px; width: 600px; height: 600px; visibility: hidden}
|
||||
|
||||
.footer {position: fixed; display: inline-block; width: 100%; height: 30px; bottom: 0; background-color: rgba(0,0,0,0.7); left: 0; z-index: 2}
|
||||
.footer .nesting {display: inline-block; padding: 5px 8px; margin: 4px 0 0 15px; font-weight: bold; font-size: 10px; color: #fff; background-color: #0b0}
|
||||
.footer .nestLoc {position: absolute; display: inline-block; width: 120px; padding: 5px 0 0 8px; margin-top: 2px; left: 112px; font-weight: bold; font-size: 12px; color: #fff; text-align: right}
|
||||
.footer .nestDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 0px; left: 255px; font-size: 12px; color: #fff; text-align: right}
|
||||
.footer .charDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 3px; left: 100%; font-weight: bold; font-size: 12px; color: #fff; text-align: right; width: 200px; text-align: right; margin-left: -220px}
|
||||
|
||||
.textbox {box-shadow: inset 1px 1px 2px 0 rgba(0,0,0,0.4)}
|
||||
|
||||
.fileMenu {position: absolute; display: none; left: 0; top: 0; background-color: #333; z-index: 10}
|
||||
.fileMenu a {display: block; padding: 2px 5px; background-color: #333; color: #eee; text-decoration: none}
|
||||
.fileMenu a:hover {background-color: #666}
|
||||
|
||||
.screenContainer {position: absolute; display: table; width: 100%; height: 100%; top: 0; left: 0; text-align: center}
|
||||
.screenContainer .screenVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
|
||||
.screenVCenter .screenCenter {#position: relative; #top: -50%; text-align: center; display: inline}
|
||||
.screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb}
|
||||
.screenCenter .accountPassword {border: 0; background-color: #333; color: #fff; height: 20px}
|
||||
.screenCenter .button {border: 0; background: #444; color: #eee; height: 22px; cursor: pointer}
|
||||
/* First, reset everything to a standard */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
font-family: arial, verdana, helvetica, sans-serif;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
|
||||
.blackMask {position: fixed; display: table; width: 100%; height: 100%; top: 0; left: 0; visibility: hidden; background-color: rgba(0,0,0,0.8); text-align: center; z-index: 100}
|
||||
.blackMask .popupVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
|
||||
.popupVCenter .popup {#position: relative; #top: -50%; text-align: center; color: #fff; font-size: 10px}
|
||||
.whiteGlow {box-shadow: 0 0 8px 2px rgba(255,255,255,0.6)}
|
||||
|
||||
.spinner {width: 50px; height: 50px; margin: 20px auto; background: #fff;
|
||||
-webkit-animation: rotateplane 1.2s infinite ease-in-out;
|
||||
animation: rotateplane 1.2s infinite ease-in-out;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotateplane {
|
||||
0% {-webkit-transform: perspective(120px)}
|
||||
50% {-webkit-transform: perspective(120px) rotateY(180deg)}
|
||||
100% {-webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg)}
|
||||
}
|
||||
|
||||
@keyframes rotateplane {
|
||||
0% {transform: perspective(120px) rotateX(0deg) rotateY(0deg)}
|
||||
50% {transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)}
|
||||
100% {transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}
|
||||
}
|
||||
|
||||
.plugins {position: absolute; display: inline-block; width: 3px; height: 100%; top: 0; background: transparent; overflow: hidden; z-index: 3;
|
||||
transition: all 0.07s ease-out;
|
||||
}
|
||||
|
||||
.header {position: absolute; display: inline-block; top: 0; left: 0; width: 100%; height: 20px; background-color: #fff; text-align: right; z-index: 1}
|
||||
|
||||
.files {position: absolute; display: inline-block; top: 0; left: 0; height: 100%; width: 250px; background-color: #444; background-image: url('../images/files-arrow.png'); background-repeat: no-repeat; background-position: 100% 50%; overflow: hidden; z-index: 2}
|
||||
.files .fileNav {display: block; height: 36px}
|
||||
.files .fileNav ul {list-style-type: none; line-height: 24px; padding-left: 15px}
|
||||
.files .fileNav li {display: inline-block; padding: 18px 15px 0 0}
|
||||
.files .fileNav a {color: #666; text-decoration: none}
|
||||
.files .fileNav a:hover {color: #fff; cursor: pointer}
|
||||
.files .options {
|
||||
transition: opacity 0.15s ease-in-out;
|
||||
}
|
||||
.files .options .optionsList {position: absolute; display: inline-block; visibility: hidden; background: #444; height: 100%; padding: 23px 15px 15px 15px}
|
||||
.files .options .optionsList ul {list-style-type: none; line-height: 24px}
|
||||
.files .options .optionsList a {color: #666; text-decoration: none}
|
||||
.files .options .optionsList a:hover {color: #fff; cursor: pointer}
|
||||
.files input:focus, .findReplace input:focus, .findReplace select:focus, .password:focus {outline: 0; box-shadow: 0 0 10px 1px rgba(0,198,255,0.7)}
|
||||
.files .button {position: absolute; border: 0; background: #444; color: #eee; height:20px; margin-top: 16px; margin-left: 5px; font-size: 11px; cursor: pointer}
|
||||
.files .button:hover {background-color: #222; color: #eee}
|
||||
.files .frame {display: inline-block; width: 250px; margin-top: 24px}
|
||||
.files .serverMessage {position: absolute; display: inline-block; width: 450px; bottom: 0; background-color: rgba(255,255,255,0.8); font-size: 10px; padding: 4px 12px 1px 12px; opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
.files .serverMessage b {font-size: 10px}
|
||||
|
||||
.editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px}
|
||||
.editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 20px; padding-left: 53px; background: #fff}
|
||||
.tabsBar .tab {position: absolute; display: none; height: 15px; padding: 5px 8px 2px 9px; border-right: 1px solid #ddd; font-size: 10px; color: #fff; white-space: nowrap; overflow: hidden; cursor: pointer; z-index: 1;
|
||||
transition: width 0.15s ease-in-out;
|
||||
transition: left 0.15s ease-in-out;
|
||||
}
|
||||
.tabsBar .tabSlide {
|
||||
transition: left 0.15s ease-in-out;
|
||||
}
|
||||
.tabsBar .tabDrag {
|
||||
transition: left 0s ease-in-out;
|
||||
}
|
||||
.tabsBar .tab .closeTab, .tabsBar .closeAllTabs {margin: 1px 0 0 5px; border-radius: 6px; cursor: pointer}
|
||||
.tabsBar .tab .closeTab {position: absolute; right: 7px}
|
||||
.tabsBar .alphaTabs {position: absolute; margin: 6px 0 0 -20px; border-radius: 6px; cursor: pointer}
|
||||
.tabsBar .alphaTabs:hover {background: #ccc}
|
||||
.tabsBar .closeAllTabs {position: absolute; margin: 6px 0 0 -36px}
|
||||
.tabsBar .closeAllTabs:hover {background: #ccc}
|
||||
.tabsBar .newTab {position: absolute; display: inline-block; height: 15px; padding: 4px 7px 3px 7px; background: #ddd; cursor: pointer; z-index: 0;
|
||||
transition: left 0.15s ease-in-out;
|
||||
}
|
||||
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #161612}
|
||||
.findBar .findReplace {position: absolute; padding-top: 2px; z-index: 1}
|
||||
.findReplace .selectWrapper {position: relative; display: inline-block}
|
||||
.findReplace .selectWrapper select {position: relative; padding: 1px; border: 0; background: url('../images/select-arrow.gif') no-repeat right #444; color: #fff; font-size: 10px; height: 16px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
.findReplace .findText {display: inline-block; height: 21px; font-size: 10px; margin: 6px 3px 0 43px}
|
||||
.findReplace .find {position: relative; width: 120px; height: 16px; border: 0; top: 3px; font-size: 10px; padding-left: 5px; margin-right: 3px; background: #444; color: #eee}
|
||||
.findReplace .replaceText {height: 21px; font-size: 10px; margin: 6px 2px 0 2px}
|
||||
.findReplace .replace {position: relative; width: 120px; height: 16px; border: 0; top: 3px; font-size: 10px; padding-left: 5px; background: #444; color: #eee}
|
||||
.findReplace .targetText {height: 21px; font-size: 10px; margin: 6px 2px 0 2px}
|
||||
.findReplace .submit {position: relative; top: 3px; height: 16px; border: 0; background-color: #444; color: #eee; font-size: 10px; margin-left: 2px; cursor: pointer}
|
||||
.findReplace .submit:hover {background-color: #2187e7; color: #eee}
|
||||
.findReplace .results {position: relative; display: inline-block; width: 200px; height: 20px; font-size: 10px; margin: 8px 0 0 20px}
|
||||
.findBar .codeAssist {position: fixed; display: inline-block; width: 100px; right: 146px; top: 49px; height: 21px; font-size: 10px; color: #eee; cursor: default; z-index: 1}
|
||||
.findBar .codeAssist .codeAssistCheckbox {display: none}
|
||||
.findBar .codeAssist .codeAssistDisplay {display: inline-block; width: 16px; height: 16px; margin: -1px 4px 0 0; vertical-align: middle; background: url('../images/checkbox.gif') 0 0 no-repeat; cursor: pointer}
|
||||
.findBar .goLine {position: fixed; display: inline-block; width: 100px; right: 58px; top: 49px; height: 21px; font-size: 10px; color: #eee; cursor: default; z-index: 1}
|
||||
.goLine .goToLine {width: 30px; height: 16px; border: 0; font-size: 10px; margin: -3px 0 0 3px; padding-left: 4px; background: #444; color: #eee}
|
||||
.goLine .goToLine:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)}
|
||||
.findBar .view {position: fixed; display: inline-block; width: 16px; height: 16px; right: 42px; top: 49px; background: url('../images/file-manager-icons.png') 0 0 no-repeat; cursor: pointer; background-position: -48px 0; opacity: 0.3}
|
||||
.findBar .bug {position: fixed; display: inline-block; width: 16px; height: 16px; right: 16px; top: 48px; background: url('../images/bug-reporting-icons.png') 0 0 no-repeat; cursor: pointer; background-position: 0 0}
|
||||
.editor .code {position: relative; display: inline-block; top: 28px; width: 600px; height: 600px; visibility: hidden}
|
||||
|
||||
.footer {position: fixed; display: inline-block; width: 100%; height: 30px; bottom: 0; background-color: rgba(0,0,0,0.7); left: 0; z-index: 1}
|
||||
.footer .nesting {position: absolute; display: inline-block; padding: 5px; margin-top: 10px; left: 260px; border-radius: 5px; background-color: #0b0; cursor: default}
|
||||
.footer .nestDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 0px; left: 267px; font-size: 12px; color: #fff; text-align: right}
|
||||
.footer .charDisplay, .footer .byteDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 3px; margin-right: 10px; right: 0; font-weight: bold; font-size: 12px; color: #fff; text-align: right; text-align: right; cursor: pointer}
|
||||
|
||||
.fileMenu {position: absolute; display: none; left: 0; top: 0; background-color: #333; z-index: 10;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
.fileMenu a {display: block; padding: 2px 5px; background-color: #333; color: #eee; text-decoration: none}
|
||||
.fileMenu a:hover {background-color: #666}
|
||||
.fileMenu hr {border: 0; height: 1px; padding: 0; margin: 0; background: #444}
|
||||
|
||||
.screenContainer {position: absolute; display: table; width: 100%; height: 100%; top: 0; left: 0; text-align: center}
|
||||
.screenContainer .screenVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
|
||||
.screenVCenter .screenCenter {#position: relative; #top: -50%; text-align: center; display: inline}
|
||||
.screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb}
|
||||
.screenCenter .text {position: relative; display: block; margin-top: 15px; font-size: 10px; color: #888}
|
||||
.screenCenter .text input {margin-top: 1px}
|
||||
.screenCenter .text a {position: relative; display: block; margin-top: 15px; font-size: 10px; color: #888; text-decoration: none}
|
||||
.screenCenter .password {border: 0; background-color: #333; color: #fff; height: 20px}
|
||||
.screenCenter .button {border: 0; background: #444; color: #eee; height: 22px; cursor: pointer}
|
||||
.screenCenter .button:hover {background: #2187e7; color: #eee}
|
||||
2461
lib/ice-coder.js
120
lib/ice-coder.min.js
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
var get=function(a){return top.document.getElementById(a)},ICEcoder={filesW:250,minFilesW:14,maxFilesW:250,selectedTab:0,savedPoints:[],canSwitchTabs:!0,openFiles:[],openFileMDTs:[],cMInstances:[],nextcMInstance:1,selectedFiles:[],findMode:!1,lockedNav:!0,htmlTagArray:[],mouseDown:!1,draggingFilesW:!1,draggingTab:!1,draggingWithKey:!1,tabLeftPos:[],tabBGcurrent:"#141414",tabBGselected:"#49d",tabBGopen:"#c3c3c3",tabBGnormal:"transparent",tabFGcurrent:"#fff",tabFGselected:"#fff",tabFGopenFile:"#000",
|
||||
tabFGnormalFile:"#eee",tabFGnormalTab:"#888",serverQueueItems:[],previewWindow:!1,pluginIntervalRefs:[],overPopup:!1,cmdKey:!1,fmReady:!1,bugReportStatus:"off",bugReportPath:"",bugFilesSizesSeen:[],bugFilesSizesActual:[],githubDiff:!1,ready:!1,initAliases:function(){for(var a="header files fileOptions optionsFile optionsEdit optionsRemote optionsHelp filesFrame editor tabsBar findBar content footer nestValid nestDisplay charDisplay byteDisplay".split(" "),b=0;b<a.length;b++)ICEcoder[a[b]]=top.get(a[b])},
|
||||
init:function(){ICEcoder.setLayout();top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.autoOpenInt=setInterval(function(){top.ICEcoder.fmReady&&(top.ICEcoder.openLastFiles&&top.ICEcoder.autoOpenFiles(),clearInterval(top.ICEcoder.autoOpenInt))},4);setInterval(ICEcoder.updateNestingIndicator,30);top.ICEcoder.startBugChecking();top.ICEcoder.ready=!0},setLayout:function(a){var b,c;b=window.innerWidth;c=window.innerHeight;this.header.style.width=this.tabsBar.style.width=this.findBar.style.width=
|
||||
b+"px";this.files.style.width=this.editor.style.left=this.filesW+"px";this.optionsFile.style.width=this.optionsEdit.style.width=this.optionsRemote.style.width=this.optionsHelp.style.width=this.filesW-60+"px";this.filesFrame.style.height=c-25-35+"px";this.nestValid.style.left=this.filesW+10+"px";this.nestDisplay.style.left=this.filesW+17+"px";top.ICEcoder.setTabWidths();a||(this.editor.style.width=ICEcoder.content.style.width=b-this.filesW+"px",ICEcoder.content.style.height=c-25-21-28-26+"px",setTimeout(function(){for(var a=
|
||||
0;a<top.ICEcoder.openFiles.length;a++)top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize("100%",top.ICEcoder.content.style.height)},4))},changeFilesW:function(a){ICEcoder.lockedNav&&ICEcoder.filesW!=ICEcoder.minFilesW||("undefined"!=typeof ICEcoder.changeFilesInt&&clearInterval(ICEcoder.changeFilesInt),ICEcoder.changeFilesInt=setInterval(function(){ICEcoder.changeFilesWStep(a)},10))},changeFilesWStep:function(a){"expand"==a?ICEcoder.filesW<ICEcoder.maxFilesW-1?ICEcoder.filesW+=
|
||||
Math.ceil((ICEcoder.maxFilesW-ICEcoder.filesW)/2):ICEcoder.filesW=ICEcoder.maxFilesW:ICEcoder.filesW>ICEcoder.minFilesW+1?ICEcoder.filesW-=Math.ceil((ICEcoder.filesW-ICEcoder.minFilesW)/2):ICEcoder.filesW=ICEcoder.minFilesW;("expand"==a&&ICEcoder.filesW==ICEcoder.maxFilesW||"contract"==a&&ICEcoder.filesW==ICEcoder.minFilesW)&&clearInterval(ICEcoder.changeFilesInt);ICEcoder.setLayout()},canResizeFilesW:function(){top.ICEcoder.ready&&"w-resize"==top.document.body.style.cursor?top.ICEcoder.mouseDown&&
|
||||
(top.ICEcoder.filesW=top.ICEcoder.maxFilesW=250<=top.ICEcoder.mouseX&&400>=top.ICEcoder.mouseX?top.ICEcoder.mouseX:250>top.ICEcoder.mouseX?250:400,top.ICEcoder.files.style.width=top.ICEcoder.filesFrame.style.width=top.ICEcoder.filesW+"px",top.ICEcoder.setLayout(),top.ICEcoder.draggingFilesW=!0):top.ICEcoder.draggingFilesW=!1},lockUnlockNav:function(){var a;a=top.filesFrame.contentWindow.document.getElementById("fmLock");ICEcoder.lockedNav=!ICEcoder.lockedNav;a.style.backgroundPosition=ICEcoder.lockedNav?
|
||||
"0 0":"-16px 0"},showHidePlugins:function(a){get("plugins").style.width="show"==a?"55px":"3px";get("plugins").style.background="show"==a?"#333":"transparent";"show"==a&&ICEcoder.changeFilesW("expand")},contentCleanUp:function(){var a,b;a=ICEcoder.getcMInstance();b=a.getValue();b=b.replace(/<ICEcoder:\/:textarea>/g,"</textarea>");a.setValue(b);a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration()},undo:function(){ICEcoder.getcMInstance().undo()},redo:function(){ICEcoder.getcMInstance().redo()},
|
||||
indent:function(a){var b;b=ICEcoder.getcMInstance();"more"==a?top.ICEcoder.content.contentWindow.CodeMirror.commands.indentMore(b):top.ICEcoder.content.contentWindow.CodeMirror.commands.indentLess(b)},moveLines:function(a){var b,c,d,e,f;b=top.ICEcoder.getcMInstance();c=b.getCursor("start");d=b.getCursor("end");"up"==a&&0<c.line&&(e=c.line-1);"down"==a&&d.line<b.lineCount()-1&&(e=d.line+1);isNaN(e)||(f=b.getLine(e),b.operation(function(){if("up"==a)for(var e=c.line;e<=d.line;e++)b.replaceRange(b.getLine(e),
|
||||
{line:e-1,ch:0},{line:e-1,ch:1E6});else for(e=d.line;e>=c.line;e--)b.replaceRange(b.getLine(e),{line:e+1,ch:0},{line:e+1,ch:1E6});b.replaceRange(f,{line:"up"==a?d.line:c.line,ch:0},{line:"up"==a?d.line:c.line,ch:1E6});b.setSelection({line:c.line+("up"==a?-1:1),ch:c.ch},{line:d.line+("up"==a?-1:1),ch:d.ch})}))},highlightLine:function(a){var b;b=top.ICEcoder.getcMInstance();b.setSelection({line:a,ch:0},{line:a,ch:b.lineInfo(a).text.length})},focus:function(){var a;/iPhone|iPad|iPod/i.test(navigator.userAgent)||
|
||||
(a=top.ICEcoder.getcMInstance())&&a.focus()},goToLine:function(a){ICEcoder.getcMInstance().setCursor(a?a-1:top.get("goToLineNo").value-1);top.ICEcoder.focus();return!1},lineCommentToggle:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().ch;c=a.getCursor().line;d=a.getLine(c);ICEcoder.lineCommentToggleSub(a,b,c,d,d.length,2)},highlightBlock:function(a,b){var c,d,e,f;c=top.ICEcoder.getcMInstance();if(b)top.ICEcoder.dontUpdateNest?c.setCursor(top.ICEcoder.cursorOrigLine,top.ICEcoder.cursorOrigCh):
|
||||
top.ICEcoder.getNestLocation("updateNestDisplay"),top.ICEcoder.dontUpdateNest=!1;else{top.ICEcoder.cursorOrigCh=c.getCursor().ch;top.ICEcoder.cursorOrigLine=c.getCursor().line;top.ICEcoder.dontUpdateNest=!0;d={};d.ch=c.getCursor().ch;d.line=c.getCursor().line;for(var g=top.ICEcoder.htmlTagArray.length-1;g>=a;g--)e=c.getSearchCursor("<"+top.ICEcoder.htmlTagArray[g],d),e.findPrevious(),d.ch=e.from().ch,d.line=e.from().line,g==a&&(f=c.getSearchCursor(">",d),f.findNext(),c.setCursor(f.from().line,f.from().ch+
|
||||
1),top.ICEcoder.getNestLocation(),ICEcoder.htmlTagArray.length-1!=a&&g++);e.from()&&(d={},top.ICEcoder.startPosLine=d.line=e.from().line,top.ICEcoder.startPosCh=d.ch=e.from().ch,e={},e.line=top.ICEcoder.content.contentWindow.CodeMirror.fold.xml(c,d)||d.line,e.line=e.line.to?e.line.to.line:e.line,e.ch=c.getLine(e.line).indexOf("</"+top.ICEcoder.htmlTagArray[a]+">")+top.ICEcoder.htmlTagArray[a].length+3,top.ICEcoder.dontSelect?top.ICEcoder.dontSelect=!1:c.setSelection(d,e),c.scrollIntoView(d))}},setPosition:function(a,
|
||||
b,c){var d;d=ICEcoder.getcMInstance();c=d.getLine(b).indexOf(">",d.getLine(b).indexOf("<"+c))+1;d.setCursor(b,c);top.ICEcoder.focus();for(d=b=0;d<=a;d++)b=ICEcoder.nestDisplay.innerHTML.indexOf(">",b+1);ICEcoder.nestDisplay.innerHTML=ICEcoder.nestDisplay.innerHTML.substr(0,b).replace(/<(?:.|\n)*?>/gm,"");top.ICEcoder.dontUpdateNest=!1;top.ICEcoder.dontSelect=!0},tagWrapper:function(a){var b,c,d,e;b=ICEcoder.getcMInstance();c=a;"div"==a?(d=b.getCursor("start").line,e=b.getCursor().line,b.operation(function(){b.replaceSelection("<div>\n"+
|
||||
b.getSelection()+"\n</div>","around");for(var a=d+1;a<=e+1;a++)b.indentLine(a);b.indentLine(e+2,"prev");b.indentLine(e+2,"subtract")})):-1<"p a b i strong em h1 h2 h3 h4 h5 h6".split(" ").indexOf(a)&&b.getSelection().substr(0,a.length+1)=="<"+c&&b.getSelection().substr(-(a.length+3))=="</"+a+">"?b.replaceSelection(b.getSelection().substr(b.getSelection().indexOf(">")+1,b.getSelection().length-b.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(c='a href=""'),b.replaceSelection("<"+c+">"+
|
||||
b.getSelection()+"</"+a+">","around"),"a"==a&&b.setCursor({line:b.getCursor("start").line,ch:b.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.replaceRange(b.getLine(a)+"<br>",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.operation(function(){b.replaceRange("\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6});b.setCursor({line:b.getCursor().line-1,ch:0});b.execCommand("indentAuto")})},
|
||||
insertLineAfter:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.operation(function(){b.replaceRange(b.getLine(a)+"\n",{line:a,ch:0},{line:a,ch:1E6});b.execCommand("indentAuto")})},duplicateLines:function(a){var b,c,d;b=ICEcoder.getcMInstance();!a&&b.somethingSelected()?(c=b.getCursor("start"),d=b.getCursor("end"),a=c.line!=d.line&&d.ch==b.getLine(d.line).length?"\n":"",b.replaceSelection(b.getSelection()+a+b.getSelection(),"end"),b.setSelection(c,d)):(a||(a=b.getCursor().line),
|
||||
c=b.getCursor().ch,b.replaceRange(b.getLine(a)+"\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6}),b.setCursor(a+1,c))},removeLines:function(a){var b,c;b=ICEcoder.getcMInstance();!a&&b.somethingSelected()?b.replaceSelection("","end"):(a||(a=b.getCursor().line),c=b.getCursor().ch,b.execCommand("deleteLine"),b.setCursor(a-1,c))},jumpToDefinition:function(){var a,b;a=ICEcoder.getcMInstance();b=a.getTokenAt(a.getCursor()).string;if(a.somethingSelected()&&top.ICEcoder.origCurorPos)a.setCursor(top.ICEcoder.origCurorPos);
|
||||
else for(top.ICEcoder.origCurorPos=a.getCursor(),a=["var "+b,"function "+b,b+"=function",b+"= function",b+" =function",b+" = function",b+"=new function",b+"= new function",b+" =new function",b+" = new function","window['"+b+"']",'window["'+b+'"]',"this['"+b+"']",'this["'+b+'"]',b+":",b+" :","def "+b,"class "+b],b=0;b<a.length&&!top.ICEcoder.findReplace(a[b],!1,!1);b++);},autocomplete:function(){var a;a=ICEcoder.getcMInstance();top.ICEcoder.content.contentWindow.CodeMirror.commands.autocomplete(a)},
|
||||
pasteURL:function(a){var b;b=ICEcoder.getcMInstance();"CTRL"==top.ICEcoder.draggingWithKey&&(a=window.location.protocol+"//"+window.location.hostname+a);b.replaceSelection(a,"around")},searchForSelected:function(){if(top.ICEcoder.caretLocType)if(""!=top.ICEcoder.getcMInstance().getSelection()){var a=top.ICEcoder.caretLocType.toLowerCase()+" ";"Content"==top.ICEcoder.caretLocType&&(a="");window.open("http://www.google.com/#output=search&q="+a+top.ICEcoder.getcMInstance().getSelection())}else top.ICEcoder.message("No text selected to search on")},
|
||||
openCloseDir:function(a,b){var c,d;a.onclick=function(a){a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.openCloseDir(this,!1)};c=a.parentNode;c.nextSibling&&(c=c.nextSibling);c&&"UL"==c.tagName&&((d="none"==c.style.display)?b=!0:c.style.display="none",a.parentNode.className=a.className=d?"pft-directory dirOpen":"pft-directory");b&&(top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/get-branch.php?location="+a.childNodes[1].id+"&csrf="+top.ICEcoder.csrf);return!1},overFileFolder:function(a,
|
||||
b){ICEcoder.thisFileFolderType=a;ICEcoder.thisFileFolderLink=b},selectFileFolder:function(a){var b,c,d,e,f;if(""==top.ICEcoder.thisFileFolderLink)a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink)if(c=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),b=ICEcoder.filesFrame.contentWindow.document.getElementById(c),a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(c)?(ICEcoder.selectDeselectFile("deselect",b),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(c),
|
||||
1)):(ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(c));else if(a.shiftKey){a=!1;d=b.parentNode.parentNode.parentNode;e=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];var g=function(a,b,c,d){return("00000000000000000000"+a).substr(-20)};f=c.replace(/\d+/g,g)<e.replace(/\d+/g,g)?c:e;e=c.replace(/\d+/g,g)>e.replace(/\d+/g,g)?c:e;if(0<top.ICEcoder.selectedFiles.length&&f.substr(0,f.lastIndexOf("|"))==e.substr(0,e.lastIndexOf("|")))for(c=0;1E6>c&&("LI"!=d.childNodes[c].nodeName&&
|
||||
c++,b=d.childNodes[c].childNodes[0].childNodes[1],b.id==f&&(a=!0),!0==a&&-1==top.ICEcoder.selectedFiles.indexOf(b.id)&&(ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(b.id)),b.id!=e);c+=2);else ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(c)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(c);document.findAndReplace.target[2].innerHTML=top.ICEcoder.selectedFiles[0]?"selected files":"all files";
|
||||
document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?"selected filenames":"all filenames";top.ICEcoder.hideFileMenu()},deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selectedFiles[b]),ICEcoder.selectDeselectFile("deselect",a);top.ICEcoder.selectedFiles.length=0},selectDeselectFile:function(a,b){var c;b&&(c=-1<top.ICEcoder.openFiles.indexOf(b.id.replace(/\|/g,"/"))?!0:
|
||||
!1,top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]==b.id.replace(/\|/g,"/")?b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:top.ICEcoder.tabBGcurrent:b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile)},newFile:function(){top.ICEcoder.newTab();top.ICEcoder.saveFile()},newFolder:function(){var a,b;a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
|
||||
1].replace(/\|/g,"/");if(b=top.ICEcoder.getInput("Enter new folder name at "+a,""))b=(a+"/"+b).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=newFolder&file="+b.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>Creating Folder</b><br>"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType="file");"/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)?
|
||||
top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message("Sorry, you can only have 100 files open at a time!"),b=!1),b&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+
|
||||
top.ICEcoder.thisFileFolderLink+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>Opening File</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab(),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b<a.length;b++)top.ICEcoder.thisFileFolderLink=a[b].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},openPrompt:function(){var a;if(a=top.ICEcoder.getInput("Enter relative file path (prefixed with /) or remote URL",""))-1<a.indexOf("://")?
|
||||
top.ICEcoder.getRemoteFile(a):top.ICEcoder.openFile(a)},getRemoteFile:function(a){top.ICEcoder.serverQueue("add","lib/file-control.php?action=getRemoteFile&file="+a+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>Getting</b><br>"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0<top.ICEcoder.selectedFiles.length&&(c=top.ICEcoder.selectedFiles[0],b=-1==c.lastIndexOf(".")||c.lastIndexOf(".")<
|
||||
c.lastIndexOf("|")?c+b:"|[NEW]");b=b.replace("||","|");top.ICEcoder.serverQueue("add","lib/file-control.php?action=save&file="+b+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+a+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>Saving</b><br>"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){var c,d;a?c=a.replace(/\|/g,"/"):(c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
|
||||
1].replace(/\|/g,"/"));b||(b=top.ICEcoder.getInput("Please enter the new name for",c));b&&(d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,"/")),-1<d&&(top.ICEcoder.openFiles[d]=b,closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>',
|
||||
c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+b+"&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>Renaming to</b><br>"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1<d&&(top.ICEcoder.openFiles[d]=
|
||||
b,closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=
|
||||
b),top.ICEcoder.serverQueue("add","lib/file-control.php?action=move&file="+b+"&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>Moving to</b><br>"+b),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a=a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0<a.length&&top.ICEcoder.ask("Delete:\n\n"+b+"?")&&(top.ICEcoder.serverQueue("add","lib/file-control.php?action=delete&file="+a.join(";")+"&csrf="+top.ICEcoder.csrf),
|
||||
top.ICEcoder.serverMessage("<b>Deleting File</b><br>"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d<a.length;d++)top.ICEcoder.copiedFiles[d]=a[d];b||(top.get("fmMenuPasteOption").style.display="block");c||top.ICEcoder.hideFileMenu()},pasteFiles:function(a){if(top.ICEcoder.copiedFiles)for(var b=0;b<top.ICEcoder.copiedFiles.length;b++)"|"!=top.ICEcoder.copiedFiles[b]?(top.ICEcoder.serverQueue("add","lib/file-control.php?action=paste&file="+top.ICEcoder.copiedFiles[b]+"&location="+
|
||||
a+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>Pasting File</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message("Sorry, cannot paste a whole root");else top.ICEcoder.message("Nothing to paste, copy a file/folder first!")},duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=
|
||||
typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsRemote","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;a<c.length;a++)top.ICEcoder.showHide("hide",
|
||||
top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d<c.length;d++)top.ICEcoder.showHide("hide",top.get(c[d])),top.get(c[d]+"Nav").style.color="";get("fileOptions").style.opacity=0;"show"==a&&("undefined"!=typeof fileNavInt&&clearTimeout(fileNavInt),top.ICEcoder.showHide(a,top.get(b)),top.get(b+"Nav").style.color="#fff",get("fileOptions").style.opacity=1)},showMenu:function(a){var b,c;0!=top.ICEcoder.selectedFiles.length&&-1!=top.ICEcoder.selectedFiles.indexOf(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
|
||||
1].replace(/\//g,"|"))||top.ICEcoder.selectFileFolder(a);a=129;c=window.innerHeight;"undefined"!=typeof top.ICEcoder.thisFileFolderLink&&""!=top.ICEcoder.thisFileFolderLink&&(b=-1<top.ICEcoder.selectedFiles[0].indexOf(".")?"file":"folder",top.get("folderMenuItems").style.display="folder"==b&&1==top.ICEcoder.selectedFiles.length?"block":"none","folder"==b&&1==top.ICEcoder.selectedFiles.length&&(a+=67,"block"==top.get("fmMenuPasteOption").style.display&&(a+=19)),top.get("singleFileMenuItems").style.display=
|
||||
1<top.ICEcoder.selectedFiles.length?"none":"block",1==top.ICEcoder.selectedFiles.length&&(a+=43),top.get("fileMenu").style.display="inline-block",setTimeout(function(){top.get("fileMenu").style.opacity="1"},4),top.get("fileMenu").style.left=top.ICEcoder.mouseX+20+"px",b=top.ICEcoder.mouseY-top.ICEcoder.filesFrame.contentWindow.document.body.scrollTop-10,b+a>c&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity=
|
||||
"1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,e,f,g){var m,h,k,n,p,l,r;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){m="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?664:705;b||(b="/");b=b.replace(top.iceRoot,"");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,
|
||||
"|"));k=h.parentNode.parentNode.nextSibling;n=document.createTextNode("\n");p='<a nohref title="'+b.replace(/\/$/,"")+"/"+c+'" onMouseOver="top.ICEcoder.overFileFolder(\''+g+"','"+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+"')\" onMouseOut=\"top.ICEcoder.overFileFolder('"+g+'\',\'\')" style="position: relative; left:-22px"> <span id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'">'+c+'</span> <span style="color: #888; font-size: 8px" id="'+b.replace(/\/$/,
|
||||
"").replace(/\//g,"|")+"|"+c+'_perms">'+d+"</span></a>";if(3>k.childNodes.length)l=document.createElement("ul"),k=h.parentNode.parentNode,k.parentNode.insertBefore(l,k.nextSibling),l=document.createElement("li"),l.className=m,l.draggable=!0,l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()},l.ondragend=function(){top.ICEcoder.dropFile(this)},l.innerHTML=p,k.nextSibling.appendChild(l),k.nextSibling.appendChild(n);else for(h=
|
||||
0;h<k.childNodes.length;h++)if(k.childNodes[h].className&&(l=0<k.childNodes[h].className.indexOf("directory")?"folder":"file",r=k.childNodes[h].getElementsByTagName("span")[0].innerHTML,l==g&&r>c||"folder"==g&&"file"==l||h==k.childNodes.length-1)){l=document.createElement("li");l.className=m;l.draggable=!0;l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()};l.ondragend=function(){top.ICEcoder.dropFile(this)};l.innerHTML=p;h==
|
||||
k.childNodes.length-1?(k.appendChild(l),k.appendChild(n)):(k.insertBefore(l,k.childNodes[h]),k.insertBefore(n,k.childNodes[h+1]));break}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id=
|
||||
b.replace(/\//g,"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",e.substr(0,e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.innerHTML=d);"delete"==a&&(h=top.get("filesFrame").contentWindow.document.getElementById((""==top.iceRoot?b.replace(/\/$/,"").replace(/\//g,
|
||||
"|"):"")+"|"+c).parentNode.parentNode,top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.src="files.php";top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=function(){top.ICEcoder.filesFrame.style.opacity="1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b;b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;
|
||||
if(224==b||91==b||93==b)top.ICEcoder.cmdKey=!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},dropFile:function(a){var b,c;b=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=b.substr(b.lastIndexOf("/")+1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(b);"files"==top.ICEcoder.area&&setTimeout(function(){c="folder"==ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==
|
||||
top.ICEcoder.draggingWithKey?(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(c)):top.ICEcoder.moveFile(b,c.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1},findReplaceOptions:function(){top.get("rText").style.display=top.get("replace").style.display=top.get("rTarget").style.display="and"==document.findAndReplace.connector.value?"inline-block":"none"},findReplace:function(a,b,c){var d,e,f;d=a.toLowerCase();e=top.get("replace").value;f=top.get("results");if((a=
|
||||
ICEcoder.getcMInstance())&&0<d.length&&"this document"==document.findAndReplace.target.value){a.getValue().toLowerCase();"and"==document.findAndReplace.connector.value&&c&&("replace"==document.findAndReplace.replaceAction.value&&a.getSelection().toLowerCase()==d?a.replaceSelection(e,"around"):"replace all"==document.findAndReplace.replaceAction.value&&(c=new RegExp(d,"gi"),a.setValue(a.getValue().replace(c,e))));c=a.getValue().toLowerCase();if(!top.ICEcoder.findMode||d!=top.ICEcoder.lastsearch){ICEcoder.results=
|
||||
[];ICEcoder.resultsLines=[];for(e=0;e<c.length;e++)c.substr(e,d.length)==d&&-1==ICEcoder.results.indexOf(e)&&(ICEcoder.results.push(e),-1==ICEcoder.resultsLines.indexOf(a.posFromIndex(e).line+1)&&ICEcoder.resultsLines.push(a.posFromIndex(e).line+1));ICEcoder.lastsearch=d}if(0<ICEcoder.results.length){c=a.getScrollInfo().height>a.getScrollInfo().clientHeight;if(b)f.innerHTML=ICEcoder.results.length+" results";else{for(e=ICEcoder.findResult=0;e<ICEcoder.results.length;e++)ICEcoder.results[e]<a.indexFromPos(a.getCursor())&&
|
||||
ICEcoder.findResult++;ICEcoder.findResult>ICEcoder.results.length-1&&(ICEcoder.findResult=0);f.innerHTML="Highlighted result "+(ICEcoder.findResult+1)+" of "+ICEcoder.results.length+" results";b=a.getSearchCursor(d,a.getCursor(),!0);b.findNext();b.from()||(b=a.getSearchCursor(d,{line:0,ch:0},!0),b.findNext());a.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}d=c?parseInt(top.ICEcoder.content.style.height,10)/a.lineCount():a.defaultTextHeight();b=c?0:a.heightAtLine(0);top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=
|
||||
c?"17px":"0";f="";for(e=1;e<=a.lineCount();e++)c=-1<ICEcoder.resultsLines.indexOf(e)?a.getCursor().line+1==e?"#b00":"#888":"transparent",f+='<div style="position: absolute; display: block; width: 5px; height:'+d+"px; background: "+c+"; top: "+parseInt(d*(e-1)+b,10)+'px"></div>';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=f;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="inline-block";return!0}f.innerHTML="No results";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=
|
||||
"";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none";return!1}""!=d&&c?(f=b=a="","and"==document.findAndReplace.connector.value&&(a="&replace="+e),0<=document.findAndReplace.target.value.indexOf("file")&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),"selected files"==document.findAndReplace.target.value&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),d=d.replace(/\'/g,"'"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):
|
||||
d,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+d+a+b+f+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add",
|
||||
"lib/file-control.php?action=replaceText&fileRef="+a.replace(/\//g,"|")+"&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>Replacing text in</b><br>"+a)},getNestLocation:function(a){var b,c,d;if(b=ICEcoder.getcMInstance()){c=b.getValue();b=b.getTokenAt(b.getCursor()).state;d=!1;"undefined"!=typeof b&&(d=b.context);"undefined"!=typeof b.curState&&"undefined"!=typeof b.curState.htmlState&&(d=b.curState.htmlState.context);ICEcoder.htmlTagArray=[];if(d)for(;d;d=d.prev)"undefined"!=
|
||||
typeof d.tagName&&ICEcoder.htmlTagArray.unshift(d.tagName);ICEcoder.tagString=ICEcoder.htmlTagArray[ICEcoder.htmlTagArray.length-1];"JavaScript"==ICEcoder.caretLocType&&(ICEcoder.tagString="script");a&&!top.ICEcoder.dontUpdateNest&&(ICEcoder.nestDisplay.innerHTML="","undefined"!=typeof ICEcoder.openFiles[ICEcoder.selectedTab-1]&&(a=ICEcoder.openFiles[ICEcoder.selectedTab-1],ICEcoder.getNestLocationSub(c,a)))}},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().line;
|
||||
c=a.getCursor().ch;for(var e=d=0;e<b;e++)d+=a.getLine(e).length+1;ICEcoder.caretPos=d+c-1;ICEcoder.getNestLocation("yes")},updateCharDisplay:function(){var a;a=ICEcoder.getcMInstance();ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateByteDisplay:function(){ICEcoder.byteDisplay.innerHTML=ICEcoder.getcMInstance().getValue().length.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" bytes"},showDisplay:function(a){top.ICEcoder.byteDisplay.style.display=
|
||||
"byte"==a?"inline-block":"none";top.ICEcoder.charDisplay.style.display="char"==a?"inline-block":"none"},showHide:function(a,b){b.style.visibility="show"==a?"visible":"hidden"},getcMInstance:function(a){return top.ICEcoder.content.contentWindow[isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1]:"cM1":"cM"+ICEcoder.cMInstances[a-1]]},getMouseXY:function(a,b){top.ICEcoder.mouseX=a.pageX?a.pageX:a.clientX+document.body.scrollLeft;top.ICEcoder.mouseY=
|
||||
a.pageY?a.pageY:a.clientY+document.body.scrollTop;top.ICEcoder.area=b;"top"!=b&&(top.ICEcoder.mouseY+=70);"editor"==b&&(top.ICEcoder.mouseX+=top.ICEcoder.filesW);top.ICEcoder.dragCursorTest();62<top.ICEcoder.mouseY&&top.ICEcoder.setTabWidths()},dragCursorTest:function(){var a,b;a=top.ICEcoder.mouseX-top.ICEcoder.diffStartX;!1!==top.ICEcoder.draggingTab&&top.ICEcoder.diffStartX&&(-10>=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-
|
||||
parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX<top.ICEcoder.filesW+7||top.ICEcoder.draggingFilesW)?"w-resize":"auto",top.ICEcoder.content.contentWindow.document&&top.ICEcoder.filesFrame.contentWindow)){top.document.body.style.cursor=a;if(b=top.ICEcoder.content.contentWindow.document.body)b.style.cursor=
|
||||
a;if(b=top.ICEcoder.filesFrame.contentWindow.document.body)b.style.cursor=a}},serverMessage:function(a){var b;b=top.get("serverMessage");a?(b.innerHTML=top.ICEcoder.xssClean(a).replace(/\<b\>/g,"<b>").replace(/\<\/b\>/g,"</b>").replace(/\<br\>/g,"<br>"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,b,c,d;if(a=ICEcoder.getcMInstance()){b=a.getLine(a.getCursor().line);for(c=/(#[\da-f]{3}(?:[\da-f]{3})?\b|\b(?:rgb|hsl)a?\([\s\d%,.-]+\)|\b[a-z]+\b)/gi;(d=
|
||||
c.exec(b))&&a.getCursor().ch>d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&
|
||||
(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<div id="picker" class="picker"></div><br><br><input type="text" id="color" name="color" value="#000" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'color\').value)" value="insert >" class="insertColorValue"><br><input type="text" id="colorRGB" name="colorRGB" value="rgb(0,0,0)" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'colorRGB\').value)" value="insert >" class="insertColorValue">';
|
||||
farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,e,f,g,m,h,k,n,p;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;e=a.pageY-this.offsetTop;f=b.getImageData(d,e,1,1).data;g=f[0];m=f[1];h=f[2];k=g+","+m+","+h;n=top.ICEcoder.rgbToHex(g,
|
||||
m,h);top.get("rgbMouseXY").value=k;top.get("hexMouseXY").value="#"+n;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+n;p=128>g||128>m||128>h&&200>g&&200>m&&50<h?"#fff":"#000";top.get("hexMouseXY").style.color=top.get("rgbMouseXY").style.color=p};top.get("canvasPicker").onclick=function(){top.get("rgb").value=top.get("rgbMouseXY").value;top.get("hex").value=top.get("hexMouseXY").value;top.get("hex").style.backgroundColor=top.get("rgb").style.backgroundColor=
|
||||
top.get("hex").value;top.get("hex").style.color=top.get("rgb").style.color=p}},rgbToHex:function(a,b,c){return top.ICEcoder.toHex(a)+top.ICEcoder.toHex(b)+top.ICEcoder.toHex(c)},toHex:function(a){a=parseInt(a,10);if(isNaN(a))return"00";a=Math.max(0,Math.min(a,255));return"0123456789abcdef".charAt((a-a%16)/16)+"0123456789abcdef".charAt(a%16)},insertColorValue:function(a){var b,c;b=ICEcoder.getcMInstance();c=b.getTokenAt(b.getCursor());b.replaceRange(a,{line:b.getCursor().line,ch:c.start},{line:b.getCursor().line,
|
||||
ch:1E6})},fMIconVis:function(a,b){var c;if(c=top.get(a))c.style.opacity=b},isOpen:function(a){a=a.replace(/\|/g,"/").replace(top.docRoot+top.iceRoot,"");a=top.ICEcoder.openFiles.indexOf(a);return-1!=a?a:!1},startPluginIntervals:function(a,b,c,d){-1<b.indexOf("?")&&(b=b+"&csrf="+top.ICEcoder.csrf);top.ICEcoder["plugTimer"+a]=-1<["_parent","_top","_self",""].indexOf(c)?top.ICEcoder["plugTimer"+a]=setInterval("window.location='"+b+"'",6E4*d):0==c.indexOf("fileControl")?top.ICEcoder["plugTimer"+a]=setInterval(function(){top.ICEcoder.serverQueue("add",
|
||||
b);top.ICEcoder.serverMessage(c.split(":")[1])},6E4*d):top.ICEcoder["plugTimer"+a]=setInterval("window.open('"+b+"','"+c+"')",6E4*d);top.ICEcoder.pluginIntervalRefs.push(a)},codeAssistToggle:function(){var a;ICEcoder.getcMInstance();top.ICEcoder.codeAssist=!top.ICEcoder.codeAssist;top.get("codeAssistDisplay").style.backgroundPosition=top.ICEcoder.codeAssist?"0 0":"-16px 0";top.ICEcoder.cssColorPreview();top.ICEcoder.focus();for(i=0;i<top.ICEcoder.cMInstances.length;i++)-1<top.ICEcoder.openFiles[i].indexOf(".js")&&
|
||||
(a=top.ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[i]],top.ICEcoder.codeAssist?a.setOption("lintWith",top.ICEcoder.content.contentWindow.CodeMirror.javascriptValidator):(a.clearGutter("CodeMirror-lint-markers"),a.setOption("lintWith",!1)))},serverQueue:function(a,b){var c,d,e;c=ICEcoder.getcMInstance();for(e=d=0;e<ICEcoder.serverQueueItems.length;e++)0<ICEcoder.serverQueueItems[e].indexOf("action=save")&&d++;d++;if("add"==a)ICEcoder.serverQueueItems.push(b),0<b.indexOf("action=save")&&
|
||||
(e=document.createElement("textarea"),e.setAttribute("id","saveTemp"+d),document.body.appendChild(e),top.get("saveTemp"+d).value=c.getValue());else if("del"==a){if(ICEcoder.serverQueueItems[0]&&0<ICEcoder.serverQueueItems[0].indexOf("action=save")){c=d-1;for(e=1;e<c;e++)top.get("saveTemp"+e).value=top.get("saveTemp"+(e+1)).value;c=top.get("saveTemp"+c);c.parentNode.removeChild(c)}ICEcoder.serverQueueItems.splice(0,1)}("del"==a&&1<=ICEcoder.serverQueueItems.length||1==ICEcoder.serverQueueItems.length)&&
|
||||
setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href=ICEcoder.serverQueueItems[0]},1)},cancelAllActions:function(){window.stop();0<ICEcoder.serverQueueItems.length&&ICEcoder.serverQueueItems.splice(1,ICEcoder.serverQueueItems.length);top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.serverMessage('<b style="color: #d00">Cancelled tasks</b>');setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,
|
||||
"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g,"").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a+"&csrf="+top.ICEcoder.csrf)},autoOpenFiles:function(){if(0<top.ICEcoder.previousFiles.length&&top.ICEcoder.ask("Open previous files?\n\n"+top.ICEcoder.previousFiles.length+" files:\n"+top.ICEcoder.previousFiles.join("\n").replace(/\|/g,"/").replace(new RegExp(top.docRoot+top.iceRoot,"gi"),"")))for(var a=0;a<top.ICEcoder.previousFiles.length;a++)top.ICEcoder.thisFileFolderLink=
|
||||
top.ICEcoder.previousFiles[a].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},settingsScreen:function(a){a||(top.get("mediaContainer").innerHTML='<iframe src="lib/settings-screen.php" class="whiteGlow" style="width: 970px; height: 610px"></iframe>');top.ICEcoder.showHide(a?"hide":"show",top.get("blackMask"))},helpScreen:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/help.php" class="whiteGlow" style="width: 840px; height: 500px"></iframe>';top.ICEcoder.showHide("show",
|
||||
top.get("blackMask"))},showManual:function(a,b){var c;c=b?"#"+b:"";top.get("mediaContainer").innerHTML='<iframe src="https://icecoder.net/manual?version='+a+c+'" class="whiteGlow" style="width: 800px; height: 470px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/properties.php?fileName='+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';
|
||||
top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},githubManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/github-manager.php" class="whiteGlow" style="width: 660px; height: 450px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},githubDiffToggle:function(){var a;
|
||||
if(top.ICEcoder.githubDiff||top.ICEcoder.ask("This will compare and show a diff view between your local dir and the repo. OK?"))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff?"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf;alert("This is a work in progress, unfinished at present and due for an ICEcoder v4.2 release. Currently ~40% done.")},useNewSettings:function(a,b,c,d,e,f,g,m,h,k,n,p,l,r,s){var q;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+
|
||||
1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");q=document.createElement("link");q.setAttribute("rel","stylesheet");q.setAttribute("type","text/css");q.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q);a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&&
|
||||
(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize=g;c[b][4].style["border-left-width"]=f?"1px":"0";c[b][4].style["margin-left"]=f?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=m;top.ICEcoder.indentWithTabs=
|
||||
h;top.ICEcoder.indentSize=k;for(f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("tabSize",top.ICEcoder.indentSize);
|
||||
d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);e!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=e);top.get("plugins").style.left="left"==n?"0":"auto";top.get("plugins").style.right="right"==n?"0":"auto";top.ICEcoder.bugFilePaths=p;top.ICEcoder.bugFileCheckTimer=l;top.ICEcoder.bugFileMaxLines=r;""!=top.ICEcoder.bugFilePaths[0]?top.ICEcoder.startBugChecking():"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt);s&&top.ICEcoder.refreshFileManager()},
|
||||
updateResultsDisplay:function(a){ICEcoder.findReplace(top.get("find").value,!0,!1);top.get("results").style.display="show"==a?"inline-block":"none"},fullScreenSwitcher:function(){"undefined"!=typeof document.cancelFullScreen?document.fullScreen?document.cancelFullScreen():document.body.requestFullScreen():"undefined"!=typeof document.mozCancelFullScreen?document.mozFullScreen?document.mozCancelFullScreen():document.body.mozRequestFullScreen():"undefined"!=typeof document.webkitCancelFullScreen&&(document.webkitIsFullScreen?
|
||||
document.webkitCancelFullScreen():document.body.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))},zipIt:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="plugins/zip-it/index.php?zip="+a+"&csrf="+top.ICEcoder.csrf},downloadFile:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/download.php?file="+a+"&csrf="+top.ICEcoder.csrf},chmod:function(a,b){a=a.replace(top.iceRoot,"");top.ICEcoder.showHide("hide",
|
||||
top.get("blackMask"));top.ICEcoder.serverQueue("add","lib/file-control.php?action=perms&file="+a+"&perms="+b+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>chMod "+b+" on </b><br>"+a)},openPreviewWindow:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c;b=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];c=b.substr(b.lastIndexOf("/")+1);c=c.substr(c.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();top.ICEcoder.previewWindow=window.open(b,"previewWindow");-1<["md"].indexOf(c)?top.ICEcoder.previewWindow.onload=
|
||||
function(){top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())}:top.ICEcoder.previewWindow.onload=function(){try{top.ICEcoder.doPesticide()}catch(a){}}}},logout:function(){window.location=window.location+"?logout&csrf="+top.ICEcoder.csrf},message:function(a){alert(a)},ask:function(a){return confirm(a)},getInput:function(a,b){return prompt(a,b)},dataMessage:function(a){var b;b=top.ICEcoder.content.contentWindow.document.getElementById("dataMessage");b.style.display="block";
|
||||
b.innerHTML=a},update:function(){confirm("Updating is currently an experimental feature. While it should work fine, please note there may be issues here, plus the following isn't yet part of this:\n\n- Settings not ported to new version\n- Plugins not ported to new version\n- Any mods you've made not ported to new version\n\nIf you have write access on the whole of ICEcoder (ie, running locally) it should work fine. If tho you need to recover ICEcoder for any reason, you'll find this current version in its tmp dir.\n\nClick OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually")?
|
||||
(top.ICEcoder.showHide("show",top.get("loadingMask")),window.location="lib/updater.php"):window.open("https://icecoder.net")},xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}return null},openBugReport:function(){var a;
|
||||
"off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message("You can start bug reporting in Help > Settings");"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message("Error: can't find/access the error file paths");"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message("No new errors found");"bugs"==top.ICEcoder.bugReportStatus&&(a=top.ICEcoder.openFiles.indexOf(top.ICEcoder.bugReportPath.replace(/\|/g,"/")),-1<a&&top.ICEcoder.closeTab(a+1,"dontSetPV","dontAsk"),top.ICEcoder.openFile(top.ICEcoder.bugReportPath),
|
||||
top.ICEcoder.bugFilesSizesSeen=top.ICEcoder.bugFilesSizesActual)},startBugChecking:function(){var a;0!==top.ICEcoder.bugFileCheckTimer?("undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt),top.ICEcoder.bugFilesSizesSeen=[],top.ICEcoder.bugFileCheckInt=setInterval(function(){a="lib/bug-files-check.php?";a+="files="+(""!==top.ICEcoder.bugFilePaths[0]?top.ICEcoder.bugFilePaths.join():"null").replace(/\//g,"|");a+="&filesSizesSeen=";if(top.ICEcoder.bugFilesSizesSeen.length!=
|
||||
top.ICEcoder.bugFilePaths.length)for(var b=0;b<top.ICEcoder.bugFilePaths.length;b++)top.ICEcoder.bugFilesSizesSeen[b]="null";a+=top.ICEcoder.bugFilesSizesSeen.join();a+="&maxLines="+top.ICEcoder.bugFileMaxLines;a+="&csrf="+top.ICEcoder.csrf;var c=top.ICEcoder.xhrObj();c.onreadystatechange=function(){if(4==c.readyState&&200==c.status){var a=JSON.parse(c.responseText);top.get("bugIcon").style.backgroundPosition="off"==a.result?"0 0":"ok"==a.result?"-32px 0":"bugs"==a.result?"-48px 0":"-16px 0";top.ICEcoder.bugReportStatus=
|
||||
a.result;"null"==top.ICEcoder.bugFilesSizesSeen[0]&&(top.ICEcoder.bugFilesSizesSeen=a.filesSizesSeen);top.ICEcoder.bugFilesSizesActual=a.filesSizesSeen;top.ICEcoder.bugReportPath=a.bugReportPath}};c.open("GET",a,!0);c.send()},parseInt(1E3*top.ICEcoder.bugFileCheckTimer,10)),top.ICEcoder.bugReportStatus="ok"):"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt)},xssClean:function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,
|
||||
""").replace(/'/g,"'")},printCode:function(){var a,b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.filesFrame.contentWindow.frames.fileControl;b.window.document.body.innerHTML="<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre>"+top.ICEcoder.xssClean(a.getValue())+"</pre></body></html>";b.focus();b.print();a.focus()},indicateChanges:function(){var a;if(!top.ICEcoder.loadingFile){a="ICEcoder v "+top.ICEcoder.versionNo;for(var b=1;b<=top.ICEcoder.savedPoints.length;b++)if(top.ICEcoder.savedPoints[b-
|
||||
1]!=top.ICEcoder.getcMInstance(b).changeGeneration()){a+=" \u2744";break}top.document.title=a}},switchTab:function(a,b){var c;ICEcoder.selectedTab=a;if(c=ICEcoder.getcMInstance()){ICEcoder.switchMode();for(var d=0;d<ICEcoder.cMInstances.length;d++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[d]].getWrapperElement().style.display="none";c.setOption("theme",top.ICEcoder.theme);c.getWrapperElement().style.display="block";b||setTimeout(function(){top.ICEcoder.focus()},4);c.refresh();ICEcoder.redoTabHighlight(ICEcoder.selectedTab);
|
||||
top.ICEcoder.findMode=!1;ICEcoder.findReplace(top.get("find").value,!0,!1);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()}},newTab:function(){var a;ICEcoder.cMInstances.push(ICEcoder.nextcMInstance);ICEcoder.selectedTab=ICEcoder.cMInstances.length;ICEcoder.showHide("show",ICEcoder.content);ICEcoder.content.contentWindow.createNewCMInstance(ICEcoder.nextcMInstance);ICEcoder.setLayout();ICEcoder.thisFileFolderType="file";ICEcoder.thisFileFolderLink=
|
||||
"/[NEW]";ICEcoder.openFile();a=ICEcoder.getcMInstance("new");ICEcoder.switchTab(ICEcoder.openFiles.length);a.removeLineClass(ICEcoder["cMActiveLine"+ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]],"background");ICEcoder["cMActiveLine"+ICEcoder.selectedTab]=a.addLineClass(0,"background","cm-s-activeLine");ICEcoder.nextcMInstance++},createNewTab:function(){var a;top.ICEcoder.openFiles.push(top.ICEcoder.shortURL);top.get("tab"+top.ICEcoder.openFiles.length).style.display="inline-block";a=top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-
|
||||
1];top.get("tab"+top.ICEcoder.openFiles.length).innerHTML='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a> '+a.slice(a.lastIndexOf("/")).replace(/\//,"");top.get("tab"+top.ICEcoder.openFiles.length).title="/"+top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-
|
||||
1].replace(/\//,"");top.ICEcoder.setTabWidths();top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);top.ICEcoder.selectedTab=top.ICEcoder.openFiles.length;top.ICEcoder.savedPoints.push(0);top.ICEcoder.setPreviousFiles()},nextTab:function(){top.ICEcoder.switchTab(top.ICEcoder.selectedTab+1<=top.ICEcoder.openFiles.length?top.ICEcoder.selectedTab+1:1,"noFocus")},previousTab:function(){top.ICEcoder.switchTab(1<=top.ICEcoder.selectedTab-1?top.ICEcoder.selectedTab-1:top.ICEcoder.openFiles.length,
|
||||
"noFocus")},renameTab:function(a,b){var c;top.ICEcoder.openFiles[a-1]=b;c=top.ICEcoder.openFiles[a-1];top.get("tab"+a).innerHTML='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a> '+c.slice(c.lastIndexOf("/")).replace(/\//,
|
||||
"");top.get("tab"+a).title="/"+top.ICEcoder.openFiles[a-1].replace(/\//,"")},redoTabHighlight:function(a){for(var b,c,d=1;d<=ICEcoder.savedPoints.length;d++)top.get("tab"+d).childNodes[0]&&(top.get("tab"+d).childNodes[0].childNodes[0].style.backgroundColor=ICEcoder.savedPoints[d-1]!=top.ICEcoder.getcMInstance(d).changeGeneration()?"#b00":"transparent"),b=d==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalTab,"undefined"!=typeof top.ICEcoder.openFiles[d-1]&&"/[NEW]"!=top.ICEcoder.openFiles[d-
|
||||
1]&&(c=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.openFiles[d-1].replace(/\//g,"|")))&&(c.style.backgroundColor=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen,c.style.color=d==a?top.ICEcoder.tabFGcurrent:top.ICEcoder.tabFGopenFile),top.get("tab"+d).style.color=b,top.get("tab"+d).style.background=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen},closeTab:function(a,b,c){var d;a||(a=top.ICEcoder.selectedTab);ICEcoder.getcMInstance();d=!0;c||ICEcoder.savedPoints[a-
|
||||
1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask("You have made changes.\n\nAre you sure you want to close without saving?"));if(d){c=top.ICEcoder.openFiles[a-1];for(d=a;d<ICEcoder.openFiles.length;d++)top.get("tab"+d).innerHTML=top.get("tab"+(d+1)).innerHTML,top.get("tab"+d).title=top.get("tab"+(d+1)).title,ICEcoder.openFiles[d-1]=ICEcoder.openFiles[d],ICEcoder.openFileMDTs[d-1]=ICEcoder.openFileMDTs[d];ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[a-1]].getWrapperElement().style.display=
|
||||
"none";top.ICEcoder.cMInstances.splice(a-1,1);top.get("tab"+ICEcoder.openFiles.length).style.display="none";top.get("tab"+ICEcoder.openFiles.length).innerHTML="";top.get("tab"+ICEcoder.openFiles.length).title="";ICEcoder.openFiles.pop();ICEcoder.openFileMDTs.pop();ICEcoder.selectedTab==a&&(0<ICEcoder.openFiles.length?ICEcoder.selectedTab-=1:ICEcoder.selectedTab=0);0<ICEcoder.openFiles.length&&0==ICEcoder.selectedTab&&(ICEcoder.selectedTab=1);0==ICEcoder.openFiles.length?top.ICEcoder.fMIconVis("fMView",
|
||||
.3):(ICEcoder.switchMode(),ICEcoder.switchTab(ICEcoder.selectedTab));top.ICEcoder.savedPoints.splice(a-1,1);top.ICEcoder.redoTabHighlight(ICEcoder.selectedTab);top.ICEcoder.getNestLocation("update");top.ICEcoder.selectDeselectFile("deselect",top.ICEcoder.filesFrame.contentWindow.document.getElementById(c.replace(/\//g,"|")));b||top.ICEcoder.setPreviousFiles();top.ICEcoder.indicateChanges()}top.ICEcoder.canSwitchTabs=!1;top.ICEcoder.setTabWidths("posOnlyNewTab");setTimeout(function(){top.ICEcoder.canSwitchTabs=
|
||||
!0},100)},closeAllTabs:function(){if(0<top.ICEcoder.cMInstances.length&&ICEcoder.ask("Close all tabs?"))for(var a=top.ICEcoder.cMInstances.length;0<a;a--)top.ICEcoder.closeTab(a,1<a?!0:!1);top.ICEcoder.indicateChanges()},setTabWidths:function(a){var b,c,d,e,f;if(top.ICEcoder.ready){b=parseInt(top.ICEcoder.content.style.width,10)-53-22-10;c=b/top.ICEcoder.openFiles.length-18;d=-18;e=53;f=0;top.ICEcoder.tabLeftPos=[];for(var g=0;g<top.ICEcoder.openFiles.length;g++)a&&(g=top.ICEcoder.openFiles.length),
|
||||
d=168*top.ICEcoder.openFiles.length>b?parseInt(c*g,10)-parseInt(c*(g-1),10):150,e=0==g?53:parseInt(top.get("tab"+g).style.left,10),f=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=e+f+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(e+f);top.get("newTab").style.left=e+f+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX=top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart=(top.ICEcoder.mouseX-
|
||||
(parseInt(top.ICEcoder.files.style.width,10)+53+18))%150;top.get("tab"+a).style.zIndex=2;for(var b=1;b<=top.ICEcoder.openFiles.length;b++)top.get("tab"+b).className=b!==a?"tab tabSlide":"tab tabDrag"},tabDragMove:function(){var a,b;a=parseInt(top.get("tab"+top.ICEcoder.openFiles.length).style.width,10)+18;top.ICEcoder.thisLeft=a=53<=top.ICEcoder.tabDragMouseX?top.ICEcoder.tabDragMouseX<=parseInt(top.get("newTab").style.left,10)-a?top.ICEcoder.tabDragMouseX:parseInt(top.get("newTab").style.left,10)-
|
||||
a:53;top.get("tab"+top.ICEcoder.draggingTab).style.left=a+"px";top.ICEcoder.dragTabNo=top.ICEcoder.draggingTab;for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.get("tab"+c).style.opacity=c==top.ICEcoder.draggingTab?1:.5,b=top.ICEcoder.tabLeftPos[c]?top.ICEcoder.tabLeftPos[c]-top.ICEcoder.tabLeftPos[c-1]:b,c!=top.ICEcoder.draggingTab&&(c<top.ICEcoder.draggingTab?top.get("tab"+c).style.left=a<=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]+b:top.ICEcoder.tabLeftPos[c-1]:top.get("tab"+
|
||||
c).style.left=a>=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top.ICEcoder.tabLeftPos[c-1])},tabDragEnd:function(){var a,b;top.ICEcoder.setTabWidths();for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.ICEcoder.thisLeft>=top.ICEcoder.tabLeftPos[c-1]&&(a=top.ICEcoder.thisLeft==top.ICEcoder.tabLeftPos[0]?1:top.ICEcoder.dragTabNo>c?c+1:c),top.get("tab"+c).className="tab",top.get("tab"+c).style.opacity=1,c!=top.ICEcoder.dragTabNo?top.get("tab"+c).style.zIndex=1:setTimeout(function(){top.get("tab"+
|
||||
c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];c=[[],[],[],[]];for(var e=0;e<b.length;e++){for(var f=0;f<b[e].length;f++)c[e].push(b[e][a[f]-
|
||||
1]);b[e]=c[e]}for(e=0;e<a.length;e++)top.get("tab"+a[e]).id="tab"+(e+1)+".temp",top.ICEcoder.selectedTab==a[e]&&(d=e+1);for(e=0;e<a.length;e++)top.get("tab"+(e+1)+".temp").id="tab"+(e+1);top.get("tab"+d)&&(top.get("tab"+d).className="tab tabSlide");ICEcoder.savedPoints=b[0];ICEcoder.openFiles=b[1];ICEcoder.openFileMDTs=b[2];ICEcoder.cMInstances=b[3];top.ICEcoder.setTabWidths();top.ICEcoder.switchTab(d)},alphaTabs:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c,d,e;a=[];b=[];c=[];for(var f=
|
||||
0;f<top.ICEcoder.openFiles.length;f++)a.push(top.ICEcoder.openFiles[f].slice(top.ICEcoder.openFiles[f].lastIndexOf("/")+1)),b.push(top.ICEcoder.openFiles[f]),top.get("tab"+(f+1)).className="tab tabSlide";for(;0<a.length;){d=a[0];nextValueFull=b[0];for(f=e=0;f<a.length;f++)a[f]<d&&(d=a[f],nextValueFull=top.ICEcoder.openFiles[top.ICEcoder.openFiles.indexOf(b[f])],e=f);c.push(top.ICEcoder.openFiles.indexOf(nextValueFull)+1);a.splice(e,1);b.splice(e,1)}top.ICEcoder.sortTabs(c)}},interceptKeys:function(a,
|
||||
b){var c;c=b.keyCode?b.keyCode:b.which?b.which:b.charCode;if(224==c||91==c||93==c)top.ICEcoder.cmdKey=!0;if(46==c&&"files"==a)return top.ICEcoder.deleteFiles(),!1;if(b.altKey){var d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1;return"content"==a&&("ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d)?68==c?(top.ICEcoder.tagWrapper("div"),!1):83==c?(top.ICEcoder.tagWrapper("span"),!1):80==c?(top.ICEcoder.tagWrapper("p"),!1):65==c?(top.ICEcoder.tagWrapper("a"),!1):66==
|
||||
c?(top.ICEcoder.tagWrapper("b"),!1):73==c?(top.ICEcoder.tagWrapper("i"),!1):71==c?(top.ICEcoder.tagWrapper("strong"),!1):69==c?(top.ICEcoder.tagWrapper("em"),!1):49==c?(top.ICEcoder.tagWrapper("h1"),!1):50==c?(top.ICEcoder.tagWrapper("h2"),!1):51==c?(top.ICEcoder.tagWrapper("h3"),!1):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c}return 13==c&&b.shiftKey?(top.ICEcoder.insertLineBefore(),!1):70==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.get("find").focus(),
|
||||
!1):71==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.get("goToLineNo").focus(),!1):73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.searchForSelected(),!1):39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a?(top.ICEcoder.nextTab(),!1):37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a?(top.ICEcoder.previousTab(),!1):38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.moveLines("up"),!1):40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.moveLines("down"),
|
||||
!1):107==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?("content"==a?top.ICEcoder.duplicateLines():top.ICEcoder.newTab(),!1):109==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?("content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1):83==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(b.shiftKey?top.ICEcoder.saveFile("saveAs"):top.ICEcoder.saveFile(),!1):13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]?(top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-
|
||||
1]),!1):79==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!1):32==c&&"content"!=a&&-1==["find","replace"].indexOf(document.activeElement.id)?(top.ICEcoder.getcMInstance()&&top.ICEcoder.focus(),!1):74==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.jumpToDefinition(),!1):223==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.lockUnlockNav(),ICEcoder.changeFilesW(top.ICEcoder.lockedNav?
|
||||
"expand":"contract"),!1):190==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(c=ICEcoder.getcMInstance(),d=c.getCursor().line,-1<c.getLine(d).indexOf("{")?top.contentFrame.codeFoldBrace(c,d):top.contentFrame.codeFoldTag(c,d),!1):27==c&&"content"==a?(top.ICEcoder.lineCommentToggle(),!1):27==c&&"content"!=a?(top.ICEcoder.cancelAllActions(),!1):c},resetKeys:function(a){top.ICEcoder.cmdKey=!1},addSnippet:function(){var a,b,c;a=ICEcoder.getcMInstance();b=a.getCursor().line;c=a.getLine(b).length-a.getLine(b).replace(/^\s\s*/,
|
||||
"").length;a=a.getLine(b).slice(c);"function"==a.slice(0,8)?top.ICEcoder.doSnippet("function","function VAR() {\nINDENT\tCURSOR\nINDENT}"):"if"==a.slice(0,2)?top.ICEcoder.doSnippet("if","if (CURSOR) {\nINDENT\t\nINDENT}"):"for"==a.slice(0,3)&&top.ICEcoder.doSnippet("for","for (var i=0; i<CURSOR; i++) {\nINDENT\t\nINDENT}")},doSnippet:function(a,b){var c,d,e,f,g,m;c=top.ICEcoder.getcMInstance();d=c.getCursor().line;if(-1<c.getLine(d).indexOf(a)){e=c.getLine(d);f=e.indexOf(a);e=e.slice(e.indexOf(a)+
|
||||
a.length+1);b=b.replace(/VAR/g,e);e=c.getLine(d).slice(0,f);f=c.getLine(d).length-c.getLine(d).replace(/^\s\s*/,"").length;f=c.getLine(d).slice(0,f);b=b.replace(/INDENT/g,f);e+=b;f=e.indexOf("CURSOR");g=0;m=d;for(i=0;i<e.length;i++)e.indexOf("\n",g)<e.indexOf("CURSOR")&&(g=e.indexOf("\n",g)+1,m+=1);c.replaceRange(e.replace("CURSOR",""),{line:d,ch:0},{line:d,ch:1E6});c.setCursor(m,f);top.ICEcoder.focus()}}};
|
||||
49
lib/login.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>ICEcoder <?php
|
||||
echo $ICEcoder["versionNo"]." : ";
|
||||
echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
|
||||
?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="ice-coder.css">
|
||||
<link rel="icon" type="image/png" href="../favicon.png">
|
||||
</head>
|
||||
|
||||
<body onLoad="document.settingsUpdate.<?php echo $ICEcoder["multiUser"] ? "username" : "password";?>.focus()">
|
||||
|
||||
<div class="screenContainer" style="background-color: #141414">
|
||||
<div class="screenVCenter">
|
||||
<div class="screenCenter">
|
||||
<img src="../images/ice-coder.png" alt="ICEcoder">
|
||||
<div class="version" style="margin-bottom: 22px">v <?php echo $ICEcoder["versionNo"];?></div>
|
||||
<form name="settingsUpdate" action="login.php" method="POST">
|
||||
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" class="password"><br><br>'.PHP_EOL;};?>
|
||||
<input type="password" name="password" class="password"><br><br>
|
||||
<input type="submit" name="submit" value="<?php if ($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]) {echo "set password / login";} else {echo $ICEcoder["password"] == "" ? "set password" : "login";}; ?>" class="button">
|
||||
<?php
|
||||
if($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]){
|
||||
echo '<div class="text"><a href="javascript:alert(\'To disable registration mode, open the settings menu or open lib/config___settings.php and change enableRegistration to false then reload this page\')">Registration mode enabled</a></div>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($ICEcoder["password"] == "" || $ICEcoder["multiUser"]) {
|
||||
echo '<div class="text"><input type="checkbox" name="checkUpdates" value="true" checked> auto-check for updates</div>';
|
||||
}
|
||||
if (!$ICEcoder["multiUser"]) { echo '<div class="text"><a href="javascript:alert(\'To put into multi-user mode, open the settings menu or open lib/config___settings.php and change multiUser to true then reload this page\')">multi-user?</a></div>';};
|
||||
?>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
44
lib/mmd.js
Normal file
@@ -0,0 +1,44 @@
|
||||
;function mmd(src)
|
||||
{
|
||||
var h='';
|
||||
|
||||
function escape(t)
|
||||
{
|
||||
return new Option(t).innerHTML;
|
||||
}
|
||||
function inlineEscape(s)
|
||||
{
|
||||
return escape(s)
|
||||
.replace(/!\[([^\]]*)]\(([^(]+)\)/g, '<img alt="$1" src="$2">')
|
||||
.replace(/\[([^\]]+)]\(([^(]+)\)/g, '$1'.link('$2'))
|
||||
.replace(/`([^`]+)`/g, '<code>$1</code>')
|
||||
.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>')
|
||||
.replace(/\*([^*]+)\*/g, '<em>$1</em>');
|
||||
}
|
||||
|
||||
src
|
||||
.replace(/^\s+|\r|\s+$/g, '')
|
||||
.replace(/\t/g, ' ')
|
||||
.split(/\n\n+/)
|
||||
.forEach(function(b, f, R)
|
||||
{
|
||||
f=b[0];
|
||||
R=
|
||||
{
|
||||
'*':[/\n\* /,'<ul><li>','</li></ul>'],
|
||||
'1':[/\n[1-9]\d*\.? /,'<ol><li>','</li></ol>'],
|
||||
' ':[/\n /,'<pre><code>','</pre></code>','\n'],
|
||||
'>':[/\n> /,'<blockquote>','</blockquote>','\n']
|
||||
}[f];
|
||||
h+=
|
||||
R?R[1]+('\n'+b)
|
||||
.split(R[0])
|
||||
.slice(1)
|
||||
.map(R[3]?escape:inlineEscape)
|
||||
.join(R[3]||'</li>\n<li>')+R[2]:
|
||||
f=='#'?'<h'+(f=b.indexOf(' '))+'>'+inlineEscape(b.slice(f+1))+'</h'+f+'>':
|
||||
f=='<'?b:
|
||||
'<p>'+inlineEscape(b)+'</p>';
|
||||
});
|
||||
return h;
|
||||
};
|
||||
@@ -19,7 +19,7 @@ table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select:none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<?php include("settings.php");?>
|
||||
<?php
|
||||
if(isset($_GET['selectedFiles'])) {
|
||||
$selectedFiles=explode(":",strClean($_GET['selectedFiles']));
|
||||
}
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
?>
|
||||
<?php
|
||||
if(isset($_GET['selectedFiles'])) {
|
||||
$selectedFiles=explode(":",strClean($_GET['selectedFiles']));
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -14,7 +17,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="multiple-results.css">
|
||||
</head>
|
||||
|
||||
<body class="results" onLoad="top.document.getElementById('loadingMask').style.visibility = 'hidden'">
|
||||
<body class="results" onLoad="top.get('loadingMask').style.visibility = 'hidden'">
|
||||
|
||||
<h1 id="title"></h1>
|
||||
<div class="resultsPane" id="resultsPane">
|
||||
@@ -90,7 +93,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
}
|
||||
}
|
||||
if (userTarget.indexOf("all")>-1 || (userTarget.indexOf("selected")>-1 && foundInSelected)) {
|
||||
resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.showHide(\'hide\',top.document.getElementById(\'blackMask\'))">';
|
||||
resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.showHide(\'hide\',top.get(\'blackMask\'))">';
|
||||
resultsDisplay += targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b>"+findText.toLowerCase()+"</b>");
|
||||
resultsDisplay += '</a><br>';
|
||||
<?php if (!isset($_GET['replace'])) { ?>
|
||||
@@ -113,20 +116,27 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
$r = 0;
|
||||
function phpGrep($q, $path, $base) {
|
||||
$fp = opendir($path);
|
||||
global $r, $ICEcoder, $serverType, $selectedFiles;
|
||||
global $r, $ICEcoder, $serverType, $selectedFiles, $docRoot, $ICEcoderDir, $context;
|
||||
if (!isset($ret)) {$ret="";};
|
||||
$slash = $serverType == "Windows" ? "\\" : "/";
|
||||
$slash = $serverType == strpos($path,"\\")>-1 ? "\\" : "/";
|
||||
while($f = readdir($fp)) {
|
||||
if(preg_match("#^\.+$#", $f)) continue;
|
||||
$fullPath = $path.$slash.$f;
|
||||
if(is_dir($fullPath)) {
|
||||
$ret .= phpGrep($q, $fullPath, $base);
|
||||
} else if(stristr(file_get_contents($fullPath), $q)) {
|
||||
} else if(stristr(toUTF8noBOM(file_get_contents($fullPath,false,$context),false), $q)) {
|
||||
$bFile = false;
|
||||
$foundInSelFile = false;
|
||||
// Exclude banned files
|
||||
for ($i=0;$i<count($ICEcoder['bannedFiles']);$i++) {
|
||||
if (strpos($f,$ICEcoder['bannedFiles'][$i])!==false) {$bFile = true;};
|
||||
}
|
||||
// Exclude the folder ICEcoder is running from
|
||||
$rootPrefix = '/'.str_replace("/","\/",preg_quote(str_replace("\\","/",$docRoot))).'/';
|
||||
$localPath = preg_replace($rootPrefix, '', $fullPath, 1);
|
||||
if (strpos($localPath, $ICEcoderDir)===0) {
|
||||
$bFile = true;
|
||||
}
|
||||
$findPath = str_replace($base,"",$fullPath);
|
||||
for ($i=0;$i<count($selectedFiles);$i++) {
|
||||
$stringExtra = $selectedFiles[$i] != "|" ? "/" : "";
|
||||
@@ -135,10 +145,10 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
}
|
||||
}
|
||||
if (!$bFile && (count($selectedFiles)==0 || count($selectedFiles)>0 && $foundInSelFile)) {
|
||||
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>";
|
||||
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.get('blackMask'))\\\">";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(toUTF8noBOM(file_get_contents($fullPath,false,$context),false)),$q)." times</div>";
|
||||
if (isset($_GET['replace'])) {
|
||||
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>".PHP_EOL;
|
||||
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>";
|
||||
};
|
||||
$ret .= '<hr>';
|
||||
echo 'foundArray.push("'.$fullPath.'");'.PHP_EOL;
|
||||
@@ -157,7 +167,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
}
|
||||
?>
|
||||
showHide = foundArray.length==0 ? "hide" : "show";
|
||||
top.ICEcoder.showHide(showHide,top.document.getElementById('blackMask'));
|
||||
top.ICEcoder.showHide(showHide,top.get('blackMask'));
|
||||
if (foundArray.length==0) {top.ICEcoder.message('No matches found')};
|
||||
<?php if (isset($_GET['replace'])) { ?>
|
||||
if (foundArray.length!=0) {document.getElementById('replaceAll').style.opacity = 1};
|
||||
@@ -170,14 +180,14 @@ document.getElementById('results').innerHTML = resultsDisplay;
|
||||
|
||||
var gotoTab = function(tab) {
|
||||
top.ICEcoder.switchTab(tab);
|
||||
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
}
|
||||
|
||||
var replaceSingle = function(tab) {
|
||||
top.ICEcoder.switchTab(tab);
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
content = cM.getValue();
|
||||
cM.setValue(cM.getValue().replace(rExp,top.document.getElementById('replace').value));
|
||||
cM.setValue(cM.getValue().replace(rExp,top.get('replace').value));
|
||||
document.getElementById('foundCount'+tab).innerHTML = document.getElementById('foundCount'+tab).innerHTML.replace('Found','Replaced');
|
||||
}
|
||||
|
||||
@@ -185,7 +195,7 @@ var replaceAll = function() {
|
||||
for (var i=0;i<=foundArray.length-1;i++) {
|
||||
replaceSingle(foundArray[i]);
|
||||
}
|
||||
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
}
|
||||
|
||||
var replaceInFileSingle = function(fileRef) {
|
||||
@@ -196,7 +206,7 @@ var replaceInFilesAll = function() {
|
||||
for (var i=0;i<=foundArray.length-1;i++) {
|
||||
replaceInFileSingle(foundArray[i]);
|
||||
}
|
||||
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
}
|
||||
|
||||
var renameSingle = function(arrayRef) {
|
||||
@@ -209,7 +219,7 @@ var renameAll = function() {
|
||||
for (var i=0;i<=foundArray.length-1;i++) {
|
||||
renameSingle(foundArray[i]);
|
||||
}
|
||||
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
1
lib/php.ini
Normal file
@@ -0,0 +1 @@
|
||||
magic_quotes_gpc = Off
|
||||
42
lib/plugins-display.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
|
||||
$onLoadExtras = "";
|
||||
$pluginsDisplay = "";
|
||||
|
||||
// Show plugins
|
||||
if ($_SESSION['loggedIn']) {
|
||||
// Work out the plugins to display to the user
|
||||
$pluginsDisplay = "";
|
||||
for ($i=0;$i<count($ICEcoder["plugins"]);$i++) {
|
||||
$target = explode(":",$ICEcoder["plugins"][$i][4]);
|
||||
$pluginsDisplay .= '<a href="'.$ICEcoder["plugins"][$i][3].'" title="'.$ICEcoder["plugins"][$i][0].'" target="'.$target[0].'"><img src="'.$ICEcoder["plugins"][$i][1].'" style="'.$ICEcoder["plugins"][$i][2].'" alt="'.$ICEcoder["plugins"][$i][0].'"></a><br><br>';
|
||||
};
|
||||
|
||||
// If we're updating plugins, update those shown
|
||||
if (isset($_GET['updatedPlugins'])) {
|
||||
echo "<script>top.document.getElementById('pluginsOptional').innerHTML = '".$pluginsDisplay."';</script>";
|
||||
}
|
||||
|
||||
// Work out what plugins we'll need to set on a setInterval
|
||||
$onLoadExtras = "";
|
||||
for ($i=0;$i<count($ICEcoder["plugins"]);$i++) {
|
||||
if ($ICEcoder["plugins"][$i][5]!="") {
|
||||
$onLoadExtras .= ";top.ICEcoder.startPluginIntervals(".$i.",'".$ICEcoder["plugins"][$i][3]."','".$ICEcoder["plugins"][$i][4]."','".$ICEcoder["plugins"][$i][5]."')";
|
||||
};
|
||||
};
|
||||
|
||||
// If we're updating our plugins, clear existing setIntervals & the array refs, then start new ones
|
||||
if (isset($_GET['updatedPlugins'])) {
|
||||
?>
|
||||
<script>
|
||||
for (i=0;i<=top.ICEcoder.pluginIntervalRefs.length-1;i++) {
|
||||
clearInterval(top.ICEcoder['plugTimer'+top.ICEcoder.pluginIntervalRefs[i]]);
|
||||
}
|
||||
top.ICEcoder.pluginIntervalRefs = [];
|
||||
<?php echo $onLoadExtras.PHP_EOL; ?>
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
36
lib/plugins-manager.css
Normal file
@@ -0,0 +1,36 @@
|
||||
/* First, reset everything to a standard */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
a {color: #fff; text-decoration: none}
|
||||
input {padding: 4px; border: 1px solid #555; background-color: #444; color: #fff}
|
||||
input:focus {
|
||||
outline: none;
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
}
|
||||
|
||||
.pluginsManager {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
276
lib/plugins-manager.php
Normal file
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
|
||||
// Set the plugin data source
|
||||
$pluginsDataSrc = "https://icecoder.net/plugin-data?format=JSON";
|
||||
|
||||
// Now get our plugin data and put into a PHP array
|
||||
if (ini_get('allow_url_fopen')) {
|
||||
$pluginsDataJS = @file_get_contents($pluginsDataSrc, false, $context);
|
||||
if (!$pluginsDataJS) {
|
||||
$pluginsDataJS = file_get_contents(str_replace("https:","http:",$pluginsDataSrc), false, $context);
|
||||
}
|
||||
} elseif (function_exists('curl_init')) {
|
||||
$pDSrc = curl_init($pluginsDataSrc);
|
||||
curl_setopt($pDSrc, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($pDSrc, CURLOPT_RETURNTRANSFER, true);
|
||||
$pluginsDataJS = curl_exec($pDSrc);
|
||||
}
|
||||
$pluginsData = json_decode($pluginsDataJS, true);
|
||||
|
||||
// If we have an action to perform
|
||||
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action'])) {
|
||||
|
||||
// Get our old plugin & user settings
|
||||
$oldPlugins = $ICEcoder["plugins"];
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
|
||||
// ==========
|
||||
// INSTALLING
|
||||
// ==========
|
||||
|
||||
if ($_GET['action']=="install") {
|
||||
|
||||
// Store the plugin zip to the tmp dir
|
||||
$target = '../plugins/';
|
||||
$zipURL = $pluginsData[strClean($_GET['plugin'])]['zipURL'];
|
||||
$zipFile = "../tmp/".basename($zipURL);
|
||||
if (ini_get('allow_url_fopen')) {
|
||||
$fileData = file_get_contents($zipURL, false, $context);
|
||||
} elseif (function_exists('curl_init')) {
|
||||
$client = curl_init($zipURL);
|
||||
curl_setopt($client, CURLOPT_RETURNTRANSFER, 1); //fixed this line
|
||||
$fileData = curl_exec($client);
|
||||
}
|
||||
file_put_contents($zipFile, $fileData);
|
||||
|
||||
// Now unpack the zip
|
||||
$zip = new ZipArchive;
|
||||
$zip->open($zipFile);
|
||||
|
||||
// Create all files & dirs, in 1kb chunks
|
||||
for($i=0; $i<$zip->numFiles; $i++) {
|
||||
$name = $zip->getNameIndex($i);
|
||||
|
||||
// Determine output filename
|
||||
$file = $target.$name;
|
||||
|
||||
// Create the directories if necessary
|
||||
$dir = dirname($file);
|
||||
if (!is_dir($dir)) mkdir($dir, 0777, true);
|
||||
|
||||
// Read from zip and write to disk
|
||||
$fpr = $zip->getStream($name);
|
||||
if (!is_dir($file)) {
|
||||
$fpw = fopen($file, 'w');
|
||||
while ($data = fread($fpr, 1024)) {
|
||||
fwrite($fpw, $data);
|
||||
}
|
||||
fclose($fpw);
|
||||
}
|
||||
fclose($fpr);
|
||||
}
|
||||
$zip->close();
|
||||
|
||||
// Remove the tmp zip file
|
||||
unlink($zipFile);
|
||||
|
||||
// Start creating a new chunk for the plugins settings
|
||||
$settingsNew = '"plugins" => array(';
|
||||
|
||||
// Set all the old plugins
|
||||
for ($i=0; $i<count($oldPlugins); $i++) {
|
||||
$settingsNew .= ' array("'.$oldPlugins[$i][0].'","'.$oldPlugins[$i][1].'","'.$oldPlugins[$i][2].'","'.$oldPlugins[$i][3].'","'.$oldPlugins[$i][4].'","'.$oldPlugins[$i][5].'"),';
|
||||
}
|
||||
// Then add the new one
|
||||
$settingsNew .= ' array("'.$pluginsData[$_GET['plugin']]['name'].'","'.$pluginsData[$_GET['plugin']]['icon'].'","'.$pluginsData[$_GET['plugin']]['style'].'","'.$pluginsData[$_GET['plugin']]['URL'].'","'.$pluginsData[$_GET['plugin']]['target'].'","'.$pluginsData[$_GET['plugin']]['timer'].'")';
|
||||
$settingsNew .= ' ),'.PHP_EOL;
|
||||
}
|
||||
|
||||
// ============
|
||||
// UNINSTALLING
|
||||
// ============
|
||||
|
||||
if ($_GET['action']=="uninstall") {
|
||||
|
||||
// Start creating a new chunk for the plugins settings
|
||||
$settingsNew = '"plugins" => array(';
|
||||
|
||||
// Set all the old plugins
|
||||
for ($i=0; $i<count($oldPlugins); $i++) {
|
||||
// As long as it's not the one we want to remove
|
||||
if ($oldPlugins[$i][0] != $pluginsData[$_GET['plugin']]['name']) {
|
||||
$settingsNew .= ' array("'.$oldPlugins[$i][0].'","'.$oldPlugins[$i][1].'","'.$oldPlugins[$i][2].'","'.$oldPlugins[$i][3].'","'.$oldPlugins[$i][4].'","'.$oldPlugins[$i][5].'"),';
|
||||
}
|
||||
}
|
||||
// Rtrim off the last comma
|
||||
$settingsNew = rtrim($settingsNew,',');
|
||||
$settingsNew .= ' ),'.PHP_EOL;
|
||||
|
||||
// Finally, delete the plugin itself
|
||||
$target = '../plugins/';
|
||||
$dirName = basename($pluginsData[strClean($_GET['plugin'])]['zipURL'],".zip");
|
||||
deletePlugin($target.$dirName."/");
|
||||
}
|
||||
|
||||
// ========
|
||||
// UPDATING
|
||||
// ========
|
||||
|
||||
if ($_GET['action']=="update") {
|
||||
|
||||
// Start creating a new chunk for the plugins settings
|
||||
$settingsNew = '"plugins" => array(';
|
||||
|
||||
// Redo the arrays using the form data
|
||||
for ($i=0; $i<count($oldPlugins); $i++) {
|
||||
$timer = intval($_POST['timer'.$i]);
|
||||
if ($timer == 0) {
|
||||
$timer = "";
|
||||
}
|
||||
$settingsNew .= ' array("'.$_POST['name'.$i].'","'.$_POST['icon'.$i].'","'.$_POST['style'.$i].'","'.$_POST['URL'.$i].'","'.$_POST['target'.$i].'","'.$timer.'"),';
|
||||
}
|
||||
// Rtrim off the last comma
|
||||
$settingsNew = rtrim($settingsNew,',');
|
||||
$settingsNew .= ' ),'.PHP_EOL;
|
||||
}
|
||||
|
||||
// Now we have a new settingsNew string to use and files installed/uninstalled
|
||||
// we can update the plugin arrays in the settings file
|
||||
|
||||
// Identify the bit to replace
|
||||
$repPosStart = strpos($settingsContents,'"plugins"');
|
||||
$repPosEnd = strpos($settingsContents,'"githubLocalPaths"');
|
||||
|
||||
// Compile our new settings
|
||||
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));
|
||||
|
||||
// Now update the config file
|
||||
if (is_writeable($settingsFile)) {
|
||||
$fh = fopen($settingsFile, 'w');
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
// Finally, reload ICEcoder itself if plugin requires it or just the iFrame screen for the user if it doesn't
|
||||
if ($_GET['action']=="install" && $pluginsData[$_GET['plugin']]['reload'] == "true") {
|
||||
echo "<script>if (top.confirm('ICEcoder needs to reload to make this plugin usable.\\n\\nReload now?')) {top.window.location.reload();} else {window.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;}</script>";
|
||||
} else {
|
||||
header("Location: plugins-manager.php?updatedPlugins&csrf=".$_SESSION["csrf"]);
|
||||
echo "<script>window.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;</script>";
|
||||
}
|
||||
die("<span style='color: #fff'>saving plugins...</span>");
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
|
||||
}
|
||||
}
|
||||
|
||||
// Function to delete the plugin dir & files/dirs inside
|
||||
function deletePlugin($dir) {
|
||||
$mydir = opendir($dir);
|
||||
while(false !== ($file = readdir($mydir))) {
|
||||
if($file != "." && $file != "..") {
|
||||
chmod($dir.$file, 0777);
|
||||
if(is_dir($dir.$file)) {
|
||||
chdir('.');
|
||||
deletePlugin($dir.$file.'/');
|
||||
if(is_dir($dir.$file)) {
|
||||
rmdir($dir.$file);// or DIE("<span style='color: #fff'>couldn't delete dir: $dir$file</span><br />");
|
||||
}
|
||||
}
|
||||
else
|
||||
unlink($dir.$file) or DIE("<span style='color: #fff''>couldn't delete file: $dir$file</span><br />");
|
||||
}
|
||||
}
|
||||
closedir($mydir);
|
||||
rmdir($dir);
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> plugins manager</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="plugins-manager.css">
|
||||
</head>
|
||||
|
||||
<body class="pluginsManager">
|
||||
|
||||
<h1>plugins</h1>
|
||||
|
||||
<a href="javascript:top.ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>','writingPlugins')" style="position: absolute; top: 26px; right: 20px"><div style="padding: 10px; background: #333; color: #fff; font-size: 18px">Guide to writing plugins</div></a>
|
||||
<div style="display: inline-block; width: 760px; height: 340px; overflow-y: auto">
|
||||
<?php
|
||||
$plugins = $ICEcoder['plugins'];
|
||||
if (count($plugins) > 0) {
|
||||
?>
|
||||
<div style="display: inline-block; width: 740px; margin-bottom: 30px">
|
||||
<h2>Manage Installed</h2><br>
|
||||
|
||||
<form id="pluginUpdateForm" action="plugins-manager.php?action=update" method="POST">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td style="padding-left: 5px">URL</td>
|
||||
<td style="padding-left: 5px">Target</td>
|
||||
<td style="padding-left: 5px">Timer</td>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i=0; $i<count($plugins); $i++) {
|
||||
echo '<tr>';
|
||||
echo '<td style="padding: 0 10px 8px 0; width: 28px; text-align: center"><img src="../'.$plugins[$i][1].'" alt="'.$plugins[$i][0].'"><input type="hidden" name="name'.$i.'" value="'.$plugins[$i][0].'"><input type="hidden" name="icon'.$i.'" value="'.$plugins[$i][1].'"><input type="hidden" name="style'.$i.'" value="'.$plugins[$i][2].'"></td>';
|
||||
echo '<td style="padding: 8px 10px 8px 0; width: 250px; white-space: nowrap">'.$plugins[$i][0].'</td>';
|
||||
echo '<td style="padding: 0 10px 8px 0"><input type="text" name="URL'.$i.'" value="'.$plugins[$i][3].'" style="width: 280px"></td>';
|
||||
echo '<td style="padding: 0 10px 8px 0"><input type="text" name="target'.$i.'" value="'.$plugins[$i][4].'" style="width: 70px"></td>';
|
||||
echo '<td style="padding: 0 0 8px 0"><input type="text" name="timer'.$i.'" value="'.$plugins[$i][5].'" style="width: 50px"></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td colspan="4"></td>';
|
||||
echo '<td style="padding: 3px 0 8px 0"><div style="padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'pluginUpdateForm\').submit()">Update</div></td>';
|
||||
echo '</tr>';
|
||||
?>
|
||||
</table>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
;};
|
||||
?>
|
||||
|
||||
<div style="display: inline-block; width: 740px">
|
||||
<h2>Install / Uninstall</h2><br>
|
||||
|
||||
<table>
|
||||
<?php
|
||||
for ($i=0; $i<count($pluginsData); $i++) {
|
||||
if ($i % 2 == 0) {
|
||||
echo '<tr>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$installUninstallButton = '<div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'plugins-manager.php?action=install&plugin='.$i.'&csrf='.$_SESSION["csrf"].'\'">Install</div>';
|
||||
for ($j=0; $j<count($plugins); $j++) {
|
||||
if ($pluginsData[$i]['name'] == $plugins[$j][0]) {
|
||||
$installUninstallButton = '<div style="display: inline-block; padding: 5px; background: #333; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'plugins-manager.php?action=uninstall&plugin='.$i.'&csrf='.$_SESSION["csrf"].'\'">Uninstall</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$reloadExtra = $pluginsData[$i]['reload'] == 'true' ? '<br><span style="color: #888">Reload after install required</span>' : '';
|
||||
echo '<td style="padding: 0 10px 18px 0; width: 28px; text-align: center"><img src="https://icecoder.net/'.$pluginsData[$i]['icon'].'" alt="'.$pluginsData[$i]['name'].'"></td>';
|
||||
echo '<td style="padding: 8px 10px 8px 0; width: 250px; white-space: nowrap">'.$pluginsData[$i]['name'].$reloadExtra.'</td>';
|
||||
$styleExtra = ($i % 2 == 1 || $i == count($pluginsData)-1) ? "0" : "30px";
|
||||
echo '<td style="padding: 3px '.$styleExtra.' 8px 0">'.$installUninstallButton.'</td>';
|
||||
|
||||
if ($i % 2 == 1 || $i == count($pluginsData)-1) {
|
||||
echo PHP_EOL.'</tr>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,148 +1,170 @@
|
||||
<?php include("settings.php");?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html onContextMenu="return false">
|
||||
<head>
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="properties.css">
|
||||
</head>
|
||||
|
||||
<body class="properties">
|
||||
|
||||
<h1 id="title">properties</h1>
|
||||
|
||||
<?php
|
||||
$fileName=$docRoot.$iceRoot.str_replace("|","/",strClean($_GET['fileName']));
|
||||
?>
|
||||
<h2><?php echo basename($fileName); ?></h2><br>
|
||||
<span class="column" style="width: 180px">Size: <?php
|
||||
$bytes = filesize($fileName);
|
||||
// If it's a dir, get the dir size
|
||||
if (is_dir($fileName)) {
|
||||
$io = popen('/usr/bin/du -sb '.$fileName, 'r');
|
||||
$bytes = intval(fgets($io,80));
|
||||
pclose($io);
|
||||
}
|
||||
// Change into kilobytes
|
||||
$outputSize = ($bytes/1024);
|
||||
$outputUnit = "kb";
|
||||
// Maybe we should show in megabytes?
|
||||
if ($outputSize >= 1024) {
|
||||
$outputSize = ($outputSize/1024);
|
||||
$outputUnit = "mb";
|
||||
}
|
||||
echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)";
|
||||
?></span>
|
||||
<span class="column" style="margin: 0 10px">Modified: <?php echo date( "D d M Y g:i:sa", filemtime($fileName)); ?></span>
|
||||
<span class="column">Last access: <?php echo date( "D d M Y g:i:sa", fileatime($fileName)); ?></span>
|
||||
<br><br>
|
||||
<span class="column" style="width: 180px">Type: <?php echo is_dir($fileName) ? "Folder" : "File"; ?></span>
|
||||
<span class="column" style="margin: 0 10px">Readable / Writeable:
|
||||
<?php echo is_readable($fileName) ? "Yes" : "No"; ?> / <?php echo is_writeable($fileName) ? "Yes" : "No";?>
|
||||
</span>
|
||||
<span class="column">Relative path: <?php echo str_replace($docRoot,"",$fileName);?></span>
|
||||
<span style="font-size:10px">
|
||||
<br><br>
|
||||
Absolute path:<br><?php echo $fileName;?>
|
||||
<br><br>
|
||||
</span>
|
||||
<span class="column" style="width: 180px">
|
||||
Permissions:
|
||||
<?php
|
||||
$chmodInfo = substr(sprintf('%o', fileperms($fileName)), -4);
|
||||
echo $chmodInfo;
|
||||
?>
|
||||
</span>
|
||||
<span class="column" style="margin: 0 10px">
|
||||
<?php
|
||||
$perms = str_split(substr($chmodInfo,1,3)); // reduces 0705 down to 705
|
||||
$readVars = array(4,5,6,7);
|
||||
$writeVars = array(2,3,6,7);
|
||||
$execVars = array(1,3,5,7);
|
||||
?>
|
||||
<table>
|
||||
<tr><th>Owner</th><th>Group</th><th>Public</th></tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ownerR" id="owner4"<?php if(in_array($perms[0],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
|
||||
<td><input type="checkbox" name="groupR" id="group4"<?php if(in_array($perms[1],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
|
||||
<td><input type="checkbox" name="publicR" id="public4"<?php if(in_array($perms[2],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ownerW" id="owner2"<?php if(in_array($perms[0],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
|
||||
<td><input type="checkbox" name="groupW" id="group2"<?php if(in_array($perms[1],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
|
||||
<td><input type="checkbox" name="publicW" id="public2"<?php if(in_array($perms[2],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ownerE" id="owner1"<?php if(in_array($perms[0],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
|
||||
<td><input type="checkbox" name="groupE" id="group1"<?php if(in_array($perms[1],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
|
||||
<td><input type="checkbox" name="publicE" id="public1"<?php if(in_array($perms[2],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
<span class="column">
|
||||
Change to:<br>
|
||||
<form name="chmod" action="#" method="GET">
|
||||
<input type="text" name="chmod" id="permText" style="width: 30px; border: 0; background-color: #444; font-size: 10px; color: #fff" maxlength="3" value="<?php echo substr($chmodInfo,1,3); ?>" onKeyUp="changePerms(this.value);showButton()" onChange="changePerms(this.value);showButton()">
|
||||
</form>
|
||||
</span>
|
||||
|
||||
<div class="update" id="updateButton" onClick="validatePerms()">update</div>
|
||||
|
||||
<script>
|
||||
readVars = [4,5,6,7];
|
||||
writeVars = [2,3,6,7];
|
||||
execVars = [1,3,5,7];
|
||||
permGroups = ['owner','group','public'];
|
||||
permValues = [4,2,1];
|
||||
permTypes = ['read','write','exec'];
|
||||
|
||||
function changePerms(val) {
|
||||
var permText = document.getElementById('permText').value;
|
||||
// change checkboxes
|
||||
if (val) {
|
||||
// set values
|
||||
if (permText.length==3) {
|
||||
for (var i=0;i<=2;i++) {
|
||||
for (var j=0;j<=2;j++) {
|
||||
document.getElementById(permGroups[i]+permValues[j]).checked = window[permTypes[j]+'Vars'].indexOf(permText.split("")[i]*1)>-1;
|
||||
}
|
||||
}
|
||||
// clear values
|
||||
} else {
|
||||
for (var i=0;i<=2;i++) {
|
||||
for (var j=0;j<=2;j++) {
|
||||
document.getElementById(permGroups[i]+permValues[j]).checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// change text value
|
||||
} else {
|
||||
ownerPerms = (document.getElementById('owner4').checked*4)+(document.getElementById('owner2').checked*2)+(document.getElementById('owner1').checked*1);
|
||||
groupPerms = (document.getElementById('group4').checked*4)+(document.getElementById('group2').checked*2)+(document.getElementById('group1').checked*1);
|
||||
publicPerms = (document.getElementById('public4').checked*4)+(document.getElementById('public2').checked*2)+(document.getElementById('public1').checked*1);
|
||||
document.getElementById('permText').value = ownerPerms.toString() + groupPerms.toString() + publicPerms.toString();
|
||||
}
|
||||
}
|
||||
|
||||
var showButton = function() {
|
||||
document.getElementById('updateButton').style.opacity = 1;
|
||||
}
|
||||
|
||||
var validatePerms = function() {
|
||||
var permText = document.getElementById('permText').value;
|
||||
canUpdate = true;
|
||||
if (permText.length!=3 || isNaN(permText)) {canUpdate = false};
|
||||
if ( permText.split("")[0]*1 <0 || permText.split("")[0]*1 >7 ||
|
||||
permText.split("")[1]*1 <0 || permText.split("")[1]*1 >7 ||
|
||||
permText.split("")[2]*1 <0 || permText.split("")[2]*1 >7) {
|
||||
canUpdate = false;
|
||||
}
|
||||
if (canUpdate) {top.ICEcoder.chmod('<?php echo str_replace($docRoot,"",$fileName);?>',permText)};
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html onContextMenu="return false">
|
||||
<head>
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="properties.css">
|
||||
</head>
|
||||
|
||||
<body class="properties">
|
||||
|
||||
<h1 id="title">properties</h1>
|
||||
|
||||
<?php
|
||||
$fileName=$docRoot.$iceRoot.str_replace("|","/",strClean($_GET['fileName']));
|
||||
?>
|
||||
<h2><?php echo basename($fileName); ?></h2><br>
|
||||
<span class="column" style="width: 180px">Size: <?php
|
||||
$bytes = filesize($fileName);
|
||||
// If it's a dir, get the dir size
|
||||
if (is_dir($fileName)) {
|
||||
$io = popen('/usr/bin/du -sb '.$fileName, 'r');
|
||||
$bytes = intval(fgets($io,80));
|
||||
pclose($io);
|
||||
}
|
||||
// Change into kilobytes
|
||||
$outputSize = ($bytes/1024);
|
||||
$outputUnit = "kb";
|
||||
// Maybe we should show in megabytes?
|
||||
if ($outputSize >= 1024) {
|
||||
$outputSize = ($outputSize/1024);
|
||||
$outputUnit = "mb";
|
||||
}
|
||||
echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)";
|
||||
?></span>
|
||||
<span class="column" style="margin: 0 10px">Modified: <?php echo date( "D jS M Y g:i:sa", filemtime($fileName)); ?></span>
|
||||
<span class="column">Last access: <?php echo date( "D jS M Y g:i:sa", fileatime($fileName)); ?></span>
|
||||
<br><br>
|
||||
<span class="column" style="width: 180px">Type: <?php echo is_dir($fileName) ? "Folder" : "File"; ?></span>
|
||||
<span class="column" style="margin: 0 10px">Readable / Writeable:
|
||||
<?php echo is_readable($fileName) ? "Yes" : "No"; ?> / <?php echo is_writeable($fileName) ? "Yes" : "No";?>
|
||||
</span>
|
||||
<span class="column">Relative path: <?php echo str_replace($docRoot,"",$fileName);?></span>
|
||||
<br><br>
|
||||
<span class="column" style="width: 410px">Absolute path:<br><?php echo $fileName;?></span>
|
||||
<?php if (is_dir($fileName)) {?>
|
||||
<span class="column" style="width: 180px">Contains:<br><?php
|
||||
$dirList = scandir($fileName);
|
||||
$dirCount = 0;
|
||||
$fileCount = 0;
|
||||
for ($i=0; $i<count($dirList); $i++) {
|
||||
if ($dirList[$i] != "." && $dirList[$i] != "..") {
|
||||
if (is_dir($fileName."/".$dirList[$i])) {
|
||||
$dirCount++;
|
||||
} else {
|
||||
$fileCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$dirPlural = $dirCount != 1 ? "s" : "";
|
||||
$filePlural = $fileCount != 1 ? "s" : "";
|
||||
echo $dirCount." sub-folder".$dirPlural.", ".$fileCount." file".$filePlural;
|
||||
?>
|
||||
</span>
|
||||
<?php ;};?>
|
||||
<br><br><br>
|
||||
<span class="column" style="width: 180px">
|
||||
Permissions:
|
||||
<?php
|
||||
$chmodInfo = substr(sprintf('%o', fileperms($fileName)), -4);
|
||||
echo $chmodInfo;
|
||||
?>
|
||||
</span>
|
||||
<span class="column" style="margin: 0 10px">
|
||||
<?php
|
||||
$perms = str_split(substr($chmodInfo,1,3)); // reduces 0705 down to 705
|
||||
$readVars = array(4,5,6,7);
|
||||
$writeVars = array(2,3,6,7);
|
||||
$execVars = array(1,3,5,7);
|
||||
?>
|
||||
<table>
|
||||
<tr><th>Owner</th><th>Group</th><th>Public</th></tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ownerR" id="owner4"<?php if(in_array($perms[0],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
|
||||
<td><input type="checkbox" name="groupR" id="group4"<?php if(in_array($perms[1],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
|
||||
<td><input type="checkbox" name="publicR" id="public4"<?php if(in_array($perms[2],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ownerW" id="owner2"<?php if(in_array($perms[0],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
|
||||
<td><input type="checkbox" name="groupW" id="group2"<?php if(in_array($perms[1],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
|
||||
<td><input type="checkbox" name="publicW" id="public2"<?php if(in_array($perms[2],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ownerE" id="owner1"<?php if(in_array($perms[0],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
|
||||
<td><input type="checkbox" name="groupE" id="group1"<?php if(in_array($perms[1],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
|
||||
<td><input type="checkbox" name="publicE" id="public1"<?php if(in_array($perms[2],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
<span class="column">
|
||||
Change to:<br>
|
||||
<form name="chmod" action="#" method="GET">
|
||||
<input type="text" name="chmod" id="permText" style="width: 30px; border: 0; background-color: #444; font-size: 10px; color: #fff" maxlength="3" value="<?php echo substr($chmodInfo,1,3); ?>" onKeyUp="changePerms(this.value);showButton()" onChange="changePerms(this.value);showButton()">
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
</span>
|
||||
|
||||
<div class="update" id="updateButton" onClick="validatePerms()">update</div>
|
||||
|
||||
<script>
|
||||
readVars = [4,5,6,7];
|
||||
writeVars = [2,3,6,7];
|
||||
execVars = [1,3,5,7];
|
||||
permGroups = ['owner','group','public'];
|
||||
permValues = [4,2,1];
|
||||
permTypes = ['read','write','exec'];
|
||||
|
||||
function changePerms(val) {
|
||||
var permText = document.getElementById('permText').value;
|
||||
// change checkboxes
|
||||
if (val) {
|
||||
// set values
|
||||
if (permText.length==3) {
|
||||
for (var i=0;i<=2;i++) {
|
||||
for (var j=0;j<=2;j++) {
|
||||
document.getElementById(permGroups[i]+permValues[j]).checked = window[permTypes[j]+'Vars'].indexOf(permText.split("")[i]*1)>-1;
|
||||
}
|
||||
}
|
||||
// clear values
|
||||
} else {
|
||||
for (var i=0;i<=2;i++) {
|
||||
for (var j=0;j<=2;j++) {
|
||||
document.getElementById(permGroups[i]+permValues[j]).checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// change text value
|
||||
} else {
|
||||
ownerPerms = (document.getElementById('owner4').checked*4)+(document.getElementById('owner2').checked*2)+(document.getElementById('owner1').checked*1);
|
||||
groupPerms = (document.getElementById('group4').checked*4)+(document.getElementById('group2').checked*2)+(document.getElementById('group1').checked*1);
|
||||
publicPerms = (document.getElementById('public4').checked*4)+(document.getElementById('public2').checked*2)+(document.getElementById('public1').checked*1);
|
||||
document.getElementById('permText').value = ownerPerms.toString() + groupPerms.toString() + publicPerms.toString();
|
||||
}
|
||||
}
|
||||
|
||||
var showButton = function() {
|
||||
document.getElementById('updateButton').style.opacity = 1;
|
||||
}
|
||||
|
||||
var validatePerms = function() {
|
||||
var permText = document.getElementById('permText').value;
|
||||
canUpdate = true;
|
||||
if (permText.length!=3 || isNaN(permText)) {canUpdate = false};
|
||||
if ( permText.split("")[0]*1 <0 || permText.split("")[0]*1 >7 ||
|
||||
permText.split("")[1]*1 <0 || permText.split("")[1]*1 >7 ||
|
||||
permText.split("")[2]*1 <0 || permText.split("")[2]*1 >7) {
|
||||
canUpdate = false;
|
||||
}
|
||||
if (canUpdate) {top.ICEcoder.chmod('<?php echo str_replace($docRoot,"",$fileName);?>',permText)};
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
124
lib/settings-common.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
// Don't display, but log all errors
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_log', dirname(__FILE__).'/../error-log.txt');
|
||||
error_reporting(-1);
|
||||
|
||||
// Set our default timezone and supress warning with @
|
||||
@date_default_timezone_set(date_default_timezone_get());
|
||||
|
||||
// Set a stream context timeout for file reading
|
||||
$context = stream_context_create(array('http'=>
|
||||
array(
|
||||
'timeout' => 60 // secs
|
||||
)
|
||||
));
|
||||
|
||||
// Start a session if we haven't already
|
||||
if(!isset($_SESSION)) {@session_start();}
|
||||
|
||||
// Logout if that's the action we're taking
|
||||
if (isset($_GET['logout'])) {
|
||||
include(dirname(__FILE__)."/../processes/on-user-logout.php");
|
||||
$_SESSION['loggedIn']=false;
|
||||
$_SESSION['username']=false;
|
||||
session_destroy();
|
||||
header("Location: dirname(__FILE__)./?loggedOut");
|
||||
}
|
||||
|
||||
// If magic quotes are still on (attempted to switch off in php.ini)
|
||||
if (get_magic_quotes_gpc ()) {
|
||||
function stripslashes_deep($value) {
|
||||
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
|
||||
return $value;
|
||||
}
|
||||
$_POST = (isset($_POST) && !empty($_POST)) ? array_map('stripslashes_deep', $_POST) : array();
|
||||
$_GET = (isset($_GET) && !empty($_GET)) ? array_map('stripslashes_deep', $_GET) : array();
|
||||
$_COOKIE = (isset($_COOKIE) && !empty($_COOKIE)) ? array_map('stripslashes_deep', $_COOKIE) : array();
|
||||
$_REQUEST = (isset($_REQUEST) && !empty($_REQUEST)) ? array_map('stripslashes_deep', $_REQUEST) : array();
|
||||
}
|
||||
|
||||
// Function to handle salted hashing
|
||||
define('SALT_LENGTH',12);
|
||||
function generateHash($plainText,$salt=null) {
|
||||
if ($salt === null) {
|
||||
$salt = substr(md5(uniqid(rand(), true)),0,SALT_LENGTH);
|
||||
} else {
|
||||
$salt = substr($salt,0,SALT_LENGTH);
|
||||
}
|
||||
return $salt.sha1($salt.$plainText);
|
||||
}
|
||||
|
||||
// returns converted entities which have HTML entity equivalents
|
||||
function strClean($var) {
|
||||
return preg_replace("/javascript\:/i","javascript:",htmlentities($var, ENT_QUOTES, "UTF-8"));
|
||||
}
|
||||
|
||||
// returns a number, whole or decimal or null
|
||||
function numClean($var) {
|
||||
return is_numeric($var) ? floatval($var) : false;
|
||||
}
|
||||
|
||||
// Clean XSS attempts using different contexts
|
||||
function xssClean($data,$type) {
|
||||
|
||||
// === html ===
|
||||
if ($type == "html") {
|
||||
$bad = array("<", ">");
|
||||
$good = array("<", ">");
|
||||
}
|
||||
|
||||
// === style ===
|
||||
if ($type == "style") {
|
||||
$bad = array("<", ">", "\"", "'", "``", "(", ")", "&", "\\\\");
|
||||
$good = array("<", ">", """, "'", "`", "(", ")", "&", "\");
|
||||
}
|
||||
|
||||
// === attribute ===
|
||||
if ($type == "attribute") {
|
||||
$bad = array("\"", "'", "``");
|
||||
$good = array(""", "'", "`");
|
||||
}
|
||||
|
||||
// === script ===
|
||||
if ($type == "script") {
|
||||
$bad = array("<", ">", "\"", "'", "\\\\", "%", "&");
|
||||
$good = array("<", ">", """, "'", "\", "%", "&");
|
||||
}
|
||||
|
||||
// === url ===
|
||||
if ($type == "url") {
|
||||
if(preg_match("#^(?:(?:https?|ftp):{1})\/\/[^\"\s\\\\]*.[^\"\s\\\\]*$#iu",(string)$data,$match)) {
|
||||
return $match[0];
|
||||
} else {
|
||||
return 'javascript:void(0)';
|
||||
}
|
||||
}
|
||||
|
||||
$output = str_replace($bad, $good, $data);
|
||||
return $output;
|
||||
}
|
||||
|
||||
// returns a UTF8 based string with any UFT8 BOM removed
|
||||
function toUTF8noBOM($string,$message) {
|
||||
// Attempt to detect encoding
|
||||
if (function_exists('mb_detect_encoding')) {
|
||||
$encType = mb_detect_encoding($string);
|
||||
// Get rid of any UTF-8 BOM
|
||||
$string = preg_replace('/\x{EF}\x{BB}\x{BF}/','',$string);
|
||||
// Test for any bad characters
|
||||
$teststring = $string;
|
||||
$teststringBroken = utf8_decode($teststring);
|
||||
$teststringConverted = iconv("UTF-8", "UTF-8//IGNORE", $teststringBroken);
|
||||
// If we have a matching length, UTF8 encode it
|
||||
if ($encType != "ASCII" && $encType != "UTF-8" && strlen($teststringConverted) == strlen($teststringBroken)) {
|
||||
$string = utf8_encode($string);
|
||||
if ($message) {
|
||||
echo "top.ICEcoder.message('Your document doesn\'t appear to be in UTF-8 encoding so has been converted.');";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
?>
|
||||
56
lib/settings-save-current-files.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// Save the currently opened files for next time
|
||||
if ($_SESSION['loggedIn'] && isset($_GET["saveFiles"]) && $_GET['saveFiles']) {
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
|
||||
// Replace our previousFiles var with the the current
|
||||
$repPosStart = strpos($settingsContents,'previousFiles" => "')+20;
|
||||
$repPosEnd = strpos($settingsContents,'",',$repPosStart)-$repPosStart;
|
||||
if (!$demoMode) {
|
||||
if ($_GET['saveFiles']!="CLEAR") {
|
||||
$saveFiles=strClean($_GET['saveFiles']);
|
||||
$saveFilesArray = explode(",",$saveFiles);
|
||||
$saveFiles="";
|
||||
for ($i=0;$i<count($saveFilesArray);$i++) {
|
||||
$saveFilesArray[$i] = str_replace("/","|",$docRoot).$saveFilesArray[$i];
|
||||
$saveFiles .= $saveFilesArray[$i].",";
|
||||
}
|
||||
$saveFiles = rtrim($saveFiles,",");
|
||||
} else {
|
||||
$saveFilesArray = array();
|
||||
$saveFiles = "";
|
||||
}
|
||||
$settingsContents = substr($settingsContents,0,$repPosStart).$saveFiles.substr($settingsContents,($repPosStart+$repPosEnd),strlen($settingsContents));
|
||||
// Now update the config file
|
||||
if (is_writeable($settingsFile)) {
|
||||
$fh = fopen($settingsFile, 'w');
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
|
||||
}
|
||||
|
||||
// Update our last10Files var?
|
||||
$last10FilesArray = explode(",",$ICEcoder["last10Files"]);
|
||||
for ($i=0;$i<count($saveFilesArray);$i++) {
|
||||
$inLast10Files = in_array($saveFilesArray[$i],$last10FilesArray);
|
||||
if (!$inLast10Files && $saveFilesArray[$i] !="") {
|
||||
$repPosStart = strpos($settingsContents,'last10Files" => "')+18;
|
||||
$repPosEnd = strpos($settingsContents,'"',$repPosStart)-$repPosStart;
|
||||
$commaExtra = $ICEcoder["last10Files"]!="" ? "," : "";
|
||||
if (count($last10FilesArray)>=10) {$ICEcoder["last10Files"]=substr($ICEcoder["last10Files"],0,strrpos($ICEcoder["last10Files"],','));};
|
||||
$settingsContents = substr($settingsContents,0,$repPosStart).$saveFilesArray[$i].$commaExtra.$ICEcoder["last10Files"].substr($settingsContents,($repPosStart+$repPosEnd),strlen($settingsContents));
|
||||
// Now update the config file
|
||||
if (is_writeable($settingsFile)) {
|
||||
$fh = fopen($settingsFile, 'w');
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
|
||||
}
|
||||
?>
|
||||
@@ -12,25 +12,26 @@ table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select:none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select:none;
|
||||
user-select: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
|
||||
.settings {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff}
|
||||
.settings .infoPane {position: relative; width: 230px; height: 560px; font-size: 10px; color: #bbb; background-color: #fff; padding: 20px; float: left}
|
||||
.settings .infoPane a {color: #888; text-decoration: none}
|
||||
.settings .infoPane {position: relative; width: 230px; height: 570px; font-size: 10px; color: #888; background-color: #fff; padding: 20px; float: left}
|
||||
.settings .infoPane a {color: #06c; text-decoration: none}
|
||||
.settings .infoPane a:hover {text-decoration: underline}
|
||||
.settings .logo {position: relative; margin-top: 2px}
|
||||
.settings .logo {position: relative; margin-top: 2px; width: 100px}
|
||||
.settings .version {position: relative; display: block; margin-top: 5px; margin-bottom: 10px; font-size: 10px; color: #bbb}
|
||||
.settings .settingsColumn1 {width: 220px; height: 560px; padding: 20px; float: left}
|
||||
.settings .settingsColumn2 {width: 420px; height: 560px; padding: 20px 20px 20px 0; float: left}
|
||||
@@ -41,5 +42,5 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
}
|
||||
.settings .plugins {font-family: arial, verdana, helvetica, sans-serif; width: 410px; height: 95px; overflow: auto}
|
||||
.settings .info {font-size: 10px; color: #bbb; cursor: help}
|
||||
.settings .update {position: absolute; bottom: 0; right: 20px; padding: 5px 10px; font-size: 18px; background-color: rgba(0,198,255,0.7); opacity: 0.1; cursor: pointer}
|
||||