mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-15 21:07:12 +01:00
Compare commits
280 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
330ec0d605 | ||
|
|
462ee75980 | ||
|
|
0470231a37 | ||
|
|
6f9c127c1b | ||
|
|
3facbe2de6 | ||
|
|
ea49fed017 | ||
|
|
166b5e34b9 | ||
|
|
e52998079b | ||
|
|
863f13d3cf | ||
|
|
f2b4535d31 | ||
|
|
5695d2c3c7 | ||
|
|
879feca2ce | ||
|
|
4ee4ab9247 | ||
|
|
af86a93993 | ||
|
|
343c07c238 | ||
|
|
7fd08afe14 | ||
|
|
6117145239 | ||
|
|
1403136d0e | ||
|
|
fc0a994b6b | ||
|
|
9712c369c1 | ||
|
|
85a9cfaecd | ||
|
|
c34b2608cc | ||
|
|
ad30ff3c45 | ||
|
|
74355c0d00 | ||
|
|
208897b040 | ||
|
|
8d6c58af36 | ||
|
|
12e6bedf6d | ||
|
|
0cb99eb48f | ||
|
|
45ec256d4f | ||
|
|
04fa37a358 | ||
|
|
c21d57e36e | ||
|
|
de5e759ac9 | ||
|
|
bb1c047ece | ||
|
|
67d44e56bb | ||
|
|
c7c984f66a | ||
|
|
d320bb7172 | ||
|
|
fb82ab881c | ||
|
|
366ad3257e | ||
|
|
75de0f3a08 | ||
|
|
47f64bf874 | ||
|
|
400ef8cfce | ||
|
|
797df35ffe | ||
|
|
551f3f248b | ||
|
|
a2cf9483d6 | ||
|
|
77329e9119 | ||
|
|
7faf1099b0 | ||
|
|
8893a29bd3 | ||
|
|
669827653e | ||
|
|
c6058959e3 | ||
|
|
b3acb61201 | ||
|
|
7d66f32e5b | ||
|
|
0583f1ea1c | ||
|
|
f278394346 | ||
|
|
ba634bbeed | ||
|
|
a488c19d61 | ||
|
|
c1982279f4 | ||
|
|
ed6a9bb03c | ||
|
|
4d7ac54e6b | ||
|
|
fac5bf8662 | ||
|
|
8f1cca087b | ||
|
|
d826469c49 | ||
|
|
878ceef2ec | ||
|
|
e1a1b1b1cf | ||
|
|
9f408abb34 | ||
|
|
52d7d0819c | ||
|
|
46a0e62a84 | ||
|
|
bd692990cb | ||
|
|
9b7f0bd15a | ||
|
|
fcd1b4fb64 | ||
|
|
c96c5cd12b | ||
|
|
db3130f911 | ||
|
|
ae37460e92 | ||
|
|
2e601a4ccc | ||
|
|
f76270b7b9 | ||
|
|
694daa15aa | ||
|
|
0d8cd9a612 | ||
|
|
2171dd5664 | ||
|
|
9a9d66ffb9 | ||
|
|
b5566c8382 | ||
|
|
385d4e0efd | ||
|
|
8eeb64ad09 | ||
|
|
caa9fab5b4 | ||
|
|
c087283e46 | ||
|
|
55f8b9adc2 | ||
|
|
9cb89463bb | ||
|
|
3a48fd9cdd | ||
|
|
c4bba758c7 | ||
|
|
db44da92f1 | ||
|
|
bedd75c0c5 | ||
|
|
c277d3a6bb | ||
|
|
f681cc88c9 | ||
|
|
c106c0a410 | ||
|
|
50a4a3e4bc | ||
|
|
586a4e6a64 | ||
|
|
ef98e4f5ab | ||
|
|
7f039d81d8 | ||
|
|
ab39f9f51b | ||
|
|
47263bdbed | ||
|
|
b65a7a690e | ||
|
|
3dc26528b4 | ||
|
|
73305b3be2 | ||
|
|
de4c63c37e | ||
|
|
8b720dd0e6 | ||
|
|
f0a2bbc531 | ||
|
|
c322c501ac | ||
|
|
5f948d9c56 | ||
|
|
b2d13e0e30 | ||
|
|
4a1ba5dfe3 | ||
|
|
6861fa9ced | ||
|
|
29857e7d70 | ||
|
|
b50bc5e598 | ||
|
|
aaf1ce1526 | ||
|
|
36b20938b7 | ||
|
|
670e3c47a6 | ||
|
|
4ef49f0172 | ||
|
|
aef3340d0f | ||
|
|
3ea34fb87a | ||
|
|
efdf729f83 | ||
|
|
5ce3a9912c | ||
|
|
2897c75a3d | ||
|
|
fe29a57cdb | ||
|
|
f75bd9fe53 | ||
|
|
a7c0123072 | ||
|
|
3b84af75d2 | ||
|
|
505f5b35c7 | ||
|
|
77c0f61d7b | ||
|
|
8d5715ebcd | ||
|
|
cab12fd73c | ||
|
|
7acd53dd54 | ||
|
|
edbe8af62f | ||
|
|
6f50a23f3b | ||
|
|
53e5a4e3cb | ||
|
|
b1ef03513c | ||
|
|
e8cc6c540a | ||
|
|
f137a95704 | ||
|
|
453850a891 | ||
|
|
b3e2b497ff | ||
|
|
c8b1e573b5 | ||
|
|
180d26f837 | ||
|
|
07117591e5 | ||
|
|
d72c8a46d5 | ||
|
|
a24d9fc8da | ||
|
|
39541f4c81 | ||
|
|
7fc5c23b50 | ||
|
|
edc9f858fc | ||
|
|
429fab5c17 | ||
|
|
1c7d96a026 | ||
|
|
394a264ca9 | ||
|
|
1a2a921753 | ||
|
|
b650b64455 | ||
|
|
d43278fbf7 | ||
|
|
4a23fe12a3 | ||
|
|
2d45e6e297 | ||
|
|
df685b308e | ||
|
|
2b44096c4e | ||
|
|
b5550d4ba8 | ||
|
|
7e40f9c044 | ||
|
|
add96dc9d2 | ||
|
|
5fe097a84a | ||
|
|
0651eedf1e | ||
|
|
f7089ec6ca | ||
|
|
2f66afa4e4 | ||
|
|
6e12da596c | ||
|
|
cf26b5b4e2 | ||
|
|
ebf12f327f | ||
|
|
34d0dec862 | ||
|
|
24c6b870fc | ||
|
|
860590214d | ||
|
|
1d69fabce2 | ||
|
|
669d06a4c6 | ||
|
|
ce38b126dc | ||
|
|
18d66850fa | ||
|
|
78a4a35b17 | ||
|
|
e524012ec0 | ||
|
|
3432f9c331 | ||
|
|
f1b090351a | ||
|
|
2371455f45 | ||
|
|
27b2953d9d | ||
|
|
b90dbda803 | ||
|
|
3d0625231f | ||
|
|
d66d41b17f | ||
|
|
741a2bcc93 | ||
|
|
24c4409c12 | ||
|
|
94512c31dd | ||
|
|
56d1f60675 | ||
|
|
defc8d4ffa | ||
|
|
51661a41dd | ||
|
|
1ffea52e69 | ||
|
|
0e64cbdc7f | ||
|
|
b77fc4d3bb | ||
|
|
1fce0da413 | ||
|
|
5e1557171f | ||
|
|
35d1b01727 | ||
|
|
94310226b4 | ||
|
|
af19a5b825 | ||
|
|
aa939e2655 | ||
|
|
cd96fe4326 | ||
|
|
eff7e7fa85 | ||
|
|
de1704a617 | ||
|
|
40a2db446a | ||
|
|
bf997fba42 | ||
|
|
e462633dab | ||
|
|
760a90dadc | ||
|
|
bbac17a2b7 | ||
|
|
10f269734c | ||
|
|
b6baa39f0b | ||
|
|
2a4d75bf9d | ||
|
|
15bce56967 | ||
|
|
14f84ad668 | ||
|
|
cea9a4e299 | ||
|
|
dff76a439d | ||
|
|
4751e1c24a | ||
|
|
ec14772abd | ||
|
|
4f47e717e6 | ||
|
|
41e3e1c821 | ||
|
|
5ec63bb973 | ||
|
|
e05fc594b7 | ||
|
|
79669fe8c7 | ||
|
|
68078c028c | ||
|
|
fa2478f2f7 | ||
|
|
8c237d3551 | ||
|
|
5ae9e0b92e | ||
|
|
3258c45eb9 | ||
|
|
b797acea90 | ||
|
|
91f47a4e20 | ||
|
|
cfc4410275 | ||
|
|
bc552d2d2f | ||
|
|
30025333dd | ||
|
|
5ac87ffbf7 | ||
|
|
a08586252a | ||
|
|
d1e4404038 | ||
|
|
b235b40715 | ||
|
|
9b7d987d0b | ||
|
|
5b88f7172b | ||
|
|
4c5583e191 | ||
|
|
bafe89a7f3 | ||
|
|
1942b3143d | ||
|
|
28d03e07b5 | ||
|
|
6579378e19 | ||
|
|
8a57b241bd | ||
|
|
ff39f44569 | ||
|
|
9ea459787e | ||
|
|
084269bf35 | ||
|
|
b601ea0e85 | ||
|
|
574e71f5e7 | ||
|
|
8189985a72 | ||
|
|
bfc1babb64 | ||
|
|
4edbf8d79d | ||
|
|
f411370e32 | ||
|
|
2ea0ae8793 | ||
|
|
ed08585867 | ||
|
|
15eba478ac | ||
|
|
16da2d6a88 | ||
|
|
0b7120633d | ||
|
|
14ab734c96 | ||
|
|
414e814de2 | ||
|
|
d14fae9dd4 | ||
|
|
114b7e5d10 | ||
|
|
4c27e23d80 | ||
|
|
fbd8475b6e | ||
|
|
d348191a37 | ||
|
|
3958742c12 | ||
|
|
0e11386448 | ||
|
|
ee1d3cfcc0 | ||
|
|
491191ebde | ||
|
|
bf44a2515e | ||
|
|
869d184939 | ||
|
|
401568677e | ||
|
|
ea7a697e7d | ||
|
|
a029eceb9d | ||
|
|
7ef86360d8 | ||
|
|
746b133a9a | ||
|
|
c141fc2864 | ||
|
|
cc5cd166be | ||
|
|
2409bc19c2 | ||
|
|
297e482b11 | ||
|
|
46c1bdce02 | ||
|
|
be74745318 | ||
|
|
cd2e2747c5 | ||
|
|
3a7e728871 |
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,7 +1,9 @@
|
||||
error-log.txt
|
||||
backups/*.zip
|
||||
backups/*
|
||||
!backups/index.php
|
||||
lib/config-*
|
||||
plugins/*
|
||||
!plugins/index.php
|
||||
test/test-file1.txt
|
||||
tmp/oldVersion
|
||||
tmp/new-version*
|
||||
tmp/bug-report.log
|
||||
tmp/*
|
||||
!tmp/index.php
|
||||
File diff suppressed because one or more lines are too long
@@ -1,37 +0,0 @@
|
||||
/* 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;
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.CodeMirror-hint-active {
|
||||
li.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* The lint marker gutter */
|
||||
.CodeMirror-lint-markers {
|
||||
width: 12px; margin-left: 2px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-tooltip {
|
||||
@@ -43,7 +43,7 @@
|
||||
.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
cursor: help;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
55
CodeMirror/lib/codemirror-compressed.js
vendored
Normal file
55
CodeMirror/lib/codemirror-compressed.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -4,10 +4,7 @@
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
/* Set scrolling behaviour here */
|
||||
overflow: auto;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
@@ -36,10 +33,12 @@
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
@@ -49,15 +48,42 @@
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: #7e7;
|
||||
}
|
||||
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
@keyframes blink {
|
||||
0% { background: #7e7; }
|
||||
50% { background: none; }
|
||||
100% { background: #7e7; }
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; }
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
@@ -95,12 +121,18 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
@@ -109,14 +141,13 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
@@ -124,14 +155,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
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
|
||||
@@ -161,29 +188,36 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
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;
|
||||
margin-bottom: -30px;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
height: 100%;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
@@ -200,6 +234,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
@@ -221,8 +256,18 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-wrap .CodeMirror-scroll {
|
||||
overflow-x: hidden;
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
@@ -243,7 +288,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
@@ -252,6 +297,8 @@ div.CodeMirror-cursors {
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror ::selection { background: #d7d4f0; }
|
||||
.CodeMirror ::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
@@ -270,3 +317,9 @@ div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
@@ -10,8 +10,14 @@
|
||||
|
||||
.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
|
||||
.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
|
||||
.cm-s-3024-day.CodeMirror ::selection { background: #d6d5d4; }
|
||||
.cm-s-3024-day.CodeMirror ::-moz-selection { background: #d9d9d9; }
|
||||
|
||||
.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
|
||||
.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
|
||||
.cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; }
|
||||
.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;}
|
||||
@@ -31,4 +37,4 @@
|
||||
.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;}
|
||||
.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important;}
|
||||
@@ -10,8 +10,13 @@
|
||||
|
||||
.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
|
||||
.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
|
||||
.cm-s-3024-night.CodeMirror ::selection { background: rgba(58, 52, 50, .99); }
|
||||
.cm-s-3024-night.CodeMirror ::-moz-selection { background: rgba(58, 52, 50, .99); }
|
||||
.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
|
||||
.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
|
||||
.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
|
||||
.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;}
|
||||
@@ -30,12 +30,10 @@
|
||||
.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
|
||||
.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }
|
||||
|
||||
.cm-s-ambiance .CodeMirror-selected {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
.cm-s-ambiance .CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }
|
||||
.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-ambiance.CodeMirror ::selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-ambiance.CodeMirror ::-moz-selection { background: rgba(255, 255, 255, 0.10); }
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
@@ -56,10 +54,13 @@
|
||||
|
||||
.cm-s-ambiance .CodeMirror-linenumber {
|
||||
text-shadow: 0px 1px 1px #4d4d4d;
|
||||
color: #222;
|
||||
color: #111;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.cm-s-ambiance .CodeMirror-guttermarker { color: #aaa; }
|
||||
.cm-s-ambiance .CodeMirror-guttermarker-subtle { color: #111; }
|
||||
|
||||
.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor {
|
||||
border-left: 1px solid #7991E8;
|
||||
}
|
||||
@@ -9,8 +9,12 @@
|
||||
*/
|
||||
|
||||
.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
|
||||
.cm-s-base16-dark div.CodeMirror-selected {background: #202020 !important;}
|
||||
.cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}
|
||||
.cm-s-base16-dark.CodeMirror ::selection { background: rgba(48, 48, 48, .99); }
|
||||
.cm-s-base16-dark.CodeMirror ::-moz-selection { background: rgba(48, 48, 48, .99); }
|
||||
.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
|
||||
.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
|
||||
.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
|
||||
.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}
|
||||
.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}
|
||||
|
||||
@@ -30,5 +34,5 @@
|
||||
.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-activeline-background {background: #202020 !important;}
|
||||
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
|
||||
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
|
||||
.cm-s-base16-light.CodeMirror ::selection { background: #e0e0e0; }
|
||||
.cm-s-base16-light.CodeMirror ::-moz-selection { background: #e0e0e0; }
|
||||
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
|
||||
.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
|
||||
.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
|
||||
.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
|
||||
.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
|
||||
.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
|
||||
.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
|
||||
.cm-s-blackboard.CodeMirror ::selection { background: rgba(37, 59, 118, .99); }
|
||||
.cm-s-blackboard.CodeMirror ::-moz-selection { background: rgba(37, 59, 118, .99); }
|
||||
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
|
||||
.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
|
||||
.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
|
||||
.cm-s-blackboard .CodeMirror-linenumber { color: #888; }
|
||||
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
|
||||
.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
|
||||
.cm-s-cobalt.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-cobalt.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
|
||||
.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
33
CodeMirror/theme/colorforth.css
vendored
Normal file
33
CodeMirror/theme/colorforth.css
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
.cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }
|
||||
.cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }
|
||||
.cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }
|
||||
.cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }
|
||||
.cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-colorforth span.cm-comment { color: #ededed; }
|
||||
.cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; }
|
||||
.cm-s-colorforth span.cm-keyword { color: #ffd900; }
|
||||
.cm-s-colorforth span.cm-builtin { color: #00d95a; }
|
||||
.cm-s-colorforth span.cm-variable { color: #73ff00; }
|
||||
.cm-s-colorforth span.cm-string { color: #007bff; }
|
||||
.cm-s-colorforth span.cm-number { color: #00c4ff; }
|
||||
.cm-s-colorforth span.cm-atom { color: #606060; }
|
||||
|
||||
.cm-s-colorforth span.cm-variable-2 { color: #EEE; }
|
||||
.cm-s-colorforth span.cm-variable-3 { color: #DDD; }
|
||||
.cm-s-colorforth span.cm-property {}
|
||||
.cm-s-colorforth span.cm-operator {}
|
||||
|
||||
.cm-s-colorforth span.cm-meta { color: yellow; }
|
||||
.cm-s-colorforth span.cm-qualifier { color: #FFF700; }
|
||||
.cm-s-colorforth span.cm-bracket { color: #cc7; }
|
||||
.cm-s-colorforth span.cm-tag { color: #FFBD40; }
|
||||
.cm-s-colorforth span.cm-attribute { color: #FFF700; }
|
||||
.cm-s-colorforth span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-colorforth .CodeMirror-selected { background: #333d53 !important; }
|
||||
|
||||
.cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }
|
||||
|
||||
.cm-s-colorforth .CodeMirror-activeline-background {background: #253540 !important;}
|
||||
@@ -1,6 +1,10 @@
|
||||
.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
|
||||
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
|
||||
.cm-s-erlang-dark.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-erlang-dark.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
40
CodeMirror/theme/icecoder-classic.css
vendored
Normal file
40
CodeMirror/theme/icecoder-classic.css
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/* ICEcoder classic theme by Matt Pass */
|
||||
|
||||
.cm-s-icecoder-classic {color: #666; background: #161612}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-keyword {color: #eee; font-weight:bold}
|
||||
.cm-s-icecoder-classic span.cm-atom {color: #8b67cc}
|
||||
.cm-s-icecoder-classic span.cm-number {color: #080}
|
||||
.cm-s-icecoder-classic span.cm-def {color: #ca7919}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-variable {color: #85b525}
|
||||
.cm-s-icecoder-classic span.cm-variable-2 {color: #c71e5b}
|
||||
.cm-s-icecoder-classic span.cm-variable-3 {color: #080}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-property {color: #85b525}
|
||||
.cm-s-icecoder-classic span.cm-operator {color: #080}
|
||||
.cm-s-icecoder-classic span.cm-comment {color: #444}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-string {color: #ccb100}
|
||||
.cm-s-icecoder-classic span.cm-string-2 {color: #cc6d00}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-meta {color: #555}
|
||||
.cm-s-icecoder-classic span.cm-error {color: #d00}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-qualifier {color: #555}
|
||||
.cm-s-icecoder-classic span.cm-builtin {color: #0052a3}
|
||||
.cm-s-icecoder-classic span.cm-bracket {color: #cc7}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-tag {color: #e8e8e8}
|
||||
.cm-s-icecoder-classic span.cm-attribute {color: #099}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-header {color: #808}
|
||||
.cm-s-icecoder-classic span.cm-quote {color: #070}
|
||||
.cm-s-icecoder-classic span.cm-hr {color: #888}
|
||||
.cm-s-icecoder-classic span.cm-link {color: #cc0}
|
||||
|
||||
.cm-s-icecoder-classic .CodeMirror-cursor {border-left: 1px solid white !important}
|
||||
.cm-s-icecoder-classic .CodeMirror-selected {color: #fff !important; background: #037 !important}
|
||||
.cm-s-icecoder-classic .CodeMirror-gutters {background: #161612; min-width: 41px; border-right: 0}
|
||||
.cm-s-icecoder-classic .CodeMirror-linenumber {color: #555; cursor: default}
|
||||
.cm-s-icecoder-classic .CodeMirror-matchingbracket {border: 1px solid grey; color: black !important}
|
||||
@@ -7,12 +7,16 @@ Ported to CodeMirror by Peter Kroon
|
||||
}
|
||||
.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 ::selection { background: rgba(69, 68, 59, .99); }
|
||||
.cm-s-lesser-dark.CodeMirror ::-moz-selection { background: rgba(69, 68, 59, .99); }
|
||||
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
|
||||
|
||||
.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-guttermarker { color: #599eff; }
|
||||
.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }
|
||||
.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
|
||||
|
||||
.cm-s-lesser-dark span.cm-keyword { color: #599eff; }
|
||||
95
CodeMirror/theme/liquibyte.css
vendored
Normal file
95
CodeMirror/theme/liquibyte.css
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
.cm-s-liquibyte.CodeMirror {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
line-height: 1.2em;
|
||||
font-size: 1em;
|
||||
}
|
||||
.CodeMirror-focused .cm-matchhighlight {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #0f0;
|
||||
text-decoration-style: wavy;
|
||||
}
|
||||
.cm-trailingspace {
|
||||
text-decoration: line-through;
|
||||
text-decoration-color: #f00;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-tab {
|
||||
text-decoration: line-through;
|
||||
text-decoration-color: #404040;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; }
|
||||
.cm-s-liquibyte .CodeMirror-gutter-elt div{ font-size: 1.2em; }
|
||||
.cm-s-liquibyte .CodeMirror-guttermarker { }
|
||||
.cm-s-liquibyte .CodeMirror-guttermarker-subtle { }
|
||||
.cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0;}
|
||||
.cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee !important; }
|
||||
|
||||
.cm-s-liquibyte span.cm-comment { color: #008000; }
|
||||
.cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-string { color: #ff8000; }
|
||||
.cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; }
|
||||
|
||||
.cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-variable-3 { color: #c080ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-operator { color: #fff; }
|
||||
|
||||
.cm-s-liquibyte span.cm-meta { color: #0f0; }
|
||||
.cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-bracket { color: #cc7; }
|
||||
.cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-liquibyte .CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25) !important; }
|
||||
|
||||
.cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); }
|
||||
|
||||
.cm-s-liquibyte .CodeMirror-activeline-background {background-color: rgba(0, 255, 0, 0.15) !important;}
|
||||
|
||||
/* Default styles for common addons */
|
||||
div.CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; }
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; }
|
||||
.CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); }
|
||||
/* Scrollbars */
|
||||
/* Simple */
|
||||
div.CodeMirror-simplescroll-horizontal div:hover, div.CodeMirror-simplescroll-vertical div:hover {
|
||||
background-color: rgba(80, 80, 80, .7);
|
||||
}
|
||||
div.CodeMirror-simplescroll-horizontal div, div.CodeMirror-simplescroll-vertical div {
|
||||
background-color: rgba(80, 80, 80, .3);
|
||||
border: 1px solid #404040;
|
||||
border-radius: 5px;
|
||||
}
|
||||
div.CodeMirror-simplescroll-vertical div {
|
||||
border-top: 1px solid #404040;
|
||||
border-bottom: 1px solid #404040;
|
||||
}
|
||||
div.CodeMirror-simplescroll-horizontal div {
|
||||
border-left: 1px solid #404040;
|
||||
border-right: 1px solid #404040;
|
||||
}
|
||||
div.CodeMirror-simplescroll-vertical {
|
||||
background-color: #262626;
|
||||
}
|
||||
div.CodeMirror-simplescroll-horizontal {
|
||||
background-color: #262626;
|
||||
border-top: 1px solid #404040;
|
||||
}
|
||||
/* Overlay */
|
||||
div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div {
|
||||
background-color: #404040;
|
||||
border-radius: 5px;
|
||||
}
|
||||
div.CodeMirror-overlayscroll-vertical div {
|
||||
border: 1px solid #404040;
|
||||
}
|
||||
div.CodeMirror-overlayscroll-horizontal div {
|
||||
border: 1px solid #404040;
|
||||
}
|
||||
37
CodeMirror/theme/mbo.css
vendored
Normal file
37
CodeMirror/theme/mbo.css
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/****************************************************************/
|
||||
/* Based on mbonaci's Brackets mbo theme */
|
||||
/* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */
|
||||
/* Create your own: http://tmtheme-editor.herokuapp.com */
|
||||
/****************************************************************/
|
||||
|
||||
.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}
|
||||
.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
|
||||
.cm-s-mbo.CodeMirror ::selection { background: rgba(113, 108, 98, .99); }
|
||||
.cm-s-mbo.CodeMirror ::-moz-selection { background: rgba(113, 108, 98, .99); }
|
||||
.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
|
||||
.cm-s-mbo .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
|
||||
.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-string.cm-property {color: #ffffec;}
|
||||
|
||||
.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 {border-bottom: #636363; color: #ffffec;}
|
||||
.cm-s-mbo span.cm-qualifier {color: #ffffec;}
|
||||
|
||||
.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;}
|
||||
.cm-s-mbo .CodeMirror-matchingbracket {color: #222 !important;}
|
||||
.cm-s-mbo .CodeMirror-matchingtag {background: rgba(255, 255, 255, .37);}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
MDN-LIKE Theme - Mozilla
|
||||
Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
|
||||
Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues
|
||||
Report bugs/issues here: https://github.com/codemirror/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
|
||||
@@ -9,9 +9,11 @@
|
||||
*/
|
||||
.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
|
||||
.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
|
||||
.cm-s-mdn-like.CodeMirror ::selection { background: #cfc; }
|
||||
.cm-s-mdn-like.CodeMirror ::-moz-selection { background: #cfc; }
|
||||
|
||||
.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; }
|
||||
.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; }
|
||||
div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
|
||||
|
||||
.cm-s-mdn-like .cm-keyword { color: #6262FF; }
|
||||
@@ -15,7 +15,11 @@
|
||||
.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 ::selection { background: rgba(49, 77, 103, .99); }
|
||||
.cm-s-midnight.CodeMirror ::-moz-selection { background: rgba(49, 77, 103, .99); }
|
||||
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
|
||||
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
|
||||
.cm-s-midnight .CodeMirror-cursor {
|
||||
border-left: 1px solid #F8F8F0 !important;
|
||||
@@ -2,7 +2,11 @@
|
||||
|
||||
.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
|
||||
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
|
||||
.cm-s-monokai.CodeMirror ::selection { background: rgba(73, 72, 62, .99); }
|
||||
.cm-s-monokai.CodeMirror ::-moz-selection { background: rgba(73, 72, 62, .99); }
|
||||
.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
|
||||
.cm-s-monokai .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;}
|
||||
.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}
|
||||
|
||||
@@ -14,7 +18,7 @@
|
||||
.cm-s-monokai span.cm-keyword {color: #f92672;}
|
||||
.cm-s-monokai span.cm-string {color: #e6db74;}
|
||||
|
||||
.cm-s-monokai span.cm-variable {color: #a6e22e;}
|
||||
.cm-s-monokai span.cm-variable {color: #f8f8f2;}
|
||||
.cm-s-monokai span.cm-variable-2 {color: #9effff;}
|
||||
.cm-s-monokai span.cm-def {color: #fd971f;}
|
||||
.cm-s-monokai span.cm-bracket {color: #f8f8f2;}
|
||||
@@ -32,6 +32,9 @@
|
||||
color:#e0e2e5;
|
||||
}
|
||||
|
||||
.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
|
||||
.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
|
||||
|
||||
.cm-s-neo div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
@@ -2,7 +2,11 @@
|
||||
|
||||
.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-night div.CodeMirror-selected { background: #447 !important; }
|
||||
.cm-s-night.CodeMirror ::selection { background: rgba(68, 68, 119, .99); }
|
||||
.cm-s-night.CodeMirror ::-moz-selection { background: rgba(68, 68, 119, .99); }
|
||||
.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-night .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
|
||||
.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
|
||||
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
|
||||
.cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); }
|
||||
.cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); }
|
||||
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
|
||||
.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
|
||||
.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
|
||||
.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
|
||||
.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
|
||||
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
|
||||
.cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; }
|
||||
.cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; }
|
||||
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
|
||||
.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
|
||||
.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
|
||||
.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
|
||||
.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
|
||||
|
||||
@@ -14,11 +14,16 @@
|
||||
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 ::selection { background: rgba(221,240,255,0.2); }
|
||||
.cm-s-pastel-on-dark.CodeMirror ::-moz-selection { background: rgba(221,240,255,0.2); }
|
||||
|
||||
.cm-s-pastel-on-dark .CodeMirror-gutters {
|
||||
background: #34302f;
|
||||
border-right: 0px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
.cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; }
|
||||
.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; }
|
||||
@@ -1,6 +1,10 @@
|
||||
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
|
||||
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
|
||||
.cm-s-rubyblue.CodeMirror ::selection { background: rgba(56, 86, 111, 0.99); }
|
||||
.cm-s-rubyblue.CodeMirror ::-moz-selection { background: rgba(56, 86, 111, 0.99); }
|
||||
.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
|
||||
.cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
|
||||
.cm-s-rubyblue .CodeMirror-linenumber { color: white; }
|
||||
.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
@@ -53,7 +53,7 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
|
||||
.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 { color: #839496; }
|
||||
.cm-s-solarized .cm-variable-2 { color: #b58900; }
|
||||
.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
|
||||
|
||||
@@ -88,24 +88,19 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
|
||||
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-dark .CodeMirror-selected { background: #073642; }
|
||||
.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
|
||||
.cm-s-solarized.cm-s-dark.CodeMirror ::-moz-selection { background: rgba(7, 54, 66, 0.99); }
|
||||
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-selected {
|
||||
background: #eee8d5;
|
||||
}
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-selected { background: #eee8d5; }
|
||||
.cm-s-solarized.cm-s-light.CodeMirror ::selection { background: #eee8d5; }
|
||||
.cm-s-solarized.cm-s-lightCodeMirror ::-moz-selection { background: #eee8d5; }
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
@@ -146,6 +141,9 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
|
||||
color: #586e75;
|
||||
padding: 0 5px;
|
||||
}
|
||||
.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
|
||||
|
||||
.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
|
||||
color: #586e75;
|
||||
@@ -1,6 +1,10 @@
|
||||
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
|
||||
.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
|
||||
.cm-s-the-matrix.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-the-matrix.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
|
||||
.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
|
||||
.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
|
||||
.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
|
||||
.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }
|
||||
|
||||
35
CodeMirror/theme/tomorrow-night-bright.css
vendored
Normal file
35
CodeMirror/theme/tomorrow-night-bright.css
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
|
||||
Name: Tomorrow Night - Bright
|
||||
Author: Chris Kempson
|
||||
|
||||
Port done by Gerard Braad <me@gbraad.nl>
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-tomorrow-night-bright.CodeMirror {background: #000000; color: #eaeaea;}
|
||||
.cm-s-tomorrow-night-bright div.CodeMirror-selected {background: #424242 !important;}
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-gutters {background: #000000; border-right: 0px;}
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-linenumber {color: #424242;}
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
|
||||
|
||||
.cm-s-tomorrow-night-bright span.cm-comment {color: #d27b53;}
|
||||
.cm-s-tomorrow-night-bright span.cm-atom {color: #a16a94;}
|
||||
.cm-s-tomorrow-night-bright span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute {color: #99cc99;}
|
||||
.cm-s-tomorrow-night-bright span.cm-keyword {color: #d54e53;}
|
||||
.cm-s-tomorrow-night-bright span.cm-string {color: #e7c547;}
|
||||
|
||||
.cm-s-tomorrow-night-bright span.cm-variable {color: #b9ca4a;}
|
||||
.cm-s-tomorrow-night-bright span.cm-variable-2 {color: #7aa6da;}
|
||||
.cm-s-tomorrow-night-bright span.cm-def {color: #e78c45;}
|
||||
.cm-s-tomorrow-night-bright span.cm-bracket {color: #eaeaea;}
|
||||
.cm-s-tomorrow-night-bright span.cm-tag {color: #d54e53;}
|
||||
.cm-s-tomorrow-night-bright span.cm-link {color: #a16a94;}
|
||||
.cm-s-tomorrow-night-bright span.cm-error {background: #d54e53; color: #6A6A6A;}
|
||||
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-activeline-background {background: #2a2a2a !important;}
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
.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 ::selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-tomorrow-night-eighties.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
|
||||
.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
|
||||
.cm-s-twilight.CodeMirror ::selection { background: rgba(50, 50, 50, 0.99); }
|
||||
.cm-s-twilight.CodeMirror ::-moz-selection { background: rgba(50, 50, 50, 0.99); }
|
||||
|
||||
.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
|
||||
.cm-s-twilight .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; }
|
||||
.cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
|
||||
.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
|
||||
.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
|
||||
.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
|
||||
.cm-s-vibrant-ink.CodeMirror ::selection { background: rgba(53, 73, 60, 0.99); }
|
||||
.cm-s-vibrant-ink.CodeMirror ::-moz-selection { background: rgba(53, 73, 60, 0.99); }
|
||||
|
||||
.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
@@ -22,7 +22,11 @@ THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
|
||||
.cm-s-xq-dark.CodeMirror ::selection { background: rgba(39, 0, 122, 0.99); }
|
||||
.cm-s-xq-dark.CodeMirror ::-moz-selection { background: rgba(39, 0, 122, 0.99); }
|
||||
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
|
||||
.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
37
CodeMirror/theme/zenburn.css
vendored
Normal file
37
CodeMirror/theme/zenburn.css
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* "
|
||||
* Using Zenburn color palette from the Emacs Zenburn Theme
|
||||
* https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
|
||||
*
|
||||
* Also using parts of https://github.com/xavi/coderay-lighttable-theme
|
||||
* "
|
||||
* From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
|
||||
*/
|
||||
|
||||
.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
|
||||
.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
|
||||
.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
.cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
|
||||
.cm-s-zenburn span.cm-comment { color: #7f9f7f; }
|
||||
.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
|
||||
.cm-s-zenburn span.cm-atom { color: #bfebbf; }
|
||||
.cm-s-zenburn span.cm-def { color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-variable { color: #dfaf8f; }
|
||||
.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-string { color: #cc9393; }
|
||||
.cm-s-zenburn span.cm-string-2 { color: #cc9393; }
|
||||
.cm-s-zenburn span.cm-number { color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-tag { color: #93e0e3; }
|
||||
.cm-s-zenburn span.cm-property { color: #dfaf8f; }
|
||||
.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
|
||||
.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
|
||||
.cm-s-zenburn span.cm-meta { color: #f0dfaf; }
|
||||
.cm-s-zenburn span.cm-header { color: #f0efd0; }
|
||||
.cm-s-zenburn span.cm-operator { color: #f0efd0; }
|
||||
.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }
|
||||
.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }
|
||||
.cm-s-zenburn .CodeMirror-activeline { background: #000000; }
|
||||
.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }
|
||||
.cm-s-zenburn .CodeMirror-selected { background: #545454; }
|
||||
.cm-s-zenburn .CodeMirror-focused .CodeMirror-selected { background: #4f4f4f; }
|
||||
@@ -1,7 +1,7 @@
|
||||
Copyright: © 2014 Matt Pass
|
||||
Website: mattpass.com
|
||||
Email: matt@mattpass.com
|
||||
Twitter: @mattpass
|
||||
Copyright: © 2015 ICEcoder Ltd
|
||||
Website: icecoder.net
|
||||
Email: info@icecoder.net
|
||||
Twitter: @icecoder
|
||||
|
||||
#ICEcoder License
|
||||
##Standard Open Source Initiative MIT License
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
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="https://icecoder.net/images/icecoder-v4-2-browser-code-editor.png" alt="ICEcoder web IDE">
|
||||
<img src="https://icecoder.net/images/icecoder-v5-0-browser-code-editor.png" alt="ICEcoder web IDE">
|
||||
|
||||
###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).
|
||||
|
||||
4
backups/index.php
Normal file
4
backups/index.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header("Location: ../");
|
||||
die();
|
||||
?>
|
||||
254
editor.php
254
editor.php
@@ -10,30 +10,44 @@ $t = $text['editor'];
|
||||
<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">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/hint/show-hint.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/lint/lint.css?microtime=<?php echo microtime(true);?>">
|
||||
<!--
|
||||
codemirror-compressed.js
|
||||
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>
|
||||
<script src="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint-2.5.6.min.js")) {
|
||||
echo '<script src="plugins/jshint/jshint-2.5.6.min.js?microtime='.microtime(true).'></script>';
|
||||
};?>
|
||||
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="lib/foldcode.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
|
||||
echo '<script src="plugins/emmet/emmet.min.js"></script>';
|
||||
echo '<script src="plugins/emmet/emmet.min.js?microtime='.microtime(true).'"></script>';
|
||||
};?>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) {
|
||||
echo '<script src="plugins/pesticide/pesticide.js"></script>';
|
||||
echo '<script src="plugins/pesticide/pesticide.js?microtime='.microtime(true).'"></script>';
|
||||
};?>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/stats.js/stats.min.js")) {
|
||||
echo '<script src="plugins/stats.js/stats.min.js?microtime='.microtime(true).'"></script>';
|
||||
};?>
|
||||
<link rel="stylesheet" href="<?php
|
||||
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
|
||||
$activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","neat","solarized","xq-light")) !== false ? "#ccc" : "#000";
|
||||
echo "?microtime=".microtime(true);
|
||||
if (array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","mdn-like","neat","neo","paraiso-light","solarized","the-matrix","xq-light")) !== false) {
|
||||
$activeLineBG = "#ccc";
|
||||
} elseif (array_search($ICEcoder["theme"],array("3024-night","blackboard","colorforth","liquibyte","night","tomorrow-night-bright","tomorrow-night-eighties","vibrant-ink")) !== false) {
|
||||
$activeLineBG = "#888";
|
||||
} else {
|
||||
$activeLineBG = "#000";
|
||||
}
|
||||
?>">
|
||||
|
||||
<style type="text/css">
|
||||
@@ -44,7 +58,7 @@ $activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light",
|
||||
.cm-s-activeLine {background: <?php echo $activeLineBG;?> !important}
|
||||
.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-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.15)}
|
||||
.cm-trailingspace {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
@@ -57,20 +71,22 @@ $activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light",
|
||||
.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}
|
||||
.cm-s-diff {left: 50%}
|
||||
.diffGreen {background: #0b0 !important; color: #000 !important}
|
||||
.diffRed {background: #800 !important; color: #fff !important}
|
||||
.diffGrey {background: #444 !important; color: #fff !important}
|
||||
.diffGreyLighter {background: #888 !important; color: #222 !important}
|
||||
.diffNone {}
|
||||
.info {font-size: 10px; color: rgba(0,198,255,0.7); cursor: help}
|
||||
</style>
|
||||
<link rel="stylesheet" href="lib/file-types.css">
|
||||
<link rel="stylesheet" href="lib/file-type-icons.css">
|
||||
<link rel="stylesheet" href="lib/file-types.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="lib/file-type-icons.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body style="color: #fff; margin: 0" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
<?php if ($ICEcoder['demoMode']) {?>
|
||||
<div class="demoArrow"><?php echo $t['Click icons for...'];?></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">
|
||||
@@ -144,25 +160,52 @@ h2 {color: rgba(0,198,255,0.7)}
|
||||
<div style="float: left">
|
||||
<h2><?php echo $t['dev mode'];?> <?php echo $ICEcoder['devMode'] ? "on" : "off";?></h2>
|
||||
<span class="heading"><?php echo $t['Status'];?>:</span><br>
|
||||
<?php echo $t['Using']?> <?php echo $ICEcoder['devMode'] ? "ice-coder.js" : "ice-coder.min.js";?> <a title="<?php echo $t['You can switch...'];?>" style="cursor: pointer">[?]</a>
|
||||
<?php echo $t['Using']?> <?php echo $ICEcoder['devMode'] ? "ice-coder.js" : "ice-coder.min.js";?> <a title="<?php echo $t['You can switch...'];?>" class="info">[?]</a>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
CodeMirror.keyMap.ICEcoder = {
|
||||
// "Tab": "defaultTab", **Now used by Emmet**
|
||||
"Tab": function(cm) {
|
||||
return cm.somethingSelected()
|
||||
? (top.ICEcoder.indentAuto
|
||||
? cm.execCommand("indentAuto") // Honour our own setting indentAuto
|
||||
: cm.indentSelection("add") // Add indent (this is default handler in CodeMirror)
|
||||
)
|
||||
: CodeMirror.Pass // Falls through to default or Emmet plugin
|
||||
},
|
||||
"Shift-Tab": "indentLess",
|
||||
"Ctrl-Space": "autocomplete",
|
||||
"Ctrl-Up" : false,
|
||||
"Ctrl-Down" : false,
|
||||
"Esc" : false,
|
||||
fallthrough: ["default"]
|
||||
};
|
||||
|
||||
// CodeMirror does not honor indentWithTabs = false properly when handling Tab key
|
||||
// Marijn said that it is by design, so we need to make a workaround of our own
|
||||
(function(){
|
||||
// let's back up original insertTab function which actually puts
|
||||
var originalInsertTabFunction = CodeMirror.commands.insertTab;
|
||||
// and replace it with our own, which branches on whether our ICEcoder.indentWithTabs value is true or false
|
||||
CodeMirror.commands.insertTab = function(cm){
|
||||
if (top.ICEcoder.indentWithTabs){
|
||||
// if it is true, then we should still put there, let's use original function
|
||||
return originalInsertTabFunction(cm);
|
||||
} else {
|
||||
// otherwise - let's call another handler, insertSoftTab which will do the job
|
||||
return cm.execCommand("insertSoftTab");
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
function createNewCMInstance(num) {
|
||||
// Establish the filename for the tab
|
||||
var fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
|
||||
window['cM'+num] = CodeMirror(document.body, {
|
||||
// Define our CodeMirror options
|
||||
var cMOptions = {
|
||||
mode: "application/x-httpd-php",
|
||||
lineNumbers: true,
|
||||
gutters: ["folds","CodeMirror-lint-markers","CodeMirror-linenumbers"],
|
||||
@@ -175,139 +218,60 @@ function createNewCMInstance(num) {
|
||||
autoCloseBrackets: true,
|
||||
highlightSelectionMatches: true,
|
||||
showTrailingSpace: true,
|
||||
lintWith: <?php if ($ICEcoder['codeAssist']) {echo 'fileName && fileName.indexOf(".js")>-1 ? CodeMirror.javascriptValidator : ';};?>false,
|
||||
lint: 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());
|
||||
}
|
||||
);
|
||||
// Start editor instances, main and diff
|
||||
window['cM'+num] = CodeMirror(document.body, cMOptions);
|
||||
window['cM'+num+'diff'] = CodeMirror(document.body, cMOptions);
|
||||
|
||||
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].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");
|
||||
}
|
||||
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});
|
||||
}
|
||||
}
|
||||
);
|
||||
// Define actions for those...
|
||||
|
||||
window['cM'+num].on("beforeSelectionChange", function(thisCM, changeObj) {
|
||||
top.ICEcoder.prevLine = window['cM'+num].getCursor().line;
|
||||
}
|
||||
);
|
||||
// Focus
|
||||
window['cM'+num] .on("focus", function(thisCM) {top.ICEcoder.cMonFocus(thisCM,'cM'+num)});
|
||||
window['cM'+num+'diff'] .on("focus", function(thisCM) {top.ICEcoder.cMonFocus(thisCM,'cM'+num+'diff')});
|
||||
|
||||
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.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 + " <?php echo $t['results'];?>";
|
||||
top.ICEcoder.findMode = false;
|
||||
}
|
||||
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();
|
||||
}
|
||||
);
|
||||
// Blur
|
||||
window['cM'+num] .on("blur", function(thisCM) {top.ICEcoder.cMonBlur(thisCM,'cM'+num)});
|
||||
window['cM'+num+'diff'] .on("blur", function(thisCM) {top.ICEcoder.cMonBlur(thisCM,'cM'+num+'diff')});
|
||||
|
||||
window['cM'+num].on("scroll", function(thisCM) {
|
||||
top.ICEcoder.mouseDown=false;
|
||||
}
|
||||
);
|
||||
// Keyup
|
||||
window['cM'+num] .on("keyup", function(thisCM) {top.ICEcoder.cMonKeyUp(thisCM,'cM'+num)});
|
||||
window['cM'+num+'diff'] .on("keyup", function(thisCM) {top.ICEcoder.cMonKeyUp(thisCM,'cM'+num+'diff')});
|
||||
|
||||
// Cursor activity
|
||||
window['cM'+num] .on("cursorActivity", function(thisCM) {top.ICEcoder.cMonCursorActivity(thisCM,'cM'+num)});
|
||||
window['cM'+num+'diff'] .on("cursorActivity", function(thisCM) {top.ICEcoder.cMonCursorActivity(thisCM,'cM'+num+'diff')});
|
||||
|
||||
window['cM'+num].on("gutterClick", function(thisCM, line, gutter, clickEvent) {
|
||||
CodeMirror.doFold(window['cM'+num].getLine(line).indexOf("{")>-1 ? "brace" : "xml",null,"+","-",false)(window['cM'+num], line);
|
||||
}
|
||||
);
|
||||
// Before selection change
|
||||
window['cM'+num] .on("beforeSelectionChange", function(thisCM, changeObj) {top.ICEcoder.prevLine = thisCM.getCursor().line;});
|
||||
window['cM'+num+'diff'] .on("beforeSelectionChange", function(thisCM, changeObj) {top.ICEcoder.prevLineDiff = thisCM.getCursor().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);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
// Change
|
||||
window['cM'+num] .on("change", function(thisCM, changeObj) {top.ICEcoder.cMonChange(thisCM,'cM'+num,changeObj)});
|
||||
window['cM'+num+'diff'] .on("change", function(thisCM, changeObj) {top.ICEcoder.cMonChange(thisCM,'cM'+num+'diff',changeObj)});
|
||||
|
||||
// Now create the active line for this CodeMirror object
|
||||
top.ICEcoder['cMActiveLine'+num] = window['cM'+num].addLineClass(0, "background", "cm-s-activeLine");
|
||||
// Scroll
|
||||
window['cM'+num] .on("scroll", function(thisCM) {top.ICEcoder.cMonScroll(thisCM,'cM'+num)});
|
||||
window['cM'+num+'diff'] .on("scroll", function(thisCM) {top.ICEcoder.cMonScroll(thisCM,'cM'+num+'diff')});
|
||||
|
||||
// Gutter click
|
||||
window['cM'+num] .on("gutterClick", function(thisCM, line, gutter, clickEvent) {CodeMirror.doFold(thisCM.getLine(line).indexOf("{")>-1 ? "brace" : "xml",null,"+","-",false)(thisCM, line);});
|
||||
window['cM'+num+'diff'] .on("gutterClick", function(thisCM, line, gutter, clickEvent) {CodeMirror.doFold(thisCM.getLine(line).indexOf("{")>-1 ? "brace" : "xml",null,"+","-",false)(thisCM, line);});
|
||||
|
||||
// Input read
|
||||
window['cM'+num] .on("inputRead", function(thisCM) {top.ICEcoder.cMonInputRead(thisCM,'cM'+num)});
|
||||
window['cM'+num+'diff'] .on("inputRead", function(thisCM) {top.ICEcoder.cMonInputRead(thisCM,'cM'+num+'diff')});
|
||||
|
||||
// Render line
|
||||
window['cM'+num] .on("renderLine", function(thisCM, line, element) {top.ICEcoder.cMonRenderLine(thisCM,'cM'+num,line,element)});
|
||||
window['cM'+num+'diff'] .on("renderLine", function(thisCM, line, element) {top.ICEcoder.cMonRenderLine(thisCM,'cM'+num+'diff',line,element)});
|
||||
|
||||
// Now create the active lines for them
|
||||
top.ICEcoder['cMActiveLinecM'+num] = window['cM'+num].addLineClass(0, "background", "cm-s-activeLine");
|
||||
top.ICEcoder['cMActiveLinecM'+num+'diff'] = window['cM'+num+'diff'].addLineClass(0, "background", "cm-s-activeLine");
|
||||
};
|
||||
|
||||
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>
|
||||
@@ -316,4 +280,4 @@ var debounce;
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
26
files.php
26
files.php
@@ -8,33 +8,43 @@ $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()">
|
||||
<html onMouseDown="top.ICEcoder.mouseDown=true; top.ICEcoder.boxSelect(event,'down')" onMouseUp="top.ICEcoder.mouseDown=false; top.ICEcoder.boxSelect(event,'up'); if (!top.ICEcoder.overCloseLink) {top.ICEcoder.tabDragEnd()}" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files');top.ICEcoder.canResizeFilesW(); top.ICEcoder.boxSelect(event,'drag')}" onDrop="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files')}" onContextMenu="top.ICEcoder.selectFileFolder(event); return top.ICEcoder.showMenu(event)" onClick="if (!top.ICEcoder.fmDraggedBox) {top.ICEcoder.selectFileFolder(event)} else {top.ICEcoder.fmDraggedBox = false}" 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>
|
||||
<link rel="stylesheet" type="text/css" href="lib/files.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-types.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-type-icons.css?microtime=<?php echo microtime(true);?>">
|
||||
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';}; echo ".js?microtime=".microtime(true);?>" type="text/javascript"></script>
|
||||
<style>
|
||||
ul.fileManager li a span { font-size: <?php echo $ICEcoder["fontSize"];?>; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="top.ICEcoder.showHideGithubNav(top.ICEcoder.githubDiff ? 'show' : 'hide')" onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
<body onFocus="top.ICEcoder.files.style.background='#444'" onBlur="top.ICEcoder.files.style.background='#383838'" onload="top.ICEcoder.showHideGithubNav(top.ICEcoder.githubDiff ? 'show' : 'hide')" onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
<div title="<?php echo $t['Lock'];?>" onClick="top.ICEcoder.lockUnlockNav()" id="fmLock" class="lock"></div>
|
||||
<div title="<?php echo $t['Refresh'];?>" onClick="top.ICEcoder.refreshFileManager()" class="refresh"></div>
|
||||
<div title="<?php echo $t['Plugins'];?>" onClick="top.ICEcoder.showHidePlugins(top.get('plugins').style.width != '55px' ? 'show' : 'hide')" class="plugins"></div>
|
||||
<?php
|
||||
$_SESSION['githubDiff'] = false;
|
||||
if ($isGitHubRepoDir) {
|
||||
$classExtra = !isset($_GET["githubDiff"]) || $_GET["githubDiff"] == "false" ? "Off" : "On";
|
||||
if ($classExtra == "On") {
|
||||
$_SESSION['githubDiff'] = true;
|
||||
// Make sure we are showing the diff pane
|
||||
echo "<script>top.ICEcoder.setSplitPane('on');</script>";
|
||||
}
|
||||
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 == "" ? $t['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
|
||||
<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 == "" ? $t['ROOT'] : trim($iceRoot,"/");
|
||||
$thisPermVal = $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot)), -3) : "";
|
||||
$permColors = $thisPermVal == 777 ? 'background: #800; color: #eee' : 'color: #888';
|
||||
?></span> <span style="<?php echo $permColors;?>; font-size: 8px" id="|_perms"><?php echo $thisPermVal;;?></span></a></li><?php
|
||||
// tree file items generated by the iFrame 'fileControl' below which loads in the items at location=| (ie, the root)
|
||||
?>
|
||||
</ul>
|
||||
@@ -45,6 +55,8 @@ if ($isGitHubRepoDir) {
|
||||
|
||||
<iframe name="processControl" style="display: none"></iframe>
|
||||
|
||||
<div class="fmDragBox" id="fmDragBox"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 430 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 120 B |
BIN
images/split-pane-controls.gif
Normal file
BIN
images/split-pane-controls.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
44
index.php
44
index.php
@@ -37,13 +37,16 @@ if ($ICEcoder["checkUpdates"]) {
|
||||
$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();}">
|
||||
<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() && !top.ICEcoder.getcMdiffInstance().hasFocus()) {event.wheelDelta > 0 ? top.ICEcoder.nextTab() : top.ICEcoder.previousTab();}">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?></title>
|
||||
<style>
|
||||
#tabsBar.tabsBar .tab { font-size: <?php echo $ICEcoder["fontSize"];?>; }
|
||||
</style>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.5, user-scalable=no">
|
||||
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<script>
|
||||
iceRoot = "<?php echo $ICEcoder['root']; ?>";
|
||||
@@ -54,6 +57,7 @@ window.onbeforeunload = function() {
|
||||
return "<?php echo $t['You have some...'];?>.";
|
||||
}
|
||||
}
|
||||
return "<?php echo $t['Are you sure...'];?>";
|
||||
}
|
||||
|
||||
t = {
|
||||
@@ -71,10 +75,11 @@ $t = $text['index'];
|
||||
?>
|
||||
}
|
||||
</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">
|
||||
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="farbtastic/farbtastic.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="lib/difflib.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<link rel="stylesheet" href="farbtastic/farbtastic.css?microtime=<?php echo microtime(true);?>" type="text/css">
|
||||
</head>
|
||||
|
||||
<body onLoad="<?php
|
||||
@@ -88,22 +93,28 @@ $t = $text['index'];
|
||||
echo "top.ICEcoder.theme = '".($ICEcoder["theme"]=="default" ? 'icecoder' : $ICEcoder["theme"])."';".
|
||||
"top.ICEcoder.fontSize = '".$ICEcoder["fontSize"]."';".
|
||||
"top.ICEcoder.openLastFiles = ".($ICEcoder["openLastFiles"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.updateDiffOnSave = ".($ICEcoder["updateDiffOnSave"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.languageUser = '".$ICEcoder["languageUser"]."';".
|
||||
"top.ICEcoder.codeAssist = ".($ICEcoder["codeAssist"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.lockedNav = ".($ICEcoder["lockedNav"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.lineWrapping = ".($ICEcoder["lineWrapping"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.indentWithTabs = ".($ICEcoder["indentWithTabs"] ? 'true' : 'false').";".
|
||||
"top.ICEcoder.indentAuto = ".($ICEcoder["indentAuto"] ? '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.bugFileMaxLines = ".$ICEcoder["bugFileMaxLines"].";".
|
||||
"top.ICEcoder.newDirPerms = ".$ICEcoder["newDirPerms"].";".
|
||||
"top.ICEcoder.newFilePerms = ".$ICEcoder["newFilePerms"].";";
|
||||
if($ICEcoder["githubAuthToken"] != "") {
|
||||
$_SESSION['githubAuthToken'] = $ICEcoder["githubAuthToken"];
|
||||
echo "top.ICEcoder.githubAuthTokenSet = true;";
|
||||
}
|
||||
echo "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);">
|
||||
?>ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;top.ICEcoder.content.style.visibility='visible';top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = 'processes/on-load.php';<?php if(isset($_GET["display"]) && $_GET["display"] == "updated") {echo "top.ICEcoder.updated();";};?>" 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">
|
||||
@@ -125,7 +136,7 @@ $t = $text['index'];
|
||||
<a nohref onClick="top.ICEcoder.showColorPicker(top.document.getElementById('color') ? top.document.getElementById('color').value : '#123456')" title="Farbtastic
|
||||
<?php echo $t['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>
|
||||
<a nohref onclick="top.ICEcoder.pluginsManager()" title="<?php echo $t['Plugins Manager'];?>" style="color: #fff; cursor: pointer">+ / -</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -136,7 +147,7 @@ $t = $text['index'];
|
||||
<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()"><?php echo $t['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">
|
||||
<form enctype="multipart/form-data" id="uploadFilesForm" action="lib/file-control-xhr.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">
|
||||
@@ -173,7 +184,7 @@ $t = $text['index'];
|
||||
<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"><?php echo $t['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"><?php echo $t['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"><?php echo $t['Remote'];?></a></li>
|
||||
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsSource')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsSource')}" id="optionsSourceNav"><?php echo $t['Source'];?></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"><?php echo $t['Help'];?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -214,10 +225,12 @@ $t = $text['index'];
|
||||
<li><a nohref onclick="ICEcoder.autocomplete()"><?php echo $t['Autocomplete'];?></a></li>
|
||||
<li><a nohref onclick="ICEcoder.lineCommentToggle()"><?php echo $t['Comment/Uncomment'];?></a></li>
|
||||
<li><a nohref onclick="ICEcoder.jumpToDefinition()"><?php echo $t['Jump to Definition'];?></a></li>
|
||||
<li><a nohref onClick="ICEcoder.settingsScreen()"><?php echo $t['Settings'];?></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">
|
||||
<div id="optionsSource" 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.refreshFileManager()">Localhost</a></li>
|
||||
<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>
|
||||
@@ -231,7 +244,6 @@ $t = $text['index'];
|
||||
<ul>
|
||||
<li><a nohref onclick="ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>')"><?php echo $t['Manual'];?></a></li>
|
||||
<li><a nohref onClick="ICEcoder.helpScreen()"><?php echo $t['Shortcuts'];?></a></li>
|
||||
<li><a nohref onClick="ICEcoder.settingsScreen()"><?php echo $t['Settings'];?></a></li>
|
||||
<li><a nohref onclick="ICEcoder.searchForSelected()"><?php echo $t['Search for selected'];?></a></li>
|
||||
<li><a href="https://icecoder.net" target="_blank">ICEcoder <?php echo $t['website'];?></a></li>
|
||||
</ul>
|
||||
@@ -255,7 +267,7 @@ $t = $text['index'];
|
||||
<form name="findAndReplace" onSubmit="ICEcoder.findReplace(top.document.getElementById('find').value,false,true);return false">
|
||||
<div class="findReplace">
|
||||
<div class="findText"><?php echo $t['Find'];?></div>
|
||||
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false)">
|
||||
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false,event.keyCode == 27)">
|
||||
|
||||
<div class="selectWrapper" style="width: 41px">
|
||||
<select name="connector" onChange="ICEcoder.findReplaceOptions()" style="width: 40px; margin-top: 4px">
|
||||
@@ -303,7 +315,7 @@ $t = $text['index'];
|
||||
|
||||
<div class="footer" id="footer" onContextMenu="return false">
|
||||
<div class="nesting" id="nestValid"></div>
|
||||
<div class="nestDisplay" id="nestDisplay"></div>
|
||||
<div class="splitPaneControls" id="splitPaneControls"><div class="off" id="splitPaneControlsOff" title="<?php echo $t['Single pane'];?>" onclick="top.ICEcoder.setSplitPane('off')"></div><div class="on" id="splitPaneControlsOn" title="<?php echo $t['Diff pane also'];?>" onclick="top.ICEcoder.setSplitPane('on')" style="opacity: 0.5"></div></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>
|
||||
|
||||
5
jshint/jshint-2.1.4.min.js
vendored
5
jshint/jshint-2.1.4.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
// Chinese language translation
|
||||
// by: @lzh370 (GitHub)
|
||||
// lzh370@qq.com
|
||||
@@ -49,6 +49,7 @@ $text = array(
|
||||
"Your version is" => "你的版本是",
|
||||
"Update now" => "现在更新",
|
||||
"You have some..." => "你有一些未保存的更改",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "载入中",
|
||||
"Color picker" => "颜色选择器",
|
||||
"New File" => "新建文件",
|
||||
@@ -386,6 +387,7 @@ $text = array(
|
||||
"indent type" => "缩进类型",
|
||||
"indent size" => "缩进大小",
|
||||
"font size" => "字体大小",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "布局",
|
||||
"plugin panel aligned" => "插件板对齐",
|
||||
"file manager" => "文件管理器",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
// Traditional Chinese language translation
|
||||
// by: @lzh370 (GitHub)
|
||||
// lzh370@qq.com
|
||||
@@ -49,6 +49,7 @@ $text = array(
|
||||
"Your version is" => "你的版本是",
|
||||
"Update now" => "現在更新",
|
||||
"You have some..." => "你有一些未保存的更改",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "裝載中",
|
||||
"Color picker" => "顔色選擇器",
|
||||
"New File" => "新建文件",
|
||||
@@ -386,6 +387,7 @@ $text = array(
|
||||
"indent type" => "縮進類型",
|
||||
"indent size" => "縮進大小",
|
||||
"font size" => "字體大小",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "佈局",
|
||||
"plugin panel aligned" => "插件版對齊",
|
||||
"file manager" => "文件管理器",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
// Dutch language translation
|
||||
// Door: Julian Kaagman
|
||||
@dutchwaters (GitHub)
|
||||
// @dutchwaters (GitHub)
|
||||
|
||||
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &). Translations on right side.
|
||||
// Special chars: http://www.ascii.cl/htmlcodes.htm
|
||||
@@ -51,6 +51,7 @@ in lib/config__settings.php",
|
||||
"Your version is" => "Uw versie is",
|
||||
"Update now" => "Nu updaten",
|
||||
"You have some..." => "Er zijn wijzigingen die niet opgeslagen zijn",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "bezig",
|
||||
"Color picker" => "Kleuren kiezer",
|
||||
"New File" => "Nieuw bestand",
|
||||
@@ -388,6 +389,7 @@ in lib/config__settings.php",
|
||||
"indent type" => "inspring type",
|
||||
"indent size" => "inspring size",
|
||||
"font size" => "lettergrootte",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "lay-out",
|
||||
"plugin panel aligned" => "plug-in paneel positie",
|
||||
"file manager" => "bestandsbeheer",
|
||||
@@ -424,4 +426,4 @@ in lib/config__settings.php",
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -11,7 +11,6 @@ $text = array(
|
||||
|
||||
"editor" =>
|
||||
array(
|
||||
"Click icons for..." => "<b>Click icons<br>for help &<br>usage info</b>",
|
||||
"server" => "server",
|
||||
"Server name, OS..." => "Server name, OS & IP:",
|
||||
"Root" => "Root:",
|
||||
@@ -29,8 +28,7 @@ $text = array(
|
||||
"dev mode" => "dev mode",
|
||||
"Status" => "Status",
|
||||
"Using" => "Using",
|
||||
"You can switch..." => "You can switch dev mode on/off in lib/config__settings.php",
|
||||
"results" => "results"
|
||||
"You can switch..." => "You can switch dev mode on/off in lib/config__settings.php"
|
||||
|
||||
),
|
||||
|
||||
@@ -38,6 +36,7 @@ $text = array(
|
||||
array(
|
||||
"Lock" => "Lock",
|
||||
"Refresh" => "Refresh",
|
||||
"Plugins" => "Plugins",
|
||||
"ROOT" => "[ROOT]"
|
||||
|
||||
),
|
||||
@@ -49,8 +48,10 @@ $text = array(
|
||||
"Your version is" => "Your version is",
|
||||
"Update now" => "Update now",
|
||||
"You have some..." => "You have some unsaved changes",
|
||||
"Are you sure..." => "Are you sure you want to close?",
|
||||
"working" => "working",
|
||||
"Color picker" => "Color picker",
|
||||
"Plugins Manager" => "Plugins Manager",
|
||||
"New File" => "New File",
|
||||
"New Folder" => "New Folder",
|
||||
"Upload File(s)" => "Upload File(s)",
|
||||
@@ -65,7 +66,7 @@ $text = array(
|
||||
"Properties" => "Properties",
|
||||
"File" => "File",
|
||||
"Edit" => "Edit",
|
||||
"Remote" => "Remote",
|
||||
"Source" => "Source",
|
||||
"Help" => "Help",
|
||||
"Save" => "Save",
|
||||
"Save As" => "Save As",
|
||||
@@ -102,7 +103,9 @@ $text = array(
|
||||
"Code Assist" => "Code Assist",
|
||||
"Go to Line" => "Go to Line",
|
||||
"View" => "View",
|
||||
"Bug reporting not active" => "Bug reporting not active"
|
||||
"Bug reporting not active" => "Bug reporting not active",
|
||||
"Single pane" => "Single pane",
|
||||
"Diff pane also" => "Diff pane also"
|
||||
),
|
||||
|
||||
// /LIB
|
||||
@@ -132,7 +135,7 @@ $text = array(
|
||||
"Sorry, cannot delete..." => "Sorry, cannot delete the root level",
|
||||
"Sorry, cannot delete" => "Sorry, cannot delete",
|
||||
"Sorry, this file..." => "Sorry, this file has changed, cannot save",
|
||||
"Reload this file..." => "Reload this file and copy your version to a new document?",
|
||||
"Reload this file..." => "Reload this file and copy your version to a diff pane?",
|
||||
"There was a..." => "There was a tech hiccup, likely something was not quite ready. So ICEcoder reloaded its file control again.",
|
||||
"displayed at" => "displayed at",
|
||||
"Enter filename to..." => "Enter filename to save at",
|
||||
@@ -156,7 +159,9 @@ $text = array(
|
||||
"github paths" => "github paths",
|
||||
"Choose existing path" => "Choose existing path",
|
||||
"Local path" => "Local path",
|
||||
"Slash prefixed" => "Slash prefixed",
|
||||
"Remote GitHub path" => "Remote GitHub path",
|
||||
"Absolute URL beginning..." => "Absolute URL, beginning https://github.com",
|
||||
"Choose" => "Choose",
|
||||
"Set local and..." => "Set local and remote path to blank to remove",
|
||||
"Update" => "Update",
|
||||
@@ -206,7 +211,9 @@ $text = array(
|
||||
"Search for selected" => "Search for selected",
|
||||
"Jump to definition" => "Jump to definition / jump back",
|
||||
"Comment uncomment" => "Comment / uncomment",
|
||||
"Insert tab indent" => "Insert tab / indent selected",
|
||||
"Insert tab indent" => "Insert tab / auto indent selected",
|
||||
"Insert more" => "Indent more",
|
||||
"Insert less" => "Indent less",
|
||||
"Wrap with div" => "Wrap with <div>",
|
||||
"Wrap with span" => "Wrap with <span>",
|
||||
"Wrap unwrap p" => "Wrap / unwrap with <p>",
|
||||
@@ -251,7 +258,7 @@ $text = array(
|
||||
"Creating Folder" => "Creating Folder",
|
||||
"Sorry you can..." => "Sorry, you can only have 100 files open at a time!",
|
||||
"Opening File" => "Opening File",
|
||||
"Enter relative file..." => "Enter relative file path (prefixed with /) or remote URL",
|
||||
"Enter relative file..." => "Enter relative file path (prefixed with /) or remote URL\\nYou can enter \\n'/path/file:123' or \\n'/path/file(123)' or \\n'/path/file.ext line 123' \\nto go directly to particular line",
|
||||
"Getting" => "Getting",
|
||||
"Please enter the..." => "Please enter the new name for",
|
||||
"Renaming to" => "Renaming to",
|
||||
@@ -270,12 +277,13 @@ $text = array(
|
||||
"Open previous files" => "Open previous files?",
|
||||
"Please enter your..." => "Please enter your GitHub token (either personal access token or client/secret pair token). See tooltip next to Github Auth Token on Help > Settings screen for more info",
|
||||
"This will compare..." => "This will compare and show a diff view between your local dir and the repo. OK?",
|
||||
"Please note for..." => "Please note: for updating to work properly, you need to have write/delete access on all ICEcoder dirs & files. If you need to recover this version of ICEcoder for any reason, you'll find it in the /tmp dir. Click OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually.",
|
||||
"Please note for..." => "Please note: for updating to work properly, you need to have write access on all ICEcoder dirs & files. It will first check if this is the case and list any unwriteable (and therefore unmoveable) files.\\n\\nIf you need to recover this version of ICEcoder for any reason, you'll find it in the /tmp dir.\\n\\nClick OK to proceed with the check and auto-update, or cancel to visit the ICEcoder site so you can grab the zip and update manually.",
|
||||
"You can start..." => "You can start bug reporting in Help > Settings",
|
||||
"Error cannot find..." => "Error: cannot find/access the error file paths",
|
||||
"No new errors..." => "No new errors found",
|
||||
"You have made..." => "You have made changes. Are you sure you want to close without saving?",
|
||||
"Close all tabs" => "Close all tabs?"
|
||||
"Close all tabs" => "Close all tabs?",
|
||||
"results" => "results"
|
||||
),
|
||||
|
||||
"login" =>
|
||||
@@ -369,7 +377,8 @@ $text = array(
|
||||
"codemirror dir" => "codemirror dir",
|
||||
"codemirror version" => "codemirror version",
|
||||
"file manager root" => "file manager root",
|
||||
"Free to use..." => "Free to use it for your own purposes, commercial or not, just let me know of any cool uses or customisations. :)<br><br>No warranty or liability accepted for anything, all responsibility of use is your own.<br><br>A lot of fantastic people and companies have helped build ICEcoder and there is too many to thank here. Please see the full list at",
|
||||
"Get in contact..." => "Get in contact by...",
|
||||
"You may use..." => "You may use ICEcoder for your own purposes, commercial or not, just let us know of any cool uses or customisations. :)<br><br>No warranty or liability accepted for anything, all responsibility of use is your own.",
|
||||
"functionality" => "functionality",
|
||||
"check for updates..." => "check for updates on load",
|
||||
"auto open last..." => "auto open last files on login",
|
||||
@@ -395,6 +404,7 @@ $text = array(
|
||||
"indent type" => "indent type",
|
||||
"indent size" => "indent size",
|
||||
"font size" => "font size",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "layout",
|
||||
"plugin panel aligned" => "plugin panel aligned",
|
||||
"file manager" => "file manager",
|
||||
@@ -428,7 +438,19 @@ $text = array(
|
||||
"updater" =>
|
||||
array(
|
||||
"Update appears to..." => "Update appears to be successful"
|
||||
),
|
||||
|
||||
"find-in-files" =>
|
||||
array(
|
||||
"Enter path to search in" => "Enter path to search in",
|
||||
"Enter semicolon-separated masks of files to look at (e.g. *.php;*.html;*.js)" => "Enter semicolon-separated masks of files to look at (e.g. *.php;*.html;*.js)",
|
||||
"Type of text" => "Type of text",
|
||||
"Fixed text" => "Fixed text",
|
||||
"Regular expression" => "Regular expression",
|
||||
"Case sensitive" => "Case sensitive",
|
||||
"Yes" => "Yes",
|
||||
"No" => "No",
|
||||
"Search" => "Search",
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
// French language translation
|
||||
// par: @krisxoofoo (GitHub)
|
||||
// @kris_fr Twitter)
|
||||
@@ -48,6 +48,7 @@ dans lib/config__settings.php",
|
||||
"Your version is" => "Votre version est la",
|
||||
"Update now" => "Mettre à jour maintenant",
|
||||
"You have some..." => "Vous avez quelques changements non sauvegardés",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "en progression",
|
||||
"Color picker" => "Sélecteur de couleur",
|
||||
"New File" => "Nouveau fichier",
|
||||
@@ -384,6 +385,7 @@ dans lib/config__settings.php",
|
||||
"indent type" => "indent type",
|
||||
"indent size" => "indent size",
|
||||
"font size" => "font size",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "disposition",
|
||||
"plugin panel aligned" => "panneau des plugins aligné",
|
||||
"file manager" => "gestionnaire de fichiers",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
// German language translation
|
||||
// by: @olliiee (GitHub)
|
||||
// @trolliusgigant (Twitter)
|
||||
@@ -47,16 +47,17 @@ $text = array(
|
||||
"UPDATE INFO" => "Update Infos",
|
||||
"now available" => "jetzt verfügbar",
|
||||
"Your version is" => "Deine Version ist",
|
||||
"Update now" => "Aktualisiere jetzt",
|
||||
"You have some..." => "Du hast einige nicht gespeicherete Datein",
|
||||
"Update now" => "Jetzt aktualisieren",
|
||||
"You have some..." => "Du hast einige nicht gespeicherete Dateien",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "arbeite",
|
||||
"Color picker" => "Farbauswahl",
|
||||
"New File" => "Neue Datei",
|
||||
"New Folder" => "Neuer Ordner",
|
||||
"Upload File(s)" => "Dateie(n) hochladen",
|
||||
"Upload File(s)" => "Datei(en) hochladen",
|
||||
"Paste" => "Einfügen",
|
||||
"Open" => "Öffnen",
|
||||
"Copy" => "Kopiere",
|
||||
"Copy" => "Kopieren",
|
||||
"Duplicate" => "Duplizieren",
|
||||
"Delete" => "Löschen",
|
||||
"Rename" => "Umbenennen",
|
||||
@@ -85,7 +86,7 @@ $text = array(
|
||||
"Manual" => "Anleitung",
|
||||
"Shortcuts" => "Schnellzugriffe",
|
||||
"Settings" => "Einstellungen",
|
||||
"Search for selected" => "Nach selektiertem suchen",
|
||||
"Search for selected" => "Nach Auswahl suchen",
|
||||
"website" => "Website",
|
||||
"Close all tabs" => "Alle Tabs schließen",
|
||||
"Alphabetize tabs" => "Tabs alphabetisch sortieren",
|
||||
@@ -150,7 +151,7 @@ $text = array(
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Entschuldigung, kann Verzeichnis nicht anlegen",
|
||||
"Cannot update config..." => "Kannn die Config Datei nicht aktualisieren. Bitte Lese- und Schreibrechte setzen",
|
||||
"Cannot update config..." => "Kann die Config Datei nicht aktualisieren. Bitte Schreibrechte setzen",
|
||||
"and try again" => "und versuch es noch einmal",
|
||||
"saving github paths" => "Speichere GitHub Pfad ...",
|
||||
"github paths" => "GitHub Pfad",
|
||||
@@ -216,9 +217,9 @@ $text = array(
|
||||
"Wrap unwrap strong" => "Umschließen / Mit <strong> auschließen",
|
||||
"Wrap unwrap em" => "Umschließen / Mit <em> auschließen",
|
||||
"Wrap unwrap h1..." => "Umschließen / Mit <h1> - <h3> auschließen",
|
||||
"End line with..." => "Zeile abschließ mit <br>",
|
||||
"End line with..." => "Zeile abschließen mit <br>",
|
||||
"Close tab" => "Tab schließen",
|
||||
"Select file folder" => "Datei / Verzeichnis ausählen",
|
||||
"Select file folder" => "Datei / Verzeichnis auswählen",
|
||||
"Open file" => "Datei öffnen",
|
||||
"Range select" => "Bereich auswählen",
|
||||
"Options for selected" => "Optionen für ausgewählte",
|
||||
@@ -272,13 +273,13 @@ $text = array(
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder muss neu geladen werden, damit das Plugin genutzt werden kann. Jetzt neu laden?",
|
||||
"saving plugins" => "speicher Plugins ...",
|
||||
"saving plugins" => "speichere Plugins ...",
|
||||
"Cannot update config..." => "Kann die Konfigurationsdatei nicht aktualisieren. Bitte Schreibrechte vergeben",
|
||||
"and try again" => "und es nochmal versuchen",
|
||||
"couldnt delete dir" => "kann Verzeichnis nicht löschen",
|
||||
"couldnt delete file" => "kann Datei nicht löschen",
|
||||
"plugins" => "Plugins",
|
||||
"Guide to writing..." => "Anleitung zum erstellen von Plugins",
|
||||
"Guide to writing..." => "Anleitung zum Erstellen von Plugins",
|
||||
"Manage Installed" => "Geführte Installtion",
|
||||
"URL" => "URL",
|
||||
"Target" => "Ziel",
|
||||
@@ -328,20 +329,20 @@ $text = array(
|
||||
"version" => "Version",
|
||||
"website" => "Website",
|
||||
"git" => "git",
|
||||
"codemirror dir" => "gespiegeltes Verzeichnis",
|
||||
"codemirror version" => "gespiegelte Version",
|
||||
"file manager root" => "Grundverzeichnis vom Dateimanager",
|
||||
"codemirror dir" => "CodeMirror Verzeichnis",
|
||||
"codemirror version" => "CodeMirror Version",
|
||||
"file manager root" => "Stammverzeichnis vom Dateimanager",
|
||||
"Free to use..." => "Kostenfrei nutzbar, kommerziell oder nicht. Gebt mir Bescheid über eure Nutzung oder Anpassungen. :)<br><br>Keine Garantie oder Haftung, Nutzung auf eigene Gefahr.<br><br>Viele fantastische Leute und Unternehmen haben dabei geholfen ICEcoder zu dem zu machen, was es heute ist. Und es sind zu viele um ihnen einzelen zu danken. Eine vollständige Liste gibt es unter",
|
||||
"functionality" => "Funktionalität",
|
||||
"check for updates..." => "Bei jedem Ladem nach Updates suchen",
|
||||
"auto open last..." => "Lade automatisch alle zuletzt geöffneten Datein beim Login",
|
||||
"when finding in..." => "bei der Suche in Dateien ausschließen",
|
||||
"assisting" => "assestieren",
|
||||
"assisting" => "Assistenten",
|
||||
"code assist" => "Codeassistent",
|
||||
"visible tabs" => "sichtbare Tabs",
|
||||
"locked nav" => "gesperrte Navigation",
|
||||
"tag wrapper command" => "Tag für Wrapper Kommando setzen",
|
||||
"auto-complete on" => "auto-complete an",
|
||||
"tag wrapper command" => "Kommando für Tag Wrapper",
|
||||
"auto-complete on" => "Auto-Vervollständigen mit",
|
||||
"security" => "Sicherheit",
|
||||
"new password" => "neues Passwort",
|
||||
"8 chars min" => "8 Zeichen mindestens",
|
||||
@@ -354,13 +355,14 @@ $text = array(
|
||||
"style" => "Style",
|
||||
"theme" => "Theme",
|
||||
"line wrapping" => "Zeilenumbruch",
|
||||
"indent type" => "Gedankenstrich Typ",
|
||||
"indent size" => "Größe Gedankenstrich",
|
||||
"indent type" => "Einrückung mit",
|
||||
"indent size" => "Tabweite",
|
||||
"font size" => "Schriftgröße",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "Layout",
|
||||
"plugin panel aligned" => "Plugin-Panel ausgerichtet",
|
||||
"plugin panel aligned" => "Ausrichtung Plugin-Panel",
|
||||
"file manager" => "Dateimanager",
|
||||
"root" => "Stamm",
|
||||
"root" => "Stammordner",
|
||||
"Slash prefixed" => "Schrägstrich vorangestellt",
|
||||
"bug reporting" => "Fehlermeldung",
|
||||
"check in files" => "Dateien einchecken",
|
||||
@@ -370,7 +372,7 @@ $text = array(
|
||||
"multi-user" => "Mehrbenutzer",
|
||||
"Make sure you..." => "Sei sicher, dass du dich nicht selber aussperrst",
|
||||
"Registration" => "Registrieren",
|
||||
"auth token" => "Authetifizierungs-Token",
|
||||
"auth token" => "Authentifizierungs-Token",
|
||||
"Required to get..." => "Notwendig für diffs, commits des bei GitHub gehosteten Repository usw.. Wenn du keinen hast, kannst du einen:".PHP_EOL.PHP_EOL.
|
||||
"- persönlichen Zugriffs Token (https://help.github.com/articles/creating-an-access-token-for-command-line-use) erstellen, oder".PHP_EOL.
|
||||
"- Full Client/geheimen Token (http://developer.github.com/v3/oauth) erstellen.".PHP_EOL.PHP_EOL.
|
||||
@@ -393,4 +395,4 @@ $text = array(
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
?>
|
||||
|
||||
398
lang/italian.php
398
lang/italian.php
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
<?php
|
||||
// Italian language translation
|
||||
// by: @luciorota (GitHub)
|
||||
// @luciorota (lucio.rota@gmail.com)
|
||||
|
||||
// by: @pietrondo (GitHub)
|
||||
// @pietrobravo (Twitter)
|
||||
// blog.pietrocapriata.me (sito web)
|
||||
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &). Translations on right side.
|
||||
|
||||
$text = array(
|
||||
@@ -11,26 +11,25 @@ $text = array(
|
||||
|
||||
"editor" =>
|
||||
array(
|
||||
"Click icons for..." => "<b>Clicca le icone<br>per l'aiuto &<br>la guida</b>",
|
||||
"server" => "server",
|
||||
"Server name, OS..." => "Nome server, Sistema operativo e indirizzo IP...",
|
||||
"Root" => "Root:",
|
||||
"Click icons for..." => "<b>Clicca le icone<br>per l'aiuto &<br>la guida</b>",
|
||||
"server" => "server",
|
||||
"Server name, OS..." => "Nome server, Sistema operativo e indirizzo IP...",
|
||||
"Root" => "Root:",
|
||||
"ICEcoder root" => "ICEcoder root:",
|
||||
"PHP version" => "Versione PHP:",
|
||||
"Date & time" => "Data & ora:",
|
||||
"PHP version" => "Versione PHP",
|
||||
"Date & time" => "Ora e data:",
|
||||
"your device" => "dispositivo in uso",
|
||||
"Browser" => "Browser:",
|
||||
"Your IP" => "Indirizzo IP:",
|
||||
"Your IP" => "Il tuo IP:",
|
||||
"files" => "file",
|
||||
"Last 10 files..." => "Ultimi 10 file aperti:",
|
||||
"none" => "[nessuno]",
|
||||
"none" => "[none]",
|
||||
"test suite" => "prova suite",
|
||||
"Run unit tests" => "Eseguire i test di unità",
|
||||
"Run unit tests" => "Esegui test di unità",
|
||||
"dev mode" => "modalità sviluppo",
|
||||
"Status" => "Stato",
|
||||
"Using" => "Utilizzo",
|
||||
"You can switch..." => "È possibile attivare/disattivare la modalità sviluppo nel file lib/config__settings.php",
|
||||
"results" => "risultati"
|
||||
"You can switch..." => "È possibile attivare/disattivare la modalità sviluppo nel file lib/config__settings.php"
|
||||
|
||||
),
|
||||
|
||||
@@ -45,12 +44,13 @@ $text = array(
|
||||
"index" =>
|
||||
array(
|
||||
"UPDATE INFO" => "INFORMAZIONI AGGIORNAMENTO",
|
||||
"now available" => "disponibile ora",
|
||||
"Your version is" => "La tua versione è",
|
||||
"now available" => "Èora disponibile",
|
||||
"Your version is" => "La tua versione Egrave;",
|
||||
"Update now" => "Aggiorna ora",
|
||||
"You have some..." => "Ci sono modifiche non salvate",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "working",
|
||||
"Color picker" => "Selettore colore",
|
||||
"Color picker" => "Selettore di colore",
|
||||
"New File" => "Nuovo file",
|
||||
"New Folder" => "Nuova cartella",
|
||||
"Upload File(s)" => "Carica File",
|
||||
@@ -60,27 +60,27 @@ $text = array(
|
||||
"Duplicate" => "Duplica",
|
||||
"Delete" => "Elimina",
|
||||
"Rename" => "Rinomina",
|
||||
"View Webpage" => "Visualizza la pagina Web",
|
||||
"Download" => "Scarica",
|
||||
"View Webpage" => "Visualizza la pagina web",
|
||||
"Download" => "Download",
|
||||
"Properties" => "Propietà",
|
||||
"File" => "File",
|
||||
"Edit" => "Modifica",
|
||||
"Remote" => "Remoto",
|
||||
"Help" => "Aiuto",
|
||||
"Save" => "Salva",
|
||||
"Save As" => "Salva come...",
|
||||
"Save As" => "Salva come",
|
||||
"Live Preview" => "Anteprima",
|
||||
"Upload" => "Carica",
|
||||
"Zip" => "Comprimi...",
|
||||
"Upload" => "Upload",
|
||||
"Zip" => "Comprimi",
|
||||
"Print" => "Stampa",
|
||||
"Fullscreen toggle" => "Modo schermo pieno",
|
||||
"Fullscreen toggle" => "Modalità schermo intero",
|
||||
"Logout" => "Logout",
|
||||
"Undo" => "Annulla",
|
||||
"Redo" => "Riesegui",
|
||||
"Indent more" => "Aumenta rientro",
|
||||
"Indent less" => "Riduci rientro",
|
||||
"Autocomplete" => "Autocompleta",
|
||||
"Comment/Uncomment" => "Commenta/Rimuovere il commento",
|
||||
"Comment/Uncomment" => "Commenta/Rimuovi commento",
|
||||
"Jump to Definition" => "Vai alla Definizione",
|
||||
"Manual" => "Manuale",
|
||||
"Shortcuts" => "Scorciatorie",
|
||||
@@ -88,34 +88,350 @@ $text = array(
|
||||
"Search for selected" => "Cerca selezionato",
|
||||
"website" => "sito web",
|
||||
"Close all tabs" => "Chiudi tutte le schede",
|
||||
"Alphabetize tabs" => "Ordina schede",
|
||||
// "Find" => "Trova",
|
||||
// "in" => "in",
|
||||
// "and" => "e",
|
||||
// "replace" => "sostituisci",
|
||||
// "replace all" => "sostituisci tutto",
|
||||
// "this document" => "questo documento",
|
||||
// "open documents" => "apri documenti",
|
||||
// "all files" => "tutti i file",
|
||||
// "all filenames" => "titti i nomi",
|
||||
"Alphabetize tabs" => "Ordina le schede",
|
||||
"Find" => "Trova",
|
||||
"in" => "in",
|
||||
"and" => "e",
|
||||
"replace" => "sostituisci",
|
||||
"replace all" => "sostituisci tutto",
|
||||
"this document" => "questo documento",
|
||||
"open documents" => "apri documenti",
|
||||
"all files" => "tutti i file",
|
||||
"all filenames" => "tutti i nomi",
|
||||
"Turn on/off..." => "Attiva/disattiva code assist",
|
||||
"Code Assist" => "Code Assist",
|
||||
"Go to Line" => "Vai alla riga",
|
||||
"Go to Line" => "Vai alla linea",
|
||||
"View" => "Visualizza",
|
||||
"Bug reporting not active" => "Segnalazione bug non attiva"
|
||||
),
|
||||
|
||||
// /LIB
|
||||
|
||||
"bug-files-check" =>
|
||||
array(
|
||||
"Found in" => "Trovato in:"
|
||||
),
|
||||
|
||||
"file-control" =>
|
||||
array(
|
||||
"Sorry" => "Spiacente",
|
||||
"does not seem..." => "non sembra esistere sul server",
|
||||
"Sorry, could not..." => "Siamo spiacenti, non è possibile ottenere i contenuti di",
|
||||
"Sorry, cannot create..." => "Siamo spiacenti, non è possibile creare una cartella a",
|
||||
"Sorry, cannot copy" => "Siamo spiacenti, non è possibile copiare",
|
||||
"into" => "into",
|
||||
"Uploaded file(s) OK" => "Upload file Ok",
|
||||
"Sorry, cannot upload" => "Siamo spiacenti, non è possibile caricare",
|
||||
"Sorry, cannot upload..." => "Siamo spiacenti , non è possibile caricare mentre in modalità demo",
|
||||
"Sorry, cannot rename" => "Siamo spiacenti , non è possibile rinominare",
|
||||
"Maybe public write..." => "Forse sono necessari permessi di scrittura pubblica su questa o sulla cartella principale??",
|
||||
"Sorry, cannot move" => "Siamo spiacenti, non è possibile muovere",
|
||||
"Sorry, cannot save" => "Siamo spiacenti, non è possibile salvare",
|
||||
"Sorry, cannot replace..." => "Siamo spiacenti, non è possibile sostituire il testo",
|
||||
"Sorry, cannot change..." => "Siamo spiacenti, non è possibile cambiare i permessi",
|
||||
"Sorry, cannot delete..." => "Siamo spiacenti, non è possibile cancellare la cartella root",
|
||||
"Sorry, cannot delete" => "Siamo spiacenti, non è possibile cancellare",
|
||||
"Sorry, this file..." => "Siamo spiacenti, questo file è stato cambiato, non è possibile salvarlo",
|
||||
"Reload this file..." => "Ricarica questo file e copia la tua versione in un pannello differente",
|
||||
"There was a..." => "C'è stato un problema tecnico, probabilmente qualcosa che non era ancora pronto. Così ICEcoder ha ricaricato di nuovo il file.",
|
||||
"displayed at" => "visualizzato in",
|
||||
"Enter filename to..." => "Inserisci il nome del file da salvare in",
|
||||
"That file exists..." => "Questo file esiste già, sovrascrivere??",
|
||||
"Saving" => "Stiamo salvando"
|
||||
),
|
||||
|
||||
"get-branch" =>
|
||||
array(
|
||||
"There are no..." => "Non ci sono differenze tra il repo locale e GitHub. Tornare alla modalità normale??",
|
||||
"Sorry, there was..." => "Spiacente, c'è stato un errore, il codice:",
|
||||
"Your local folder..." => "La cartella locale è vuota, ti piacerebbe clonare"
|
||||
),
|
||||
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Siamo spiacenti, non è possibile creare la cartella in",
|
||||
"Cannot update config..." => "Impossibile aggiornare il file di configurazione. Si prega di impostare i permessi di scrittura pubblica su",
|
||||
"and try again" => "e prova ancora",
|
||||
"saving github paths" => "salvando il percorso di github...",
|
||||
"github paths" => "percorso di github",
|
||||
"Choose existing path" => "Scegli il percorso esistente",
|
||||
"Local path" => "Percorso locale",
|
||||
"Remote GitHub path" => "Remote GitHub path",
|
||||
"Choose" => "Scegli",
|
||||
"Set local and..." => "Imposta percorso locale e remoto, lasciare vuoto per per rimuovere",
|
||||
"Update" => "Aggiorna",
|
||||
"Add new path" => "Aggiungi nuovo percorso",
|
||||
"Add" => "Aggiungi",
|
||||
"Usage Info" => "Usage Info:",
|
||||
"Enter relative local..." => "Inserisci percorsi locali relativi (ad esempio / server / myfiles) e percorsi assoluti GitHub (ad es https://github.com/user/repo o https://github.com/user/repo/tree/branch per le filiali), come da gli esempi.",
|
||||
"You can then..." => "È quindi possibile scegliere un percorso e questo allora diventa il tuo nuovo percorso principale in ICEcoder.",
|
||||
"The file manager..." => "Il file manager visualizza una nuova icona GitHub, su cui è possibile fare clic su per eseguire e mostrare un controllo diff tra le 2 fonti. Questi diff possono essere validati e inviati al percorso remoto a GitHub o clonati in un percorso locale, per la sincronizzazione dei file.",
|
||||
"If you want..." => "If you want to set another root path, this can be done in the Settings screen."
|
||||
),
|
||||
|
||||
"github" =>
|
||||
array(
|
||||
"Sorry, you do..." => "Siamo spiacenti, non sembra avere OpenSSL caricato nella vostra installazione PHP, quindi https non è disponibile. Questo è necessario per GitHub il trasferimento dei dati, si prega di modificare le impostazioni di php.ini, di riavviare il server e riprovare"
|
||||
),
|
||||
|
||||
"headers" =>
|
||||
array(
|
||||
"Bad CSRF token..." => "Bad CSRF token. Per favore riporta l'errore a https://github.com/mattpass/ICEcoder così che possa essere fixato."
|
||||
),
|
||||
|
||||
"help" =>
|
||||
array(
|
||||
"shortcuts" => "shortcuts",
|
||||
"Within document" => "all'interno del documento",
|
||||
"On Tabs" => "Sulle Tabs",
|
||||
"Within file manager" => "All'interno del file manager",
|
||||
"Anywhere" => "Dappertutto",
|
||||
"Space" => "Spazio",
|
||||
"Click" => "Click",
|
||||
"or" => "o",
|
||||
"Left click" => "Click Sinistro",
|
||||
"Middle click" => "Click centrale",
|
||||
"Double click tap..." => "Doppio click / tap (mobile)",
|
||||
"Right click" => "Click Destro",
|
||||
"Middle scrollwheel" => "scrollwheel Medio",
|
||||
"Drag" => "Trascina",
|
||||
"Autocomplete add snippet" => "Completamento automatico / aggiungi snippet",
|
||||
"Multiple select" => "Selezione multiple",
|
||||
"Move line up" => "Vai alla linea sopra",
|
||||
"Move line down" => "Vai alla linea sotto",
|
||||
"Duplicate lines" => "Duplica linea(e)",
|
||||
"Remove lines" => "Rimuovi linea(e)",
|
||||
"Insert line before" => "Inserisci linea prima di",
|
||||
"Insert line after" => "Inserisci linea dopo di",
|
||||
"Search for selected" => "Cerca selezionati",
|
||||
"Jump to definition" => "Vai a definizione / torna indietro",
|
||||
"Comment uncomment" => "Commento / decommenta",
|
||||
"Insert tab indent" => "Inserisci tab / rientro selezionato",
|
||||
"Wrap with div" => "Includi con <div>",
|
||||
"Wrap with span" => "Includi <span>",
|
||||
"Wrap unwrap p" => "Includi / escludi con <p>",
|
||||
"Wrap unwrap a" => "Includi / escludi con <a>",
|
||||
"Wrap unwrap b" => "Includi / escludi con <b>",
|
||||
"Wrap unwrap i" => "Includi / escludi con <i>",
|
||||
"Wrap unwrap strong" => "Includi / escludi con <strong>",
|
||||
"Wrap unwrap em" => "Includi / escludi con <em>",
|
||||
"Wrap unwrap li" => "Includi / escludi con <li>",
|
||||
"Wrap unwrap h1..." => "Includi / escludi con <h1> - <h3>",
|
||||
"End line with..." => "Finisci la linea con <br>",
|
||||
"Close tab" => "Chiudi tab",
|
||||
"Select file folder" => "Seleziona file, cartella",
|
||||
"Open file" => "Apri file",
|
||||
"Range select" => "Seleziona range",
|
||||
"Options for selected" => "Opzioni per selezionati",
|
||||
"Delete selected" => "Elimina selezionati",
|
||||
"Next previous tab" => "Tab successiva / precedente",
|
||||
"Next tab" => "Tab successiva",
|
||||
"Previous tab" => "Tab precedente",
|
||||
"New tab" => "Nuova tab",
|
||||
"Close current tab" => "Chiudi tab corrente",
|
||||
"Open file prompt" => "Open file prompt",
|
||||
"Find" => "Trova",
|
||||
"Focus on Go..." => "Focus on Go to line input",
|
||||
"Save" => "Salva",
|
||||
"Save as" => "Salva come...",
|
||||
"View webpage" => "Vedi pagina web",
|
||||
"Contract expand file..." => "Contrai / espandi file manager",
|
||||
"Fold unfold current..." => "Piega / dispiega riga corrente",
|
||||
"Refocus on document" => "Refocus sul documento",
|
||||
"Cancel tasks" => "Cancella compito"
|
||||
),
|
||||
|
||||
"ice-coder" =>
|
||||
array(
|
||||
"No text selected..." => "Nessun testo selezionato per la ricerc",
|
||||
"all files" => "tutti i file",
|
||||
"all filenames" => "tutti i nomi dei file",
|
||||
"selected files" => "seleziona file",
|
||||
"selected filenames" => "seleziona nomi dei file",
|
||||
"Creating Folder" => "Sto creando una cartla",
|
||||
"Sorry you can..." => "Spiacente, puoi avere solo 100 file aperti a volta!",
|
||||
"Opening File" => "Apertura file",
|
||||
"Enter relative file..." => "Digita il percorso relativo (con / di prefisso) o l'url remoto",
|
||||
"Getting" => "Getting",
|
||||
"Please enter the..." => "Per favore digita un nuovo nome per",
|
||||
"Renaming to" => "Rinominando a ",
|
||||
"Moving to" => "Muovendo a",
|
||||
"Deleting File" => "Eliminando file",
|
||||
"Pasting File" => "Incollando file",
|
||||
"Sorry cannot paste..." => "Spiacente, ma non puoi copiare un intera radice",
|
||||
"Nothing to paste..." => "Niente da copiare, copia prima un file o una cartella!",
|
||||
"and" => "e",
|
||||
"this document" => "questo documento",
|
||||
"replace" => "sostituisci",
|
||||
"replace all" => "sostituisci tutto",
|
||||
"file" => "file",
|
||||
"Replacing text in" => "Sostituisci il testo con",
|
||||
"Cancelled tasks" => "Compiti cancellati",
|
||||
"Open previous files" => "Aprire i file precedenti?",
|
||||
"Please enter your..." => "Please enter your GitHub token (either personal access token or client/secret pair token). See tooltip next to Github Auth Token on Help > Settings screen for more info",
|
||||
"This will compare..." => "Questo confronterà e mostrarà la diff tra il dir locale e il repository. Ok?",
|
||||
"Please note for..." => "Si prega di notare: affinche l'aggiornamento funzioni correttamente, è necessario disporre dei permessi di scrittura e cancellazione su tutti le cartelle e file di ICEcoder e. Se è necessario ripristinare questa versione di ICEcoder per qualsiasi motivo, lo troverete nella directory / tmp dir. Fare clic su OK per procedere con l'aggiornamento automatico o annullare a visitare il sito ICEcoder in modo da poter utilizzare la zip e aggiornare manualmente.",
|
||||
"You can start..." => "Puoi ripoertare il bug in Help > Settings",
|
||||
"Error cannot find..." => "Error: cannot find/access the error file paths",
|
||||
"No new errors..." => "Nessun nuovo errore trovato",
|
||||
"You have made..." => "Hai fatto alcuni cambiamenti. Sei sicuro che vuoi chiudere senza prima salvare?",
|
||||
"Close all tabs" => "Chiudere tutte le tabs?",
|
||||
"results" => "risultati"
|
||||
),
|
||||
|
||||
"login" =>
|
||||
array(
|
||||
"set password" => "imposta password",
|
||||
"login" => "login",
|
||||
"To disable registration..." => "Per disabilitare la Modalità registrazione, utilizza il menu di configurazione oppure apri il file lib/config___settings.php, modifica enableRegistration a false e ricarica questa pagina",
|
||||
"Registration mode enabled" => "Modalità registrazione attivata",
|
||||
"auto-check for updates" => "verifica automaticamente per aggiornamenti",
|
||||
"To put into..." => "Per attivare la Modalità multi-utente, utilizza il menu di configurazione oppure apri il file lib/config___settings.php, modifica multiUser a true e ricarica questa pagina",
|
||||
"multi-user" => "multi-utente"
|
||||
"To disable registration..." => "Per disattivare la modalità di registrazione, apri il menu delle impostazioni o aprire lib/config___settings.php e cambia enableRegistration in false quindi ricarica questa pagina",
|
||||
"Registration mode enabled" => "Modalità di registrazione abilitata",
|
||||
"auto-check for updates" => "auto-check per aggiornamenti",
|
||||
"To put into..." => "Per mettere in modalità multi-utente, aprire il menu delle impostazioni o apri lib / config ___ settings.php e cambiare multiutente su true quindi ricarica questa pagina",
|
||||
"multi-user" => "multi-user"
|
||||
),
|
||||
|
||||
"multiple-results" =>
|
||||
array(
|
||||
"rename all" => "rename all",
|
||||
"replace all" => "replace all",
|
||||
"document" => "document",
|
||||
"Found" => "Found",
|
||||
"times" => "times",
|
||||
"replace" => "replace",
|
||||
"file folder" => "file/folder",
|
||||
"rename to" => "rename to",
|
||||
"rename" => "rename",
|
||||
"file" => "file",
|
||||
"No matches found" => "No matches found",
|
||||
"selected" => "selected",
|
||||
"found in" => "found in",
|
||||
"Replaced" => "Replaced"
|
||||
),
|
||||
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder needs to reload to make this plugin usable. Reload now?",
|
||||
"saving plugins" => "saving plugins...",
|
||||
"Cannot update config..." => "Cannot update config file. Please set public write permissions on",
|
||||
"and try again" => "and try again",
|
||||
"couldnt delete dir" => "could not delete dir",
|
||||
"couldnt delete file" => "could not delete file",
|
||||
"plugins" => "plugins",
|
||||
"Guide to writing..." => "Guide to writing plugins",
|
||||
"Manage Installed" => "Manage Installed",
|
||||
"URL" => "URL",
|
||||
"Target" => "Target",
|
||||
"Timer" => "Timer",
|
||||
"Update" => "Update",
|
||||
"Install" => "Install",
|
||||
"Uninstall" => "Uninstall",
|
||||
"Reload after install..." => "Reload after install required"
|
||||
),
|
||||
|
||||
"properties" =>
|
||||
array(
|
||||
"properties" => "Proprietà",
|
||||
"Size" => "Dimensione",
|
||||
"Modified" => "Modificato",
|
||||
"Last access" => "Ultimo accesso",
|
||||
"Type" => "Type",
|
||||
"Readable Writeable" => "Leggibile / Scrivibile",
|
||||
"Relative path" => "Percorso relativo",
|
||||
"Absolute path" => "Percorso assoluto",
|
||||
"Contains" => "Contiene",
|
||||
"Permissions" => "Permessi",
|
||||
"Owner" => "Proprietario",
|
||||
"Group" => "Gruppo",
|
||||
"Public" => "Pubblico",
|
||||
"Read" => "Lettura",
|
||||
"Write" => "Scrittura",
|
||||
"Execute" => "Esecuzione",
|
||||
"Change to" => "Cambia a",
|
||||
"update" => "aggiorna"
|
||||
),
|
||||
|
||||
"settings-common" =>
|
||||
array(
|
||||
"Your document does..." => "Il tuo documento non sembra essere in formato UTF-8 per questo viene corretto"
|
||||
),
|
||||
|
||||
"settings-save-current-files" =>
|
||||
array(
|
||||
"Cannot update config..." => "Impossibile aggiornare il file di configurazione. Si prega di impostare i permessi di scrittura pubblica su",
|
||||
"and try again" => "e prova ancora"
|
||||
),
|
||||
|
||||
"settings-screen" =>
|
||||
array(
|
||||
"settings" => "settings",
|
||||
"version" => "versione",
|
||||
"website" => "sito web",
|
||||
"git" => "git",
|
||||
"codemirror dir" => "dir codemirror ",
|
||||
"codemirror version" => "versione codemirror ",
|
||||
"file manager root" => "root di file manager ",
|
||||
"Free to use..." => "Libero di usarlo per i propri scopi, commerciali e non, facendomelo solo sapere per eventuali nuovi e interessanti utilizzi o personalizzazioni. :) <br> Nessuna garanzia o responsabilità, tutte le responsabilità di utilizzo è vostra. <br> Un sacco di aziende e persone fantastiche hanno contribuito a costruire ICEcoder e ce ne sarebbero troppi da ringraziare. Si prega di consultare la lista completa a",
|
||||
"functionality" => "funzionalità",
|
||||
"check for updates..." => "controlla aggiornamenti all'avvio",
|
||||
"auto open last..." => "Apri automaticamente ultimi file al login",
|
||||
"when finding in..." => "quando trovi nei file, escludi",
|
||||
"assisting" => "assisting",
|
||||
"code assist" => "code assist",
|
||||
"visible tabs" => "tab visibili",
|
||||
"locked nav" => "navigazione bloccata",
|
||||
"tag wrapper command" => "tag wrapper command",
|
||||
"auto-complete on" => "auto-completamento attivo",
|
||||
"security" => "sicurezza",
|
||||
"new password" => "nuova password",
|
||||
"8 chars min" => "8 caratteri minimo",
|
||||
"confirm password" => "conferma password",
|
||||
"banned files/folders" => "file e cartelle vietati",
|
||||
"banned paths" => "percorsi vietati",
|
||||
"ip addresses" => "indirizzo ip",
|
||||
"Slash prefixed comma..." => "slash di prefisso, delimitato da virgole",
|
||||
"Comma delimited" => "delimitato da virgole",
|
||||
"style" => "style",
|
||||
"theme" => "tema",
|
||||
"line wrapping" => "a capo automatico",
|
||||
"indent type" => "tipo di rientro",
|
||||
"indent size" => "dimensioni rientro",
|
||||
"font size" => "dimensione font ",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "layout",
|
||||
"plugin panel aligned" => "Pannello plug inallineato",
|
||||
"file manager" => "file manager",
|
||||
"root" => "root",
|
||||
"Slash prefixed" => "barra obliqua prefisso",
|
||||
"bug reporting" => "bug reporting",
|
||||
"check in files" => "check in files",
|
||||
"every" => "ogni",
|
||||
"secs getting last" => "secs, getting last",
|
||||
"lines" => "linee",
|
||||
"multi-user" => "multi-user",
|
||||
"Make sure you..." => "Assicurati di non bloccarti fuori",
|
||||
"Registration" => "Registrazione",
|
||||
"auth token" => "auth token",
|
||||
"Required to get..." => "Necessario per ottenere diff, validare il votro repo GitHub ospitato ecc Se non ne avete uno, è possibile utilizzare un:".PHP_EOL.PHP_EOL.
|
||||
"-
|
||||
token di accesso personale (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or".PHP_EOL.
|
||||
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
|
||||
"Non è consigliabile impostare il token qui e comunque è più sicuro inserirlo quando richiesto dal ICEcoder e verrà tenuto solamente durante la sessione.".PHP_EOL.PHP_EOL.
|
||||
"However, if you work in a trusted and secure environment, it is more efficient to set it here.",
|
||||
"Sorry cannot commit..." => "Siamo spiacenti, non è possibile modificare le impostazioni in modalità demo",
|
||||
"update" => "aggiorna"
|
||||
),
|
||||
|
||||
"settings-update" =>
|
||||
array(
|
||||
"Cannot update config..." => "Non posso aggiornare il file config. Per favore permetti l'accesso pubblico di scrittura",
|
||||
"and try again" => "e prova ancora",
|
||||
"and press refresh" => "e premi aggiorna"
|
||||
),
|
||||
|
||||
"updater" =>
|
||||
array(
|
||||
"Update appears to..." => "L'aggiornamento sembra andato bene"
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -11,7 +11,7 @@ $text = array(
|
||||
|
||||
"editor" =>
|
||||
array(
|
||||
"Click icons for..." => "<b>Klikk på ikoner<br>for hjelp &<br>bruk av info</b>",
|
||||
"Click icons for..." => "<b>Klikk på ikoner<br>for hjelp &<br>bruk av info</b>",
|
||||
"server" => "server",
|
||||
"Server name, OS..." => "Server navn, OS & IP:",
|
||||
"Root" => "Root:",
|
||||
@@ -22,14 +22,14 @@ $text = array(
|
||||
"Browser" => "Nettleser:",
|
||||
"Your IP" => "Din IP:",
|
||||
"files" => "filer",
|
||||
"Last 10 files..." => "Siste 10 åpne filer:",
|
||||
"Last 10 files..." => "Siste 10 åpne filer:",
|
||||
"none" => "[none]",
|
||||
"test suite" => "test suite",
|
||||
"Run unit tests" => "Kjø unit tests",
|
||||
"Run unit tests" => "Kjør unit tests",
|
||||
"dev mode" => "utvikler modus",
|
||||
"Status" => "Status",
|
||||
"Using" => "Brukes",
|
||||
"You can switch..." => "Du kan slå utvikler modus på/av i lib/config__settings.php",
|
||||
"You can switch..." => "Du kan slå utvikler modus på/av i lib/config__settings.php",
|
||||
"results" => "resultater"
|
||||
|
||||
),
|
||||
@@ -45,17 +45,18 @@ $text = array(
|
||||
"index" =>
|
||||
array(
|
||||
"UPDATE INFO" => "UPDATE INFO",
|
||||
"now available" => "Nå tilgjengelig",
|
||||
"now available" => "Nå tilgjengelig",
|
||||
"Your version is" => "Din versjon er",
|
||||
"Update now" => "Oppdater nå",
|
||||
"Update now" => "Oppdater nå",
|
||||
"You have some..." => "Du har noe ulagrede endringer",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "arbeider",
|
||||
"Color picker" => "Fargevelger",
|
||||
"New File" => "Ny Fil",
|
||||
"New Folder" => "Ny Mappe",
|
||||
"Upload File(s)" => "Last opp Fil(er)",
|
||||
"Paste" => "Lim inn",
|
||||
"Open" => "Åpne",
|
||||
"Open" => "Åpne",
|
||||
"Copy" => "Kopier",
|
||||
"Duplicate" => "Duplikat",
|
||||
"Delete" => "Slett",
|
||||
@@ -69,7 +70,7 @@ $text = array(
|
||||
"Help" => "Hjelp",
|
||||
"Save" => "Lagre",
|
||||
"Save As" => "Lagre Som",
|
||||
"Live Preview" => "Direkte Forhåndsvisning",
|
||||
"Live Preview" => "Direkte Forhåndsvisning",
|
||||
"Upload" => "Last opp",
|
||||
"Zip" => "Zip",
|
||||
"Print" => "Skriv ut",
|
||||
@@ -77,7 +78,7 @@ $text = array(
|
||||
"Logout" => "Loggut",
|
||||
"Undo" => "Angre",
|
||||
"Redo" => "Gjenta",
|
||||
"Indent more" => "Større innrykk",
|
||||
"Indent more" => "Større innrykk",
|
||||
"Indent less" => "Mindre innrykk",
|
||||
"Autocomplete" => "Autokomplettere",
|
||||
"Comment/Uncomment" => "Kommentar/Fjern Kommentar",
|
||||
@@ -85,22 +86,22 @@ $text = array(
|
||||
"Manual" => "Manual",
|
||||
"Shortcuts" => "Snarveier",
|
||||
"Settings" => "Innstillinger",
|
||||
"Search for selected" => "Søk for utvalgte",
|
||||
"Search for selected" => "Søk for utvalgte",
|
||||
"website" => "webside",
|
||||
"Close all tabs" => "Lukk alle faner",
|
||||
"Alphabetize tabs" => "Ordne faner alfabetisk",
|
||||
// "Find" => "Finn",
|
||||
// "in" => "i",
|
||||
// "and" => "og",
|
||||
// "replace" => "erstatt",
|
||||
// "replace all" => "erstatt alt",
|
||||
// "this document" => "dette dokumentet",
|
||||
// "open documents" => "åpne dokumenter",
|
||||
// "all files" => "alle filer",
|
||||
// "all filenames" => "alle filenavn",
|
||||
"Turn on/off..." => "Svitsj på/av kode assistenten",
|
||||
"Find" => "Finn",
|
||||
"in" => "i",
|
||||
"and" => "og",
|
||||
"replace" => "erstatt",
|
||||
"replace all" => "erstatt alt",
|
||||
"this document" => "dette dokumentet",
|
||||
"open documents" => "åpne dokumenter",
|
||||
"all files" => "alle filer",
|
||||
"all filenames" => "alle filenavn",
|
||||
"Turn on/off..." => "Svitsj på/av kode assistenten",
|
||||
"Code Assist" => "Kode Assistenten",
|
||||
"Go to Line" => "Gå til Linje",
|
||||
"Go to Line" => "Gå til Linje",
|
||||
"View" => "Vis",
|
||||
"Bug reporting not active" => "Bug rapportering ikke aktiv"
|
||||
),
|
||||
@@ -115,75 +116,75 @@ $text = array(
|
||||
"file-control" =>
|
||||
array(
|
||||
"Sorry" => "Beklager",
|
||||
"does not seem..." => "synes ikke å eksistere på serveren",
|
||||
"Sorry, could not..." => "Beklager, kunne ikke få innholdet i",
|
||||
"Sorry, cannot create..." => "Beklager, kan ikke opprette mappe på",
|
||||
"does not seem..." => "synes ikke å eksistere på serveren",
|
||||
"Sorry, could not..." => "Beklager, kunne ikke få innholdet i",
|
||||
"Sorry, cannot create..." => "Beklager, kan ikke opprette mappe på",
|
||||
"Sorry, cannot copy" => "Beklager, kan ikke kopiere",
|
||||
"into" => "inn",
|
||||
"Uploaded file(s) OK" => "Opplastete fil(er) OK",
|
||||
"Sorry, cannot upload" => "Beklager, kan ikke laste opp",
|
||||
"Sorry, cannot upload..." => "Beklager, kan ikke laste opp i demo-modus",
|
||||
"Sorry, cannot rename" => "Beklager, kan ikke endre navn",
|
||||
"Maybe public write..." => "Kanskje det trengs offentlige skriverettigheter på denne, eller overordnede mappen?",
|
||||
"Maybe public write..." => "Kanskje det trengs offentlige skriverettigheter på denne, eller overordnede mappen?",
|
||||
"Sorry, cannot move" => "Beklager, kan ikke flytte",
|
||||
"Sorry, cannot save" => "Beklager, kan ikke lagre",
|
||||
"Sorry, cannot replace..." => "Beklager, kan ikke erstatte tekst i",
|
||||
"Sorry, cannot change..." => "Beklager, kan ikke endre tillatelser på",
|
||||
"Sorry, cannot delete..." => "Beklager, kan ikke slette rotnivå",
|
||||
"Sorry, cannot change..." => "Beklager, kan ikke endre tillatelser på",
|
||||
"Sorry, cannot delete..." => "Beklager, kan ikke slette rotnivå",
|
||||
"Sorry, cannot delete" => "Beklager, kan ikke slette",
|
||||
"Sorry, this file..." => "Beklager, denne filen er endret, kan ikke lagre",
|
||||
"Reload this file..." => "Skal denne filen lastes igjen og kopieres denne versjon til et nytt dokument?",
|
||||
"There was a..." => "Dette var en teknisk hikke, sannsynligvis var noe ikke helt klar. Så ICEcoder laster sin kontroll fil på nytt.",
|
||||
"displayed at" => "vises på",
|
||||
"Enter filename to..." => "Skriv inn filnavnet for å lagre på",
|
||||
"There was a..." => "Dette var en teknisk hikke, sannsynligvis var noe ikke helt klar. Så ICEcoder laster sin kontrollfil på nytt.",
|
||||
"displayed at" => "vises på",
|
||||
"Enter filename to..." => "Skriv inn filnavnet for å lagre på",
|
||||
"That file exists..." => "Denne filen eksisterer allerede, skriv over?",
|
||||
"Saving" => "Lagring"
|
||||
),
|
||||
|
||||
"get-branch" =>
|
||||
array(
|
||||
"There are no..." => "Det er ingen forskjeller mellom det lokale og GitHub lagringssted. Gå tilbake til vanlig modus?",
|
||||
"There are no..." => "Det er ingen forskjeller mellom det lokale og GitHub lagringssted. Gå tilbake til vanlig modus?",
|
||||
"Sorry, there was..." => "Beklager, det var en feil, kode:",
|
||||
"Your local folder..." => "Din lokale mappe er tom, ønsker du å klone"
|
||||
"Your local folder..." => "Din lokale mappe er tom, ønsker du å klone"
|
||||
),
|
||||
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Beklager, kan ikke opprette mappe på",
|
||||
"Sorry, cannot create..." => "Beklager, kan ikke opprette mappe på",
|
||||
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter",
|
||||
"and try again" => "og prøv igjen",
|
||||
"and try again" => "og prøv igjen",
|
||||
"saving github paths" => "lagre GitHub stier...",
|
||||
"github paths" => "github stier",
|
||||
"Choose existing path" => "Velg eksisterende sti",
|
||||
"Local path" => "Lokal sti",
|
||||
"Remote GitHub path" => "Ekstern GitHub sti",
|
||||
"Choose" => "Velg",
|
||||
"Set local and..." => "Sett lokal og ekstern sti til tomt, for å fjerne",
|
||||
"Set local and..." => "Sett lokal og ekstern sti til tomt, for å fjerne",
|
||||
"Update" => "Oppdater",
|
||||
"Add new path" => "Legg til ny sti",
|
||||
"Add" => "Legg til",
|
||||
"Usage Info" => "Bruksinfo:",
|
||||
"Enter relative local..." => "Oppgi relative lokale stier (f.e. /server/myfiles) og absolutte GitHub stier (f.e. https://github.com/user/repo eller https://github.com/user/repo/tree/branch for grener), som eksemplene. Med dette har du etablert kildestier på begge steder, som et par.",
|
||||
"You can then..." => "Du kan deretter velge en sti par og dette blir da den nye rot stien i ICEcoder.",
|
||||
"The file manager..." => "Filbehandleren viser deretter et ny GitHub-ikon, som du kan klikke på, for å utføre en sjekk og vise forskjell mellom de 2 kildene. Disse forskjellene kan da være påkrevd, og flyttes til den eksterne stien på GitHub eller klonet til din lokale sti, for å synkronisere filene dine.",
|
||||
"If you want..." => "Hvis du ønsker å velge en annen root sti, kan dette gjøres i skjermbildet Innstillinger."
|
||||
"Enter relative local..." => "Oppgi relative lokale stier (f.e. /server/myfiles) og absolutte GitHub stier (f.e. https://github.com/user/repo eller https://github.com/user/repo/tree/branch for grener), som eksemplene. Med dette har du etablert kildestier på begge steder, som et par.",
|
||||
"You can then..." => "Du kan deretter velge en stipar og dette blir da den nye rot stien i ICEcoder.",
|
||||
"The file manager..." => "Filbehandleren viser deretter et nytt GitHub-ikon, som du kan klikke på, for å utføre en sjekk og vise forskjell mellom de 2 kildene. Disse forskjellene kan da være påkrevd, og flyttes til den eksterne stien på GitHub eller klones til din lokale sti, for å synkronisere filene dine.",
|
||||
"If you want..." => "Hvis du ønsker å velge en annen root sti, kan dette gjøres i skjermbildet Innstillinger."
|
||||
),
|
||||
|
||||
"github" =>
|
||||
array(
|
||||
"Sorry, you do..." => "Beklager, det ser ikke ut til å ha lastet inn OpenSSL på PHP instans, så https er ikke tilgjengelig. Dette er nødvendig for GitHub dataoverføring, du kan endre php.ini innstillingene, start serveren på nytt og prøv igjen"
|
||||
"Sorry, you do..." => "Beklager, det ser ikke ut til å ha lastet inn OpenSSL på PHP instans, så https er ikke tilgjengelig. Dette er nødvendig for GitHub dataoverføring, du kan endre php.ini innstillingene, start serveren på nytt og prøv igjen"
|
||||
),
|
||||
|
||||
"headers" =>
|
||||
array(
|
||||
"Bad CSRF token..." => "Bad CSRF token. Vennligst rapporter feilinfoen på https://github.com/mattpass/ICEcoder slik at det kan fikses."
|
||||
"Bad CSRF token..." => "Bad CSRF token. Vennligst rapporter feilinfoen på https://github.com/mattpass/ICEcoder slik at det kan fikses."
|
||||
),
|
||||
|
||||
"help" =>
|
||||
array(
|
||||
"shortcuts" => "snarveier",
|
||||
"Within document" => "Innenfor dokument",
|
||||
"On Tabs" => "På faner",
|
||||
"On Tabs" => "På faner",
|
||||
"Within file manager" => "Innenfor filbehandler",
|
||||
"Anywhere" => "Hvor som helst",
|
||||
"Space" => "Mellomrom",
|
||||
@@ -192,36 +193,36 @@ $text = array(
|
||||
"Left click" => "Venstre klikk",
|
||||
"Middle click" => "Middel klikk",
|
||||
"Double click tap..." => "Dobbel klikk / tap (mobil)",
|
||||
"Right click" => "Høyre klikk",
|
||||
"Right click" => "Høyre klikk",
|
||||
"Middle scrollwheel" => "Middel rullehjul",
|
||||
"Drag" => "Dra",
|
||||
"Autocomplete add snippet" => "Autofullfør/legg til kodebiten",
|
||||
"Autocomplete add snippet" => "Autofullfør/legg til kodebiten",
|
||||
"Multiple select" => "Flere valg",
|
||||
"Move line up" => "Flytt linje opp",
|
||||
"Move line down" => "Flytt linje ned",
|
||||
"Duplicate lines" => "Dupliser linje(r)",
|
||||
"Remove lines" => "Slett linje(r)",
|
||||
"Insert line before" => "Sett inn linje før",
|
||||
"Insert line before" => "Sett inn linje før",
|
||||
"Insert line after" => "Sett inn linje etter",
|
||||
"Search for selected" => "Søk etter valgt",
|
||||
"Search for selected" => "Søk etter valgt",
|
||||
"Jump to definition" => "Hopp til definisjon/hopp tilbake",
|
||||
"Comment uncomment" => "Kommentar/fjern kommentar",
|
||||
"Insert tab indent" => "Sett inn innrykk/valgt innrykk",
|
||||
"Wrap with div" => "Wrap med <div>",
|
||||
"Wrap with span" => "Wrap med <span>",
|
||||
"Wrap unwrap p" => "Wrap/uwrap med <p>",
|
||||
"Wrap unwrap a" => "Wrap/uwrap med <a>",
|
||||
"Wrap unwrap b" => "Wrap/uwrap med <b>",
|
||||
"Wrap unwrap i" => "Wrap/uwrap med <i>",
|
||||
"Wrap unwrap strong" => "Wrap/uwrap med <strong>",
|
||||
"Wrap unwrap em" => "Wrap/uwrap med <em>",
|
||||
"Wrap unwrap li" => "Wrap/uwrap med <li>",
|
||||
"Wrap unwrap h1..." => "Wrap/uwrap med <h1> - <h3>",
|
||||
"End line with..." => "Avslutt linje med <br>",
|
||||
"Wrap with div" => "Wrap med <div>",
|
||||
"Wrap with span" => "Wrap med <span>",
|
||||
"Wrap unwrap p" => "Wrap/uwrap med <p>",
|
||||
"Wrap unwrap a" => "Wrap/uwrap med <a>",
|
||||
"Wrap unwrap b" => "Wrap/uwrap med <b>",
|
||||
"Wrap unwrap i" => "Wrap/uwrap med <i>",
|
||||
"Wrap unwrap strong" => "Wrap/uwrap med <strong>",
|
||||
"Wrap unwrap em" => "Wrap/uwrap med <em>",
|
||||
"Wrap unwrap li" => "Wrap/uwrap med <li>",
|
||||
"Wrap unwrap h1..." => "Wrap/uwrap med <h1> - <h3>",
|
||||
"End line with..." => "Avslutt linje med <br>",
|
||||
"Close tab" => "Lukk fane",
|
||||
"Select file folder" => "Velg fil/mappe",
|
||||
"Open file" => "Åpne fil",
|
||||
"Range select" => "Velg område",
|
||||
"Open file" => "Åpne fil",
|
||||
"Range select" => "Velg område",
|
||||
"Options for selected" => "Egenskaper for valgt",
|
||||
"Delete selected" => "Slett valgt",
|
||||
"Next previous tab" => "Neste/forige fane",
|
||||
@@ -229,43 +230,43 @@ $text = array(
|
||||
"Previous tab" => "Forige fane",
|
||||
"New tab" => "Ny fane",
|
||||
"Close current tab" => "Lukk gjeldende fane",
|
||||
"Open file prompt" => "Åpne fil prompt",
|
||||
"Open file prompt" => "Åpne fil prompt",
|
||||
"Find" => "Finn",
|
||||
"Focus on Go..." => "Fokus på Go til linje inndata",
|
||||
"Focus on Go..." => "Fokus på Gå til linje inndata",
|
||||
"Save" => "Lagre",
|
||||
"Save as" => "Lagre som...",
|
||||
"View webpage" => "Vis webside",
|
||||
"Contract expand file..." => "Trekk sammen/utvid filbehandler",
|
||||
"Fold unfold current..." => "Brett/utfold gjeldende linje",
|
||||
"Refocus on document" => "Refokusere på dokument",
|
||||
"Refocus on document" => "Refokusere på dokument",
|
||||
"Cancel tasks" => "Avbryt oppgaver"
|
||||
),
|
||||
|
||||
"ice-coder" =>
|
||||
array(
|
||||
"No text selected..." => "Ingen tekst valgt til å søke på",
|
||||
"No text selected..." => "Ingen tekst valgt til å søke på",
|
||||
"Creating Folder" => "Lage mappe",
|
||||
"Sorry you can..." => "Beklager, du kan bare ha 100 filer åpne samtidig!",
|
||||
"Opening File" => "Åpner Fil",
|
||||
"Sorry you can..." => "Beklager, du kan bare ha 100 filer åpne samtidig!",
|
||||
"Opening File" => "Åpner Fil",
|
||||
"Enter relative file..." => "Oppgi den relative filstien (med prefiks /) eller ekstern URL",
|
||||
"Getting" => "Får",
|
||||
"Please enter the..." => "Skriv inn det nye navnet på",
|
||||
"Getting" => "Får",
|
||||
"Please enter the..." => "Skriv inn det nye navnet på",
|
||||
"Renaming to" => "Endre navn til",
|
||||
"Moving to" => "Flytt til",
|
||||
"Deleting File" => "Slett Fil",
|
||||
"Pasting File" => "Lim inn Fil",
|
||||
"Sorry cannot paste..." => "Beklager, kan ikke lime inn en hel rot mappe",
|
||||
"Nothing to paste..." => "Ingenting å lime inn, kopiere en fil/mappe først!",
|
||||
"Nothing to paste..." => "Ingenting å lime inn, kopiere en fil/mappe først!",
|
||||
"Replacing text in" => "Erstatte tekst i",
|
||||
"Cancelled tasks" => "Kansellerte oppgaver",
|
||||
"Open previous files" => "Åpne siste filer?",
|
||||
"Please enter your..." => "Skriv inn GitHub token (enten personlig tilgang token eller kunde/hemmelig par token). Se verktøytips ved siden av Github Auth Token på Hjelp-skjermbildet > Innstillinger for mer info",
|
||||
"Open previous files" => "Åpne siste filer?",
|
||||
"Please enter your..." => "Skriv inn GitHub token (enten personlig tilgang token eller kunde/hemmelig par token). Se verktøytips ved siden av Github Auth Token på Hjelp-skjermbildet > Innstillinger for mer info",
|
||||
"This will compare..." => "Det vil sammenlignes og vise en forskjell mellom din lokale mappe og lagringsstedet. OK?",
|
||||
"Please note for..." => "Vennligst merk: for at oppdatering skal fungere skikkelig, må du ha skrive/slette tilgang til alle ICEcoder kataloger og filer. Hvis du trenger å gjenopprette denne versjonen av ICEcoder av en eller annen grunn, vil du finne den i /tmp mappen. Klikk OK for å fortsette med en auto-oppdatering eller avbryt for å besøke ICEcoder området slik at du kan ta tak i zip-filen og oppdatere manuelt.",
|
||||
"Please note for..." => "Vennligst merk: for at oppdatering skal fungere skikkelig, må du ha skrive/slette tilgang til alle ICEcoder kataloger og filer. Hvis du trenger å gjenopprette denne versjonen av ICEcoder av en eller annen grunn, vil du finne den i /tmp mappen. Klikk OK for å fortsette med en auto-oppdatering eller avbryt for å besøke ICEcoder området slik at du kan ta tak i zip-filen og oppdatere manuelt.",
|
||||
"You can start..." => "Du kan starte feilrapportering i Hjelp > Innstillinger",
|
||||
"Error cannot find..." => "Feil: kan ikke finne/få tilgang til feil filstier",
|
||||
"Error cannot find..." => "Feil: kan ikke finne/få tilgang til feil filstier",
|
||||
"No new errors..." => "Ingen feil funnet",
|
||||
"You have made..." => "Du har gjort endringer. Er du sikker på, at du vil lukke uten å lagre?",
|
||||
"You have made..." => "Du har gjort endringer. Er du sikker på, at du vil lukke uten å lagre?",
|
||||
"Close all tabs" => "Lukk alle faner?"
|
||||
),
|
||||
|
||||
@@ -273,16 +274,16 @@ $text = array(
|
||||
array(
|
||||
"set password" => "sett passord",
|
||||
"login" => "logginn",
|
||||
"To disable registration..." => "Hvis du vil deaktivere registreringsmodus, åpne innstillingsmenyen eller åpne lib/config ___ settings.php og endre/aktiver Påmelding til 'false', deretter laste siden om igjen",
|
||||
"To disable registration..." => "Hvis du vil deaktivere registreringsmodus, åpne innstillingsmenyen eller åpne lib/config ___ settings.php og endre/aktiver Påmelding til 'false', deretter laste siden om igjen",
|
||||
"Registration mode enabled" => "Registreringsmodus aktivert",
|
||||
"auto-check for updates" => "auto-sjekk for oppdateringer",
|
||||
"To put into..." => "Å sette til flerbrukermodus, åpne innstillingsmenyen eller åpen lib/config ___ settings.php og endre flerbruker til 'true', deretter laste siden om igjen",
|
||||
"To put into..." => "Å sette til flerbrukermodus, åpne innstillingsmenyen eller åpne lib/config ___ settings.php og endre flerbruker til 'true', deretter laste siden om igjen",
|
||||
"multi-user" => "flerbruker"
|
||||
),
|
||||
|
||||
"multiple-results" =>
|
||||
array(
|
||||
"rename all" => "endre navn på alle",
|
||||
"rename all" => "endre navn på alle",
|
||||
"replace all" => "erstatte alle",
|
||||
"document" => "dokument",
|
||||
"Found" => "Funnet",
|
||||
@@ -300,28 +301,28 @@ $text = array(
|
||||
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder må startes om igjen, for å gjøre programtillegget kjørbar. Start om igjen nå?",
|
||||
"ICEcoder needs to..." => "ICEcoder må startes om igjen, for å gjøre programtillegget kjørbar. Start om igjen nå?",
|
||||
"saving plugins" => "lagre programtillegg...",
|
||||
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter",
|
||||
"and try again" => "og prøv igjen",
|
||||
"and try again" => "og prøv igjen",
|
||||
"couldnt delete dir" => "kan ikke slette mappe",
|
||||
"couldnt delete file" => "kan ikke slette fil",
|
||||
"plugins" => "programtillegg",
|
||||
"Guide to writing..." => "Guide til skriving av programtillegg",
|
||||
"Manage Installed" => "Administrer installerte",
|
||||
"URL" => "URL",
|
||||
"Target" => "Mål",
|
||||
"Target" => "Mål",
|
||||
"Timer" => "Tidsur",
|
||||
"Update" => "Oppdater",
|
||||
"Install" => "Installer",
|
||||
"Uninstall" => "Avinstaller",
|
||||
"Reload after install..." => "Omstart etter installasjon nødvendig"
|
||||
"Reload after install..." => "Omstart etter installasjon nødvendig"
|
||||
),
|
||||
|
||||
"properties" =>
|
||||
array(
|
||||
"properties" => "egenskaper",
|
||||
"Size" => "Størrelse",
|
||||
"Size" => "Størrelse",
|
||||
"Modified" => "Endret",
|
||||
"Last access" => "Siste tilgang",
|
||||
"Type" => "Type",
|
||||
@@ -335,20 +336,20 @@ $text = array(
|
||||
"Public" => "Offentlig",
|
||||
"Read" => "Lese",
|
||||
"Write" => "Skrive",
|
||||
"Execute" => "Kjøre",
|
||||
"Execute" => "Kjøre",
|
||||
"Change to" => "Endre til",
|
||||
"update" => "oppdatere"
|
||||
),
|
||||
|
||||
"settings-common" =>
|
||||
array(
|
||||
"Your document does..." => "Dokumentet ser ikke ut til å være i UTF-8 koding, derfor har det blitt omgjort"
|
||||
"Your document does..." => "Dokumentet ser ikke ut til å være i UTF-8 koding, derfor har det blitt omgjort"
|
||||
),
|
||||
|
||||
"settings-save-current-files" =>
|
||||
array(
|
||||
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter",
|
||||
"and try again" => "og prøv igjen"
|
||||
"and try again" => "og prøv igjen"
|
||||
),
|
||||
|
||||
"settings-screen" =>
|
||||
@@ -360,17 +361,17 @@ $text = array(
|
||||
"codemirror dir" => "codemirror mappe",
|
||||
"codemirror version" => "codemirror versjon",
|
||||
"file manager root" => "filbehandler root",
|
||||
"Free to use..." => "Gratis å bruke den til eget formål, kommersielle eller ikke, bare gi meg beskjed om eventuelle kule bruk eller tilpasninger. :) <br>Ingen garanti eller erstatningsansvar aksepteres for noe som helst, det er ditt eget ansvar for all bruk.<br>Mange fantastiske mennesker og bedrifter har bidratt til å bygge ICEcoder og det er for mange å takke her. Vennligst se hele listen på",
|
||||
"Free to use..." => "Gratis å bruke den til eget formål, kommersielle eller ikke, bare gi meg beskjed om eventuelle kule bruk eller tilpasninger. :) <br>Ingen garanti eller erstatningsansvar aksepteres for noe som helst, det er ditt eget ansvar for all bruk.<br>Mange fantastiske mennesker og bedrifter har bidratt til å bygge ICEcoder og det er for mange å takke her. Vennligst se hele listen på",
|
||||
"functionality" => "funksjonalitet",
|
||||
"check for updates..." => "se etter oppdateringer ved start",
|
||||
"auto open last..." => "åpne automatisk siste filer ved innlogging",
|
||||
"when finding in..." => "når funnet blant filer, utelukke",
|
||||
"auto open last..." => "åpne automatisk siste filer ved innlogging",
|
||||
"when finding in..." => "når funnet blant filer, utelukke",
|
||||
"assisting" => "assistere",
|
||||
"code assist" => "code assistent",
|
||||
"visible tabs" => "synlige faner",
|
||||
"locked nav" => "låst navi",
|
||||
"locked nav" => "låst navi",
|
||||
"tag wrapper command" => "tag wrapper kommando",
|
||||
"auto-complete on" => "autokompletering på",
|
||||
"auto-complete on" => "autokompletering på",
|
||||
"security" => "sikkerhet",
|
||||
"new password" => "nytt passord",
|
||||
"8 chars min" => "min. 8 tegn",
|
||||
@@ -384,8 +385,9 @@ $text = array(
|
||||
"theme" => "tema",
|
||||
"line wrapping" => "linjebryting",
|
||||
"indent type" => "innrykk type",
|
||||
"indent size" => "innrykk størr.",
|
||||
"font size" => "skrift størr.",
|
||||
"indent size" => "innrykk størr.",
|
||||
"font size" => "skrift størr.",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "layout",
|
||||
"plugin panel aligned" => "programtilleggspanel justert",
|
||||
"file manager" => "filbehandler",
|
||||
@@ -394,32 +396,33 @@ $text = array(
|
||||
"bug reporting" => "feil rapportering",
|
||||
"check in files" => "sjekke blant filer",
|
||||
"every" => "hver",
|
||||
"secs getting last" => "sek., får siste",
|
||||
"secs getting last" => "sek., får siste",
|
||||
"lines" => "linjer",
|
||||
"multi-user" => "flerbruker",
|
||||
"Make sure you..." => "Pass på, at du ikke låser deg ut selv",
|
||||
"Make sure you..." => "Pass på, at du ikke stenger deg ut selv",
|
||||
"Registration" => "Registrering",
|
||||
"auth token" => "auth token",
|
||||
"Required to get..." => "Nødvendig for å skille, bestemme ditt lagringssted på GitHub lageret etc. Hvis du ikke har en, kan du bruke en:".PHP_EOL.PHP_EOL.
|
||||
"Required to get..." => "Nødvendig for å skille, bestemme ditt lagringssted på GitHub lageret etc. Hvis du ikke har en, kan du bruke en:".PHP_EOL.PHP_EOL.
|
||||
"- personal access token (https://help.github.com/articles/creating-an-access-token-for-command-line-use), eller".PHP_EOL.
|
||||
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
|
||||
"Det anbefales ikke, at du setter token din her midlertidig, og vær sikre på å oppgi den, når du blir bedt av ICEcoder, som vil holde den i økten sin.".PHP_EOL.PHP_EOL.
|
||||
"Men hvis du jobber i et trygt og sikkert miljø, er det mer effektivt å sette den her.",
|
||||
"Beklager, kan ikke bekrefte..." => "Beklager, kan ikke bekrefte innstillinger i demo-modus",
|
||||
"Det anbefales ikke, at du setter token din her midlertidig, og vær sikre på å oppgi den, når du blir bedt av ICEcoder, som vil holde den i økten sin.".PHP_EOL.PHP_EOL.
|
||||
"Men hvis du jobber i et trygt og sikkert miljø, er det mer effektivt å sette den her.",
|
||||
"Sorry cannot commit..." => "Beklager, kan ikke bekrefte innstillinger i demo-modus",
|
||||
"update" => "oppdatere"
|
||||
),
|
||||
|
||||
"settings-update" =>
|
||||
array(
|
||||
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter;",
|
||||
"and try again" => "og prøv igjen",
|
||||
"and press refresh" => "og trykker refresh"
|
||||
"and try again" => "og prøv igjen",
|
||||
"and press refresh" => "og trykk refresh"
|
||||
),
|
||||
|
||||
"updater" =>
|
||||
array(
|
||||
"Update appears to..." => "Oppdatering synes å være vellykket"
|
||||
"Update appears to..." => "Oppdatering synes å være vellykket"
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
// Persian language translation
|
||||
// by: @voltan (GitHub)
|
||||
// @azizabadi_ (Twitter)
|
||||
@@ -49,6 +49,7 @@ $text = array(
|
||||
"Your version is" => "نسخه مورد استفاده شما",
|
||||
"Update now" => "به روز کنید",
|
||||
"You have some..." => "شما چند تغییر ذخیره نشده دارید",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "در حال کار",
|
||||
"Color picker" => "اشاره گر رنگ",
|
||||
"New File" => "فایل جدید",
|
||||
@@ -385,6 +386,7 @@ $text = array(
|
||||
"indent type" => "نوع برجسته کردن",
|
||||
"indent size" => "اندازه برجسته کردن",
|
||||
"font size" => "اندازه فونت",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "لایه",
|
||||
"plugin panel aligned" => "تراز پنل پلاگین",
|
||||
"file manager" => "مدیریت فایل",
|
||||
|
||||
439
lang/portuguese-brazilian.php
Normal file
439
lang/portuguese-brazilian.php
Normal file
@@ -0,0 +1,439 @@
|
||||
<?php
|
||||
// Português do Brasil
|
||||
// by: @leonardoroese (GitHub)
|
||||
|
||||
|
||||
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &). Translations on right side.
|
||||
|
||||
$text = array(
|
||||
|
||||
// / [ROOT LEVEL]
|
||||
|
||||
"editor" =>
|
||||
array(
|
||||
"Click icons for..." => "<b>Ícones<br>para ajuda &<br>info. utilização</b>",
|
||||
"server" => "Servidor",
|
||||
"Server name, OS..." => "Nome do Servidor, OS & IP:",
|
||||
"Root" => "Raiz:",
|
||||
"ICEcoder root" => "ICEcoder raiz:",
|
||||
"PHP version" => "Versâo do PHP:",
|
||||
"Date & time" => "Data e Hora:",
|
||||
"your device" => "seu dispositivo",
|
||||
"Browser" => "Exibir:",
|
||||
"Your IP" => "Seu IP:",
|
||||
"files" => "arquivos",
|
||||
"Last 10 files..." => "ùltimos 10 arquivos abertos:",
|
||||
"none" => "[nenhum]",
|
||||
"test suite" => "suíte de teste",
|
||||
"Run unit tests" => "Executar testes unitários",
|
||||
"dev mode" => "modo desenv.",
|
||||
"Status" => "Status",
|
||||
"Using" => "Usando",
|
||||
"You can switch..." => "Você pode alterar modo desenv. on/off em lib/config__settings.php"
|
||||
|
||||
),
|
||||
|
||||
"files" =>
|
||||
array(
|
||||
"Lock" => "Trava",
|
||||
"Refresh" => "Atualizar",
|
||||
"ROOT" => "[RAIZ]"
|
||||
|
||||
),
|
||||
|
||||
"index" =>
|
||||
array(
|
||||
"UPDATE INFO" => "INFO ATUALIZAÇÃO",
|
||||
"now available" => "disponível agora",
|
||||
"Your version is" => "Sua versão é",
|
||||
"Update now" => "Atualizar já",
|
||||
"You have some..." => "Voce possui alterações não salvas",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "trabalhando",
|
||||
"Color picker" => "Color picker",
|
||||
"New File" => "Novo Arquivo",
|
||||
"New Folder" => "Nova Pasta",
|
||||
"Upload File(s)" => "Carregar arquivo(s)",
|
||||
"Paste" => "Colar",
|
||||
"Open" => "Abrir",
|
||||
"Copy" => "Copiar",
|
||||
"Duplicate" => "Duplicar",
|
||||
"Delete" => "Excluir",
|
||||
"Rename" => "Renomear",
|
||||
"View Webpage" => "Exibir Página Web",
|
||||
"Download" => "Download",
|
||||
"Properties" => "Propriedades",
|
||||
"File" => "Arquivo",
|
||||
"Remote" => "Remoto",
|
||||
"Edit" => "Editar",
|
||||
"Source" => "Fonte",
|
||||
"Help" => "Ajuda",
|
||||
"Save" => "Salvar",
|
||||
"Save As" => "Salvar Como",
|
||||
"Live Preview" => "Preview",
|
||||
"Upload" => "Upload",
|
||||
"Zip" => "Zip",
|
||||
"Print" => "Imprimir",
|
||||
"Fullscreen toggle" => "Exibir tela cheia",
|
||||
"Logout" => "Sair",
|
||||
"Undo" => "Desfazer",
|
||||
"Redo" => "Refazer",
|
||||
"Indent more" => "Indentar +",
|
||||
"Indent less" => "Indentar -",
|
||||
"Autocomplete" => "Autocompletar",
|
||||
"Comment/Uncomment" => "Comentar/Descomentar",
|
||||
"Jump to Definition" => "Ir para definição",
|
||||
"Manual" => "Manual",
|
||||
"Shortcuts" => "Atalhos",
|
||||
"Settings" => "Configurações",
|
||||
"Search for selected" => "Procurar por selecionado",
|
||||
"website" => "website",
|
||||
"Close all tabs" => "Fechar todas as abas",
|
||||
"Alphabetize tabs" => "Ordenar abas por nome",
|
||||
"Find" => "Procurar",
|
||||
"in" => "em",
|
||||
"and" => "e",
|
||||
"replace" => "substituir",
|
||||
"replace all" => "substituir tudo",
|
||||
"this document" => "este documento",
|
||||
"open documents" => "documentos abertos",
|
||||
"all files" => "todos os arquivos",
|
||||
"all filenames" => "todos nomes de arquivo",
|
||||
"Turn on/off..." => "Ligar/Desligar Assistente",
|
||||
"Code Assist" => "Assistente",
|
||||
"Go to Line" => "Ir para linha",
|
||||
"View" => "Exibir",
|
||||
"Bug reporting not active" => "Relatório de Bug desativado"
|
||||
),
|
||||
|
||||
// /LIB
|
||||
|
||||
"bug-files-check" =>
|
||||
array(
|
||||
"Found in" => "Encontrado em:"
|
||||
),
|
||||
|
||||
"file-control" =>
|
||||
array(
|
||||
"Sorry" => "Desculpe",
|
||||
"does not seem..." => "Não encontrado no servidor",
|
||||
"Sorry, could not..." => "Desculpe, conteudo não encontrado para",
|
||||
"Sorry, cannot create..." => "Desculpe, não é possível criar pasta",
|
||||
"Sorry, cannot copy" => "Desculpe, não é possível copy",
|
||||
"into" => "into",
|
||||
"Uploaded file(s) OK" => "Arquivos carregados",
|
||||
"Sorry, cannot upload" => "Desculpe, não é possível carregar",
|
||||
"Sorry, cannot upload..." => "Desculpe, não é possível carregar lista no modo DEMO",
|
||||
"Sorry, cannot rename" => "Desculpe, não é possível renomear",
|
||||
"Maybe public write..." => "A pasta superior possui permissão de escrita?",
|
||||
"Sorry, cannot move" => "Desculpe, não é possível mover",
|
||||
"Sorry, cannot save" => "Desculpe, não é possível salvar",
|
||||
"Sorry, cannot replace..." => "Desculpe, não é possível substituir texto em",
|
||||
"Sorry, cannot change..." => "Desculpe, não é possível mudar permissões para",
|
||||
"Sorry, cannot delete..." => "Desculpe, não é possível excluir nível raiz",
|
||||
"Sorry, cannot delete" => "Desculpe, não é possível remover",
|
||||
"Sorry, this file..." => "Desculpe, este arquivo foi modificado, não é possível salvar",
|
||||
"Reload this file..." => "Recarregar e copiar sua versão?",
|
||||
"There was a..." => "Ocorreu algum problema. O ICEcoder recarregou o arquivo de controle novamente",
|
||||
"displayed at" => "exibido em",
|
||||
"Enter filename to..." => "Informe o nome do aquivo para salvar",
|
||||
"That file exists..." => "Este arquivo já existe, sobrescrever?",
|
||||
"Saving" => "Salvando"
|
||||
),
|
||||
|
||||
"get-branch" =>
|
||||
array(
|
||||
"There are no..." => "Não há diferenças entre loca/Github. Retornar para modo normal?",
|
||||
"Sorry, there was..." => "Desculpe, ocorreu um erro, código:",
|
||||
"Your local folder..." => "Sua pasta local está vazia, gostaria de clonar"
|
||||
),
|
||||
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Desculpe, não foi possível criar em",
|
||||
"Cannot update config..." => "Não é possível atualizar config. Habilitar permissões públicas",
|
||||
"and try again" => "e tentar novamente",
|
||||
"saving github paths" => "salvando caminhos Github...",
|
||||
"github paths" => "caminhos Github",
|
||||
"Choose existing path" => "Escolha caminho existente",
|
||||
"Local path" => "Caminho local",
|
||||
"Remote GitHub path" => "Caminho remoto Github",
|
||||
"Choose" => "Selecione",
|
||||
"Set local and..." => "Alterar caminho local e remoto como vazio para excluír",
|
||||
"Update" => "Atualizar",
|
||||
"Add new path" => "Adicionar novo caminho",
|
||||
"Add" => "Adicionar",
|
||||
"Usage Info" => "Info. de utilização:",
|
||||
"Enter relative local..." => "Informe os caminhos relativos (ex.: /server/myfiles) e absolutos do GitHub (ex.: https://github.com/user/repo ou https://github.com/user/repo/tree/branch for branches).Com isso estabelece os caminho dos fontes em ambos locais, como pares.",
|
||||
"You can then..." => "Você pode então escolher um caminho par para ser a raiz do ICEcoder.",
|
||||
"The file manager..." => "O gerenciador de arquivo exibirá o ícone GitHub, você pode clicar para verificar a diferença entre arquivos.Essas diferenças podem ser efetivadas e enviadas ao diretório remoto do GitHub ou clonado para pasta local, para sincronizar seus arquivos.",
|
||||
"If you want..." => "Se quiser configurar novo caminho raiz, pode ser feito na tela de configurações."
|
||||
),
|
||||
|
||||
"github" =>
|
||||
array(
|
||||
"Sorry, you do..." => "Desculpe, o OpenSSL não foi encontrado, https indisponível. Isso é necessário para o GitHub transferir dados, verificar php.ini, reinicie o sistema e tente novamente"
|
||||
),
|
||||
|
||||
"headers" =>
|
||||
array(
|
||||
"Bad CSRF token..." => "Erro na chave CSRF. Reportar em https://github.com/mattpass/ICEcoder para ser corrigido."
|
||||
),
|
||||
|
||||
"help" =>
|
||||
array(
|
||||
"shortcuts" => "atalhos",
|
||||
"Within document" => "Neste documento",
|
||||
"On Tabs" => "Em abas",
|
||||
"Within file manager" => "No gerenciador de arquivos",
|
||||
"Anywhere" => "Qualquer Lugar",
|
||||
"Space" => "Espaço",
|
||||
"Click" => "Clique",
|
||||
"or" => "ou",
|
||||
"Left click" => "Clique esquerdo",
|
||||
"Middle click" => "Clique Meio",
|
||||
"Double click tap..." => "Clique duplo / toque (mobile)",
|
||||
"Right click" => "Clique direito",
|
||||
"Middle scrollwheel" => "Meio scroll",
|
||||
"Drag" => "Arrastar",
|
||||
"Autocomplete add snippet" => "Auto-completar / adicionar snippet",
|
||||
"Multiple select" => "Multipla seleção",
|
||||
"Move line up" => "Move linha acima",
|
||||
"Move line down" => "Move linha abaixo",
|
||||
"Duplicate lines" => "Duplicar linha(s)",
|
||||
"Remove lines" => "Remover linha(s)",
|
||||
"Insert line before" => "Inserir linha antes",
|
||||
"Insert line after" => "Inserir linha após",
|
||||
"Search for selected" => "Procurar selecionado",
|
||||
"Jump to definition" => "Ir para definição / voltar",
|
||||
"Comment uncomment" => "Commentar / descomentar",
|
||||
"Insert tab indent" => "Inserir aba / auto indent selected",
|
||||
"Insert more" => "Indentar +",
|
||||
"Insert less" => "Indentar -",
|
||||
"Wrap with div" => "Quabra com <div>",
|
||||
"Wrap with span" => "Quabra com <span>",
|
||||
"Wrap unwrap p" => "Quabra / desfaz com <p>",
|
||||
"Wrap unwrap a" => "Quabra / desfaz com <a>",
|
||||
"Wrap unwrap b" => "Quabra / desfaz com <b>",
|
||||
"Wrap unwrap i" => "Quabra / desfaz com <i>",
|
||||
"Wrap unwrap strong" => "Quabra / desfaz com <strong>",
|
||||
"Wrap unwrap em" => "Quabra / desfaz com <em>",
|
||||
"Wrap unwrap li" => "Quabra / desfaz com <li>",
|
||||
"Wrap unwrap h1..." => "Quabra / desfaz com <h1> - <h3>",
|
||||
"End line with..." => "Fim de linha com <br>",
|
||||
"Close tab" => "Fechar aba",
|
||||
"Select file folder" => "Selecionar arquivo / pasta",
|
||||
"Open file" => "Abrir arquivo",
|
||||
"Range select" => "Seleção",
|
||||
"Options for selected" => "Opções para seleção",
|
||||
"Delete selected" => "Excluir selecionado",
|
||||
"Next previous tab" => "Próxima aba / anterior",
|
||||
"Next tab" => "Próxima aba",
|
||||
"Previous tab" => "Aba anterior",
|
||||
"New tab" => "Nova aba",
|
||||
"Close current tab" => "Fechar aba atual",
|
||||
"Open file prompt" => "Abrir prompt de comando",
|
||||
"Find" => "Buscar",
|
||||
"Focus on Go..." => "Foco campo ir para linha",
|
||||
"Save" => "Salvar",
|
||||
"Save as" => "Salvar como...",
|
||||
"View webpage" => "Exibir página",
|
||||
"Contract expand file..." => "Contrair / expandir gerenciador de arquivos",
|
||||
"Fold unfold current..." => "Contrair / expandir linha atual",
|
||||
"Refocus on document" => "Foco no documento",
|
||||
"Cancel tasks" => "Cancelar tarefas"
|
||||
),
|
||||
|
||||
"ice-coder" =>
|
||||
array(
|
||||
"No text selected..." => "Sem texto selecionado para buscar",
|
||||
"all files" => "todos arquivos",
|
||||
"all filenames" => "todos nomes de arquivos",
|
||||
"selected files" => "arquivos selecionados",
|
||||
"selected filenames" => "nomes de arquivos selecionados",
|
||||
"Creating Folder" => "Criando pasta",
|
||||
"Sorry you can..." => "Deculpe, permitido abrir máx. 100 arquivos!",
|
||||
"Opening File" => "Abrindo arquivo",
|
||||
"Enter relative file..." => "Informe caminho relativo (prefixado por /) ou URL remota",
|
||||
"Getting" => "Selecionando",
|
||||
"Please enter the..." => "Informe novo nome para",
|
||||
"Renaming to" => "Renomeando para",
|
||||
"Moving to" => "Movendo para",
|
||||
"Deleting File" => "Excluindo arquivo",
|
||||
"Pasting File" => "Colando arquivo",
|
||||
"Sorry cannot paste..." => "Desculpe, não é possível colar em toda raiz",
|
||||
"Nothing to paste..." => "Nada para colar,copiar arquivo/pasta primeiro!",
|
||||
"and" => "e",
|
||||
"this document" => "este documento",
|
||||
"replace" => "substituir",
|
||||
"replace all" => "substituir tudo",
|
||||
"file" => "arquivo",
|
||||
"Replacing text in" => "Substituindo texto em",
|
||||
"Cancelled tasks" => "Tarefas canceladas",
|
||||
"Open previous files" => "Abrir arquivos anteriores?",
|
||||
"Please enter your..." => "Informe sua chave GitHub (chave pessoal ou par). Veja dica próximo à chave Github em Ajuda > Configurações para mais informações",
|
||||
"This will compare..." => "Esta ação irá comparar e exibir diferenças do seu repositório local. OK?",
|
||||
"Please note for..." => "Atenção: para atualizar corretamente, é necessário permissâo de escrita em todos os diretórios/arquivos do ICEcoder. \\n\\nSe por algum motivo necessite recuperar esta versão do ICEcoder, estará disponível na pasta /tmp.\\n\\nClique OK para prosseguir com a atualização, ou cancelar para visitar a página do ICEcoder na internet onde poderá baixar a atualização manualmente.",
|
||||
"You can start..." => "Voce pode reportar um bug em Ajuda > Configurações",
|
||||
"Error cannot find..." => "Erro: não é possível acessar caminho/arquivo de erros",
|
||||
"No new errors..." => "Nenhum erro encontrado",
|
||||
"You have made..." => "Voce fez alterações. Deseja realmente fechar sem salvar?",
|
||||
"Close all tabs" => "Fechar todas as abas?",
|
||||
"results" => "resultados"
|
||||
),
|
||||
|
||||
"login" =>
|
||||
array(
|
||||
"set password" => "altera senha",
|
||||
"login" => "login",
|
||||
"To disable registration..." => "Para desabilitar modo registro, acesse menu/configurações ou em lib/config___settings.php altere enableRegistration para false e recarregue esta página",
|
||||
"Registration mode enabled" => "Modo registro habilitado",
|
||||
"auto-check for updates" => "verificar atualizações auto.",
|
||||
"To put into..." => "Para habilitar multi-usuários, acesse menu/configurações ou em lib/config___settings.php altere multiUser para true e recarregue esta página",
|
||||
"multi-user" => "multi-usuários"
|
||||
),
|
||||
|
||||
"multiple-results" =>
|
||||
array(
|
||||
"rename all" => "renomear tudo",
|
||||
"replace all" => "substituir tudo",
|
||||
"document" => "documento",
|
||||
"Found" => "Encontrado",
|
||||
"times" => "vezes",
|
||||
"replace" => "substituir",
|
||||
"file folder" => "arquivo/pasta",
|
||||
"rename to" => "renomear para",
|
||||
"rename" => "renomear",
|
||||
"file" => "arquivo",
|
||||
"No matches found" => "Nenhum resultado encontrado",
|
||||
"selected" => "selecionado",
|
||||
"found in" => "encontrado em",
|
||||
"Replaced" => "Substituído(s)"
|
||||
),
|
||||
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder deve ser reiniciado para habilitar plugin. Deseja Reiniciar?",
|
||||
"saving plugins" => "salvando plugins...",
|
||||
"Cannot update config..." => "Não foi possível atualizar arquivo de configuração. Verifique permissões de escrita.",
|
||||
"and try again" => "e tente novamente",
|
||||
"couldnt delete dir" => "não foi possível excluir pasta",
|
||||
"couldnt delete file" => "não foi possível excluir arquivo",
|
||||
"plugins" => "plugins",
|
||||
"Guide to writing..." => "Guia para criar plugins",
|
||||
"Manage Installed" => "Gerenciar plugins",
|
||||
"URL" => "URL",
|
||||
"Target" => "Alvo",
|
||||
"Timer" => "Temporizador",
|
||||
"Update" => "Atualizar",
|
||||
"Install" => "Instalar",
|
||||
"Uninstall" => "Desinstalar",
|
||||
"Reload after install..." => "Atualização necessária após instalação"
|
||||
),
|
||||
|
||||
"properties" =>
|
||||
array(
|
||||
"properties" => "propriedades",
|
||||
"Size" => "Tamanho",
|
||||
"Modified" => "Modificado",
|
||||
"Last access" => "Último acesso",
|
||||
"Type" => "Tipo",
|
||||
"Readable Writeable" => "Leitura / Escrita",
|
||||
"Relative path" => "Caminho relativo",
|
||||
"Absolute path" => "Caminho absoluto",
|
||||
"Contains" => "Contem",
|
||||
"Permissions" => "Permissões",
|
||||
"Owner" => "Proprietário",
|
||||
"Group" => "Grupo",
|
||||
"Public" => "Público",
|
||||
"Read" => "Ler",
|
||||
"Write" => "Salvar",
|
||||
"Execute" => "Executar",
|
||||
"Change to" => "Alterar para",
|
||||
"update" => "atualizar"
|
||||
),
|
||||
|
||||
"settings-common" =>
|
||||
array(
|
||||
"Your document does..." => "Seu arquivo não está no formato UTF-8, deve ser convertido"
|
||||
),
|
||||
|
||||
"settings-save-current-files" =>
|
||||
array(
|
||||
"Cannot update config..." => "Não foi possível atualizar arquivo de configuração. Verifique permissões de acesso (públicas)",
|
||||
"and try again" => "e tente novamente"
|
||||
),
|
||||
|
||||
"settings-screen" =>
|
||||
array(
|
||||
"settings" => "configurações",
|
||||
"version" => "versão",
|
||||
"website" => "website",
|
||||
"git" => "git",
|
||||
"codemirror dir" => "pasta codemirror",
|
||||
"codemirror version" => "versão codemirror",
|
||||
"file manager root" => "Raiz gerenciador de arquivos",
|
||||
"Free to use..." => "Livre para utilização para seus propósitos, comercial ou não, mas aviseme sobre sua implementação se puder. :)<br><br>Sem garantias, Muitas empresas e pessoas fantásticas contribuiram para desenvolver o ICEcoder, há muito o que agradecermos aqui. Veja a lista completa aqui",
|
||||
"functionality" => "funcionalidade",
|
||||
"check for updates..." => "verificar atualizações ao iniciar",
|
||||
"auto open last..." => "carregar últimos arquvos abertos ao iniciar",
|
||||
"when finding in..." => "ao buscar arquivos, excluir",
|
||||
"assisting" => "assistindo",
|
||||
"code assist" => "Assist. de cód.",
|
||||
"visible tabs" => "Abas visíveis",
|
||||
"locked nav" => "Trava Nav.",
|
||||
"tag wrapper command" => "comando de quebra",
|
||||
"auto-complete on" => "hab. auto-completar",
|
||||
"security" => "segurança",
|
||||
"new password" => "nova senha",
|
||||
"8 chars min" => "mín. 8 carac.",
|
||||
"confirm password" => "confirmar senha",
|
||||
"banned files/folders" => "arquivos/pastas bloqueados",
|
||||
"banned paths" => "caminhos bloqueados",
|
||||
"ip addresses" => "endereços IP",
|
||||
"Slash prefixed comma..." => "Prefixo barra, separado por vígula",
|
||||
"Comma delimited" => "Separado por vírgula",
|
||||
"style" => "estilo",
|
||||
"theme" => "tema",
|
||||
"line wrapping" => "quebra de linha",
|
||||
"indent type" => "indent type",
|
||||
"indent size" => "indent size",
|
||||
"font size" => "tam. fonte",
|
||||
"auto indent" => "auto indent",
|
||||
"layout" => "layout",
|
||||
"plugin panel aligned" => "painel plugin alinhado",
|
||||
"file manager" => "gerenciador de arquivos",
|
||||
"root" => "raiz",
|
||||
"Slash prefixed" => "Prefixo barra",
|
||||
"bug reporting" => "reportar erro",
|
||||
"check in files" => "verificar em arquivos",
|
||||
"every" => "tudo",
|
||||
"secs getting last" => "segs, pegando últimos",
|
||||
"lines" => "linhas",
|
||||
"multi-user" => "multi-usuário",
|
||||
"Make sure you..." => "Cuidado para nâo travar seu usuário",
|
||||
"Registration" => "Cadastro",
|
||||
"auth token" => "Chave de Autenticação",
|
||||
"Required to get..." => "RNecessário para verificar diferenças, e efetivar alterações no GitHub. Se não tiver uma pode usar:".PHP_EOL.PHP_EOL.
|
||||
"- chave de acesso pessoal (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or".PHP_EOL.
|
||||
"- cliente/par secreto (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
|
||||
"Não é recomendado configurar sua chave aqui, mas quando solicitado pelo ICEcoderpara mantes em sessão apenas.".PHP_EOL.PHP_EOL.
|
||||
"No entanto, se trabalhar em ambiente seguro, é melhor setar essa propriedade.",
|
||||
"Sorry cannot commit..." => "Desculpe, não é permitido efetivar atulização no modo DEMO",
|
||||
"update" => "atualizar"
|
||||
),
|
||||
|
||||
"settings-update" =>
|
||||
array(
|
||||
"Cannot update config..." => "Não foi possível atualizar arquivo de configuração. Verifique permissões de acesso (públicas)",
|
||||
"and try again" => "e tentar novamente",
|
||||
"and press refresh" => "e pressione atulizar"
|
||||
),
|
||||
|
||||
"updater" =>
|
||||
array(
|
||||
"Update appears to..." => "Atualização completada"
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
436
lang/spanish.php
Normal file
436
lang/spanish.php
Normal file
@@ -0,0 +1,436 @@
|
||||
<?php
|
||||
// Spanish language translation
|
||||
// by: @unix4you2 (GitHub)
|
||||
|
||||
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &). Translations on right side.
|
||||
|
||||
$text = array(
|
||||
|
||||
// / [ROOT LEVEL]
|
||||
|
||||
"editor" =>
|
||||
array(
|
||||
"Click icons for..." => "<b>Clic en los iconos<br>para ayuda &<br>modo de uso</b>",
|
||||
"server" => "servidor",
|
||||
"Server name, OS..." => "Nombre del servidor, OS & IP:",
|
||||
"Root" => "Raiz:",
|
||||
"ICEcoder root" => "Raiz de ICEcoder:",
|
||||
"PHP version" => "Versión PHP:",
|
||||
"Date & time" => "Fecha y hora:",
|
||||
"your device" => "su dispositivo",
|
||||
"Browser" => "Navegador:",
|
||||
"Your IP" => "Su IP:",
|
||||
"files" => "archivos",
|
||||
"Last 10 files..." => "Ultimos 10 archivos abiertos:",
|
||||
"none" => "[ninguno]",
|
||||
"test suite" => "modo de pruebas",
|
||||
"Run unit tests" => "Ejecutar tests unitarios",
|
||||
"dev mode" => "modo desarrollo",
|
||||
"Status" => "Estado",
|
||||
"Using" => "Usando",
|
||||
"You can switch..." => "Usted puede cambiar el modo de desarrollo cambiando su valor on/off en lib/config__settings.php"
|
||||
|
||||
),
|
||||
|
||||
"files" =>
|
||||
array(
|
||||
"Lock" => "Bloquear",
|
||||
"Refresh" => "Actualizar",
|
||||
"ROOT" => "[RAIZ]"
|
||||
|
||||
),
|
||||
|
||||
"index" =>
|
||||
array(
|
||||
"UPDATE INFO" => "INFORMACION DE ACTUALIZACION",
|
||||
"now available" => "ahora disponible",
|
||||
"Your version is" => "Su versión es",
|
||||
"Update now" => "Actualizar ahora",
|
||||
"You have some..." => "Usted tiene cambios sin guardar",
|
||||
"Are you sure you want to close?" => "Are you sure you want to close?",
|
||||
"working" => "trabajando",
|
||||
"Color picker" => "Selector de color",
|
||||
"New File" => "Nuevo archivo",
|
||||
"New Folder" => "Nueva carpeta",
|
||||
"Upload File(s)" => "Cargar archivo(s)",
|
||||
"Paste" => "Pegar",
|
||||
"Open" => "Abrir",
|
||||
"Copy" => "Copiar",
|
||||
"Duplicate" => "Duplicar",
|
||||
"Delete" => "Eliminar",
|
||||
"Rename" => "Renombrar",
|
||||
"View Webpage" => "Ver página web",
|
||||
"Download" => "Descargar",
|
||||
"Properties" => "Propiedades",
|
||||
"File" => "Archivo",
|
||||
"Edit" => "Editar",
|
||||
"Source" => "Fuente",
|
||||
"Help" => "Ayuda",
|
||||
"Save" => "Guardar",
|
||||
"Save As" => "Guardar como",
|
||||
"Live Preview" => "Vista previa",
|
||||
"Upload" => "Cargar",
|
||||
"Zip" => "Comprimir",
|
||||
"Print" => "Imprimir",
|
||||
"Fullscreen toggle" => "Cambiar a pantalla completa",
|
||||
"Logout" => "Salir",
|
||||
"Undo" => "Deshacer",
|
||||
"Redo" => "Rehacer",
|
||||
"Indent more" => "Aumentar sangría",
|
||||
"Indent less" => "Disminuir sangría",
|
||||
"Autocomplete" => "Autocompletar",
|
||||
"Comment/Uncomment" => "Comentar/Descomentar",
|
||||
"Jump to Definition" => "Saltar a la definición",
|
||||
"Manual" => "Manual",
|
||||
"Shortcuts" => "Accesos directos",
|
||||
"Settings" => "Configuración",
|
||||
"Search for selected" => "Buscar por lo seleccionado",
|
||||
"website" => "sitio web",
|
||||
"Close all tabs" => "Cerrar todas las pestañas",
|
||||
"Alphabetize tabs" => "Ordenar pestañas",
|
||||
"Find" => "Buscar",
|
||||
"in" => "en",
|
||||
"and" => "y",
|
||||
"replace" => "reemplazar",
|
||||
"replace all" => "reemplazar todo",
|
||||
"this document" => "este documento",
|
||||
"open documents" => "abrir documentos",
|
||||
"all files" => "todos los archivos",
|
||||
"all filenames" => "todos los nombres de archivo",
|
||||
"Turn on/off..." => "Encender o apagar asistente de código",
|
||||
"Code Assist" => "Asistente de código",
|
||||
"Go to Line" => "Ir a la línea",
|
||||
"View" => "Ver",
|
||||
"Bug reporting not active" => "Reporte de Errores no activado"
|
||||
),
|
||||
|
||||
// /LIB
|
||||
|
||||
"bug-files-check" =>
|
||||
array(
|
||||
"Found in" => "Encontrado en:"
|
||||
),
|
||||
|
||||
"file-control" =>
|
||||
array(
|
||||
"Sorry" => "Lo siento",
|
||||
"does not seem..." => "parace no existir en el servidor",
|
||||
"Sorry, could not..." => "Lo siento, no puedo obtener el contenido de",
|
||||
"Sorry, cannot create..." => "Lo siento, no puedo crear carpeta en",
|
||||
"Sorry, cannot copy" => "Lo siento, no puedo copiar",
|
||||
"into" => "into",
|
||||
"Uploaded file(s) OK" => "Carga de archivo(s) OK",
|
||||
"Sorry, cannot upload" => "Lo siento, no se puede cargar",
|
||||
"Sorry, cannot upload..." => "Lo siento, no se puede cargar en modo demostración",
|
||||
"Sorry, cannot rename" => "Lo siento, no puedo renombrar",
|
||||
"Maybe public write..." => "Posiblemente sea necesario permisos publicos en esta carpeta o su carpeta padre?",
|
||||
"Sorry, cannot move" => "Lo siento, no puedo mover",
|
||||
"Sorry, cannot save" => "Lo siento, no puedo guardar",
|
||||
"Sorry, cannot replace..." => "Lo siento, no puedo reemplazar texto en",
|
||||
"Sorry, cannot change..." => "Lo siento, no puedo cambiar permisos sobre",
|
||||
"Sorry, cannot delete..." => "Lo siento, no puedo eliminar el nivel raiz",
|
||||
"Sorry, cannot delete" => "Lo siento, no puedo eliminar",
|
||||
"Sorry, this file..." => "Lo siento, este archivo ha cambiado, no puedo almacenar",
|
||||
"Reload this file..." => "Recargar este archivo y copiar su version en un panel diferente?",
|
||||
"There was a..." => "Hay un problema técnico, como algo que todavía parece no estar listo. ICEcoder volvió a cargar su archivo de control nuevamente.",
|
||||
"displayed at" => "Mostrado en",
|
||||
"Enter filename to..." => "Ingrese el nombre de archivo para guardar",
|
||||
"That file exists..." => "Ese archivo ya existeThat, sobreescribir?",
|
||||
"Saving" => "Guardando"
|
||||
),
|
||||
|
||||
"get-branch" =>
|
||||
array(
|
||||
"There are no..." => "No hay diferencias entre el repositorio local y GitHub. Regresar al modo regular?",
|
||||
"Sorry, there was..." => "Lo siento, hay un error, código:",
|
||||
"Your local folder..." => "Su carpeta local está vacía, desea clonarla"
|
||||
),
|
||||
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Lo siento, no puedo crear un archivo en",
|
||||
"Cannot update config..." => "No puedo actualizar el archivo de configuración. Por favor establezca permisos publicos para",
|
||||
"and try again" => "e intente nuevamente",
|
||||
"saving github paths" => "almacenando rutas de GitHub...",
|
||||
"github paths" => "Rutas de GitHub",
|
||||
"Choose existing path" => "Seleccionar una ruta existente",
|
||||
"Local path" => "Ruta local",
|
||||
"Remote GitHub path" => "Ruta remota GitHub",
|
||||
"Choose" => "Seleccionar",
|
||||
"Set local and..." => "Establecer las rutas locales y remotas en blanco para removerlas",
|
||||
"Update" => "Actualizar",
|
||||
"Add new path" => "Agregar nueva ruta",
|
||||
"Add" => "Agregar",
|
||||
"Usage Info" => "Modo de uso:",
|
||||
"Enter relative local..." => "Ingrese las rutas locales relativas (ej /server/myfiles) y las rutas absolutas para GitHub (ej https://github.com/user/repo ó https://github.com/user/repo/tree/branch para indicar ramas), según los ejemplos. Con esto usted establece las rutas de fuentes para ambas ubicaciones, como un par.",
|
||||
"You can then..." => "Entonces usted podrá seleccionar un par y este se convertira en su nueva raiz de trabajo en ICEcoder.",
|
||||
"The file manager..." => "Entonces el administrador de archivos muestra un nuevo icono para GitHub, el cual usted puede usar para ver y verificar diferencias entre las dos rutas. Esas diferencias pueden ser convertidas a un commit y enviadas a la ruta remota en GitHub o clonadas en su ruta local, para sincronizar sus archivos.",
|
||||
"If you want..." => "Si lo desea puede crear una nueva ruta raíz por medio de la pantalla de Configuración."
|
||||
),
|
||||
|
||||
"github" =>
|
||||
array(
|
||||
"Sorry, you do..." => "Lo siento, usted no parece contar con OpenSSL cargado en su instancia de PHP, por lo tanto conexiones https no están disponibles. Esto es requerido para la transferencia de datos a GitHub, por favor ajuste su php.ini, reinicie su servidor web e intente nuevamente"
|
||||
),
|
||||
|
||||
"headers" =>
|
||||
array(
|
||||
"Bad CSRF token..." => "Token CSRF incorrecto. Por favor reporte este error en https://github.com/mattpass/ICEcoder para que pueda ser solucionado."
|
||||
),
|
||||
|
||||
"help" =>
|
||||
array(
|
||||
"shortcuts" => "accesos directos",
|
||||
"Within document" => "En los documentos",
|
||||
"On Tabs" => "En las fichas",
|
||||
"Within file manager" => "En el administrador de archivos",
|
||||
"Anywhere" => "Cualquier parte",
|
||||
"Space" => "Espacio",
|
||||
"Click" => "Click",
|
||||
"or" => "o",
|
||||
"Left click" => "Click izquierdo",
|
||||
"Middle click" => "Click central",
|
||||
"Double click tap..." => "Doble click / tap (móviles)",
|
||||
"Right click" => "Click derecho",
|
||||
"Middle scrollwheel" => "Rueda del ratón",
|
||||
"Drag" => "Arrastrar",
|
||||
"Autocomplete add snippet" => "Autocompletar / agregar fragmento",
|
||||
"Multiple select" => "Selección múltiple",
|
||||
"Move line up" => "Mover línea arriba",
|
||||
"Move line down" => "Mover línea abajo",
|
||||
"Duplicate lines" => "Duplicar linea(s)",
|
||||
"Remove lines" => "Remover linea(s)",
|
||||
"Insert line before" => "Insertar linea antes",
|
||||
"Insert line after" => "Insertar linea después",
|
||||
"Search for selected" => "Buscar lo seleccionado",
|
||||
"Jump to definition" => "Saltar a definición / saltar atrás",
|
||||
"Comment uncomment" => "Comentar / descomentar",
|
||||
"Insert tab indent" => "Insertar ficha / auto sangría seleccionado",
|
||||
"Insert more" => "Aumentar sangría",
|
||||
"Insert less" => "Disminuir sangría",
|
||||
"Wrap with div" => "Envolver con <div>",
|
||||
"Wrap with span" => "Envolver con <span>",
|
||||
"Wrap unwrap p" => "Envolver / Desenvolver con <p>",
|
||||
"Wrap unwrap a" => "Envolver / Desenvolver con <a>",
|
||||
"Wrap unwrap b" => "Envolver / Desenvolver con <b>",
|
||||
"Wrap unwrap i" => "Envolver / Desenvolver con <i>",
|
||||
"Wrap unwrap strong" => "Envolver / Desenvolver con <strong>",
|
||||
"Wrap unwrap em" => "Envolver / Desenvolver con <em>",
|
||||
"Wrap unwrap li" => "Envolver / Desenvolver con <li>",
|
||||
"Wrap unwrap h1..." => "Envolver / Desenvolver con <h1> - <h3>",
|
||||
"End line with..." => "Terminar línea con <br>",
|
||||
"Close tab" => "Cerrar ficha",
|
||||
"Select file folder" => "Seleccionar archivo / carpeta",
|
||||
"Open file" => "Abrir archivo",
|
||||
"Range select" => "Seleccionar rango",
|
||||
"Options for selected" => "Opciones para lo seleccionado",
|
||||
"Delete selected" => "Eliminar seleccionados",
|
||||
"Next previous tab" => "Ficha siguiente / previa",
|
||||
"Next tab" => "Ficha siguiente",
|
||||
"Previous tab" => "Ficha previa",
|
||||
"New tab" => "Nueva ficha",
|
||||
"Close current tab" => "Cerrar ficha actual",
|
||||
"Open file prompt" => "Línea de apertura de archivos",
|
||||
"Find" => "Buscar",
|
||||
"Focus on Go..." => "Obtener foco en la opción Ir a Linea",
|
||||
"Save" => "Guardar",
|
||||
"Save as" => "Guardar como...",
|
||||
"View webpage" => "Ver pagina web",
|
||||
"Contract expand file..." => "Contraer / expandir administrador de archivos",
|
||||
"Fold unfold current..." => "Contraer / expandir línea actual",
|
||||
"Refocus on document" => "Reasignar foco al documento",
|
||||
"Cancel tasks" => "Cancelar tareas"
|
||||
),
|
||||
|
||||
"ice-coder" =>
|
||||
array(
|
||||
"No text selected..." => "No hay texto seleccionado para buscar",
|
||||
"all files" => "todos los archivos",
|
||||
"all filenames" => "todos los nombres de archivo",
|
||||
"selected files" => "archivos seleccionados",
|
||||
"selected filenames" => "nombres de archivos seleccionados",
|
||||
"Creating Folder" => "Creando Carpeta",
|
||||
"Sorry you can..." => "Lo siento, usted sólo puede tener 100 archivos abiertos al tiempo!",
|
||||
"Opening File" => "Abriendo archivo",
|
||||
"Enter relative file..." => "Entre una ruta relativa (iniciando con /) o una URL remota",
|
||||
"Getting" => "Obteniendo",
|
||||
"Please enter the..." => "Por favor ingrese el nuevo nombre para",
|
||||
"Renaming to" => "Renombrando a",
|
||||
"Moving to" => "Moviendo a",
|
||||
"Deleting File" => "Eliminando Archivo",
|
||||
"Pasting File" => "Copiando Archivo",
|
||||
"Sorry cannot paste..." => "Lo siento, no puedo pegar toda una raíz",
|
||||
"Nothing to paste..." => "Nada para pegar, copie un archivo/carpeta primero!",
|
||||
"and" => "y",
|
||||
"this document" => "este documento",
|
||||
"replace" => "reemplazar",
|
||||
"replace all" => "reemplazar todo",
|
||||
"file" => "archivo",
|
||||
"Replacing text in" => "Reemplazando texto en",
|
||||
"Cancelled tasks" => "Tareas canceladas",
|
||||
"Open previous files" => "Abrir archivos previos?",
|
||||
"Please enter your..." => "Por favor entre su token de GitHub (para acceso personal). Ver ayuda cerca al Token de autenticación de Github en la ayuda > Vea pantalla de configuración para más información",
|
||||
"This will compare..." => "Esto compara y muestra las diferencias entre su ruta local y el repositorio. OK?",
|
||||
"Please note for..." => "Importante: para que la actualización trabaje correctamente, usted necesita tener derechos de acceso a todos los directorios y archivos de ICEcoder. Esto sera chequeado previamente y se presentara una lista de archivos sin acceso (por lo tanto no movibles).\\n\\nSi usted necesita restablecer esta version de ICEcoder por alguna razón, usted la encontrara en la carpeta /tmp.\\n\\nClick en OK para proceder con la verificación y auto-instalación, ó cancelar para visitar el sitio de ICEcoder para descargar el ZIP y hacerlo manualmente.",
|
||||
"You can start..." => "Usted puede iniciar el reporte de errores en la pantalla de Ayuda > Configuración",
|
||||
"Error cannot find..." => "Error: no puedo encontrar o accesar las rutas de archivos de error",
|
||||
"No new errors..." => "No fueron encontrados nuevos errores",
|
||||
"You have made..." => "Usted ha realizado cambios. Esta seguro que quiere cerrar sin guardar?",
|
||||
"Close all tabs" => "Cerrar todas las fichas?",
|
||||
"results" => "resultados"
|
||||
),
|
||||
|
||||
"login" =>
|
||||
array(
|
||||
"set password" => "establecer clave",
|
||||
"login" => "ingreso",
|
||||
"To disable registration..." => "Para deshabilitar el modo de registro, vaya a la opción de Configuración or abra el archivo lib/config___settings.php y cambie enableRegistration a false y recargue la página",
|
||||
"Registration mode enabled" => "Modo de registro activado",
|
||||
"auto-check for updates" => "auto-buscar por actualizaciones",
|
||||
"To put into..." => "Para usar el modo multiusuario, vaya a la opcion de Configuración o abra el archivo lib/config___settings.php y cambie multiUser a true y recargue la página",
|
||||
"multi-user" => "multi-usuario"
|
||||
),
|
||||
|
||||
"multiple-results" =>
|
||||
array(
|
||||
"rename all" => "renombrar todo",
|
||||
"replace all" => "reemplazar todo",
|
||||
"document" => "documento",
|
||||
"Found" => "Encontrado",
|
||||
"times" => "veces",
|
||||
"replace" => "reemplazar",
|
||||
"file folder" => "archivo/carpeta",
|
||||
"rename to" => "renombrar a",
|
||||
"rename" => "renombrar",
|
||||
"file" => "archivo",
|
||||
"No matches found" => "No se encontraron coincidencias",
|
||||
"selected" => "seleccionado",
|
||||
"found in" => "encontrado en",
|
||||
"Replaced" => "Reemplezado"
|
||||
),
|
||||
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder necesita recargar para activar este plugin. Recargar ahora?",
|
||||
"saving plugins" => "guardando plugins...",
|
||||
"Cannot update config..." => "No puedo actualizar el archivo de configuración. Por favor establezca permisos publicos sobre",
|
||||
"and try again" => "e intente de nuevo",
|
||||
"couldnt delete dir" => "no puedo borrar el directorio",
|
||||
"couldnt delete file" => "no puedo borrar el archivo",
|
||||
"plugins" => "plugins",
|
||||
"Guide to writing..." => "Guia para escribir plugins",
|
||||
"Manage Installed" => "Administrador instalado",
|
||||
"URL" => "URL",
|
||||
"Target" => "Objetivo",
|
||||
"Timer" => "Temporizador",
|
||||
"Update" => "Actualizar",
|
||||
"Install" => "Instalar",
|
||||
"Uninstall" => "Desinstalar",
|
||||
"Reload after install..." => "Se requiere recargar después de instalar"
|
||||
),
|
||||
|
||||
"properties" =>
|
||||
array(
|
||||
"properties" => "propiedades",
|
||||
"Size" => "Tamaño",
|
||||
"Modified" => "Modificado",
|
||||
"Last access" => "Ultimo acceso",
|
||||
"Type" => "Tipo",
|
||||
"Readable Writeable" => "Leible / Escribible",
|
||||
"Relative path" => "Ruta relativa",
|
||||
"Absolute path" => "Ruta absoluta",
|
||||
"Contains" => "Contiene",
|
||||
"Permissions" => "Permisos",
|
||||
"Owner" => "Propietario",
|
||||
"Group" => "Grupo",
|
||||
"Public" => "Publico",
|
||||
"Read" => "Leer",
|
||||
"Write" => "Escribir",
|
||||
"Execute" => "Ejecutar",
|
||||
"Change to" => "Cambiar a",
|
||||
"update" => "actualizar"
|
||||
),
|
||||
|
||||
"settings-common" =>
|
||||
array(
|
||||
"Your document does..." => "Su documento no parece estar en UTF-8 entonces se ha convertido"
|
||||
),
|
||||
|
||||
"settings-save-current-files" =>
|
||||
array(
|
||||
"Cannot update config..." => "No puedo actualizar el archivo de configuracion. Por favor establezca permisos publicos sobre",
|
||||
"and try again" => "e intente de nuevo"
|
||||
),
|
||||
|
||||
"settings-screen" =>
|
||||
array(
|
||||
"settings" => "configuraciones",
|
||||
"version" => "version",
|
||||
"website" => "sitio web",
|
||||
"git" => "git",
|
||||
"codemirror dir" => "directorio codemirror",
|
||||
"codemirror version" => "version codemirror",
|
||||
"file manager root" => "administrador de archivos raiz",
|
||||
"Free to use..." => "Libre para usarlo para cualquier propósito, comercial o no, solo dejeme saber cualquier uso o mejora. :)<br><br>No se da garantia de ningun tipo, su uso se encuentra bajo su responsabilidad.<br><br>Muchas personas y compañías han ayudado a construir ICEcoder por lo que les damos las gracias. Por favor vea la lista completa en",
|
||||
"functionality" => "funcionalidad",
|
||||
"check for updates..." => "verificar por actualizaciones en la carga",
|
||||
"auto open last..." => "auto cargar los ultimos archivos al ingresar",
|
||||
"when finding in..." => "excluir cuando se busca en archivos ",
|
||||
"assisting" => "asistir",
|
||||
"code assist" => "asistencia de código",
|
||||
"visible tabs" => "Fichas visibles",
|
||||
"locked nav" => "Navegacion bloqueada",
|
||||
"tag wrapper command" => "Comando envuelto",
|
||||
"auto-complete on" => "auto-completar encendido",
|
||||
"security" => "seguridad",
|
||||
"new password" => "nueva clave",
|
||||
"8 chars min" => "8 caracteres min",
|
||||
"confirm password" => "confirmar clave",
|
||||
"banned files/folders" => "archivos/carpetas prohibidos",
|
||||
"banned paths" => "rutas prohibidas",
|
||||
"ip addresses" => "direcciones ip",
|
||||
"Slash prefixed comma..." => "Prefijo slash, delimitado por comas",
|
||||
"Comma delimited" => "Delimitado por comas",
|
||||
"style" => "estilo",
|
||||
"theme" => "tema",
|
||||
"line wrapping" => "ajuste de línea",
|
||||
"indent type" => "tipode sangría",
|
||||
"indent size" => "Tamaño de sangría",
|
||||
"font size" => "tamaño de letra",
|
||||
"layout" => "disposición",
|
||||
"plugin panel aligned" => "alineacion del panel de plugins",
|
||||
"file manager" => "administrador de archivos",
|
||||
"root" => "raiz",
|
||||
"Slash prefixed" => "Prefijo Slash",
|
||||
"bug reporting" => "reporte de errores",
|
||||
"check in files" => "chequear en archivos",
|
||||
"every" => "cada",
|
||||
"secs getting last" => "seg, obteniendo últimas",
|
||||
"lines" => "lineas",
|
||||
"multi-user" => "multi-usuario",
|
||||
"Make sure you..." => "Este seguro de no bloquearse a sí mismo",
|
||||
"Registration" => "Registro",
|
||||
"auth token" => "token autenticación",
|
||||
"Required to get..." => "Requerido para obtener diferencias, enviar cambios a repos GitHub, etc. Si usted no tiene uno, usted puede usar un:".PHP_EOL.PHP_EOL.
|
||||
"- token personal de acceso (https://help.github.com/articles/creating-an-access-token-for-command-line-use), ó".PHP_EOL.
|
||||
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
|
||||
"Esto no es recomendado para establecer su token pues es mas seguro ingresarlo cuando sea solicitado por ICEcoder y así permenecerá en la sesión activa unicamente.".PHP_EOL.PHP_EOL.
|
||||
"De todas formas, si usted trabaj en un ambiente seguro, es más eficiente establecer esto aquí.",
|
||||
"Sorry cannot commit..." => "Lo siento, no puedo enviar configuraciones en modo demo",
|
||||
"update" => "actualizar"
|
||||
),
|
||||
|
||||
"settings-update" =>
|
||||
array(
|
||||
"Cannot update config..." => "No puedo actualizar archivo de configuración. Establezca permisos publicos sobre",
|
||||
"and try again" => "e intente de nuevo",
|
||||
"and press refresh" => "y presione actualizar"
|
||||
),
|
||||
|
||||
"updater" =>
|
||||
array(
|
||||
"Update appears to..." => "La actualización parece haber sido satisfactoria"
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -15,7 +15,7 @@ for ($i=0; $i<count($files); $i++) {
|
||||
// Work out the real path for a file
|
||||
$files[$i] = realpath($_SERVER['DOCUMENT_ROOT'].$files[$i]);
|
||||
// If we can't find that file or it doesn't start with the doc root, it's an error
|
||||
if (!file_exists($files[$i]) || strpos($files[$i],$_SERVER['DOCUMENT_ROOT']) !== 0) {
|
||||
if (!file_exists($files[$i]) || strpos(str_replace("\\","/",$files[$i]),$_SERVER['DOCUMENT_ROOT']) !== 0) {
|
||||
$result = "error";
|
||||
} else {
|
||||
$filesSizesSeen[$i] = filesize($files[$i]);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
// ICEcoder system settings
|
||||
$ICEcoderSettings = array(
|
||||
"versionNo" => "4.2",
|
||||
"codeMirrorDir" => "CodeMirror-4.2",
|
||||
"docRoot" => $_SERVER['DOCUMENT_ROOT'],
|
||||
"demoMode" => false,
|
||||
"devMode" => false,
|
||||
"loginRequired" => true,
|
||||
"multiUser" => false,
|
||||
"lineEnding" => "\n",
|
||||
"enableRegistration" => true
|
||||
);
|
||||
?>
|
||||
@@ -1,15 +1,20 @@
|
||||
<?php
|
||||
$ICEcoderUserSettings = array(
|
||||
"versionNo" => "4.2",
|
||||
"versionNo" => "5.0",
|
||||
"licenseEmail" => "",
|
||||
"licenseCode" => "",
|
||||
"configCreateDate" => 0,
|
||||
"root" => "",
|
||||
"checkUpdates" => true,
|
||||
"openLastFiles" => true,
|
||||
"updateDiffOnSave" => true,
|
||||
"languageUser" => "english.php",
|
||||
"findFilesExclude" => array(".doc",".gif",".jpg",".jpeg",".pdf",".png",".swf",".xml",".zip"),
|
||||
"codeAssist" => true,
|
||||
"visibleTabs" => false,
|
||||
"lockedNav" => true,
|
||||
"tagWrapperCommand" => "ctrl+alt",
|
||||
"autoComplete" => "ctrl+space",
|
||||
"autoComplete" => "keypress",
|
||||
"password" => "",
|
||||
"bannedFiles" => array(),
|
||||
"bannedPaths" => array("/var/www/.git","/var/www/sites/all/modules","/var/www/sites/default/files"),
|
||||
@@ -18,6 +23,7 @@ $ICEcoderUserSettings = array(
|
||||
"fontSize" => "13px",
|
||||
"lineWrapping" => true,
|
||||
"indentWithTabs" => true,
|
||||
"indentAuto" => true,
|
||||
"indentSize" => 4,
|
||||
"pluginPanelAligned" => "left",
|
||||
"bugFilePaths" => array(),
|
||||
|
||||
412
lib/difflib.js
Normal file
412
lib/difflib.js
Normal file
@@ -0,0 +1,412 @@
|
||||
/***
|
||||
This is part of jsdifflib v1.0. <http://snowtide.com/jsdifflib>
|
||||
|
||||
Copyright (c) 2007, Snowtide Informatics Systems, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the Snowtide Informatics Systems nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
***/
|
||||
/* Author: Chas Emerick <cemerick@snowtide.com> */
|
||||
var __whitespace = {" ":true, "\t":true, "\n":true, "\f":true, "\r":true};
|
||||
|
||||
var difflib = {
|
||||
defaultJunkFunction: function (c) {
|
||||
return __whitespace.hasOwnProperty(c);
|
||||
},
|
||||
|
||||
stripLinebreaks: function (str) { return str.replace(/^[\n\r]*|[\n\r]*$/g, ""); },
|
||||
|
||||
stringAsLines: function (str) {
|
||||
var lfpos = str.indexOf("\n");
|
||||
var crpos = str.indexOf("\r");
|
||||
var linebreak = ((lfpos > -1 && crpos > -1) || crpos < 0) ? "\n" : "\r";
|
||||
|
||||
var lines = str.split(linebreak);
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
lines[i] = difflib.stripLinebreaks(lines[i]);
|
||||
}
|
||||
|
||||
return lines;
|
||||
},
|
||||
|
||||
// iteration-based reduce implementation
|
||||
__reduce: function (func, list, initial) {
|
||||
if (initial != null) {
|
||||
var value = initial;
|
||||
var idx = 0;
|
||||
} else if (list) {
|
||||
var value = list[0];
|
||||
var idx = 1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (; idx < list.length; idx++) {
|
||||
value = func(value, list[idx]);
|
||||
}
|
||||
|
||||
return value;
|
||||
},
|
||||
|
||||
// comparison function for sorting lists of numeric tuples
|
||||
__ntuplecomp: function (a, b) {
|
||||
var mlen = Math.max(a.length, b.length);
|
||||
for (var i = 0; i < mlen; i++) {
|
||||
if (a[i] < b[i]) return -1;
|
||||
if (a[i] > b[i]) return 1;
|
||||
}
|
||||
|
||||
return a.length == b.length ? 0 : (a.length < b.length ? -1 : 1);
|
||||
},
|
||||
|
||||
__calculate_ratio: function (matches, length) {
|
||||
return length ? 2.0 * matches / length : 1.0;
|
||||
},
|
||||
|
||||
// returns a function that returns true if a key passed to the returned function
|
||||
// is in the dict (js object) provided to this function; replaces being able to
|
||||
// carry around dict.has_key in python...
|
||||
__isindict: function (dict) {
|
||||
return function (key) { return dict.hasOwnProperty(key); };
|
||||
},
|
||||
|
||||
// replacement for python's dict.get function -- need easy default values
|
||||
__dictget: function (dict, key, defaultValue) {
|
||||
return dict.hasOwnProperty(key) ? dict[key] : defaultValue;
|
||||
},
|
||||
|
||||
SequenceMatcher: function (a, b, isjunk) {
|
||||
this.set_seqs = function (a, b) {
|
||||
this.set_seq1(a);
|
||||
this.set_seq2(b);
|
||||
}
|
||||
|
||||
this.set_seq1 = function (a) {
|
||||
if (a == this.a) return;
|
||||
this.a = a;
|
||||
this.matching_blocks = this.opcodes = null;
|
||||
}
|
||||
|
||||
this.set_seq2 = function (b) {
|
||||
if (b == this.b) return;
|
||||
this.b = b;
|
||||
this.matching_blocks = this.opcodes = this.fullbcount = null;
|
||||
this.__chain_b();
|
||||
}
|
||||
|
||||
this.__chain_b = function () {
|
||||
var b = this.b;
|
||||
var n = b.length;
|
||||
var b2j = this.b2j = {};
|
||||
var populardict = {};
|
||||
for (var i = 0; i < b.length; i++) {
|
||||
var elt = b[i];
|
||||
if (b2j.hasOwnProperty(elt)) {
|
||||
var indices = b2j[elt];
|
||||
if (n >= 200 && indices.length * 100 > n) {
|
||||
populardict[elt] = 1;
|
||||
delete b2j[elt];
|
||||
} else {
|
||||
indices.push(i);
|
||||
}
|
||||
} else {
|
||||
b2j[elt] = [i];
|
||||
}
|
||||
}
|
||||
|
||||
for (var elt in populardict) {
|
||||
if (populardict.hasOwnProperty(elt)) {
|
||||
delete b2j[elt];
|
||||
}
|
||||
}
|
||||
|
||||
var isjunk = this.isjunk;
|
||||
var junkdict = {};
|
||||
if (isjunk) {
|
||||
for (var elt in populardict) {
|
||||
if (populardict.hasOwnProperty(elt) && isjunk(elt)) {
|
||||
junkdict[elt] = 1;
|
||||
delete populardict[elt];
|
||||
}
|
||||
}
|
||||
for (var elt in b2j) {
|
||||
if (b2j.hasOwnProperty(elt) && isjunk(elt)) {
|
||||
junkdict[elt] = 1;
|
||||
delete b2j[elt];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.isbjunk = difflib.__isindict(junkdict);
|
||||
this.isbpopular = difflib.__isindict(populardict);
|
||||
}
|
||||
|
||||
this.find_longest_match = function (alo, ahi, blo, bhi) {
|
||||
var a = this.a;
|
||||
var b = this.b;
|
||||
var b2j = this.b2j;
|
||||
var isbjunk = this.isbjunk;
|
||||
var besti = alo;
|
||||
var bestj = blo;
|
||||
var bestsize = 0;
|
||||
var j = null;
|
||||
var k;
|
||||
|
||||
var j2len = {};
|
||||
var nothing = [];
|
||||
for (var i = alo; i < ahi; i++) {
|
||||
var newj2len = {};
|
||||
var jdict = difflib.__dictget(b2j, a[i], nothing);
|
||||
for (var jkey in jdict) {
|
||||
if (jdict.hasOwnProperty(jkey)) {
|
||||
j = jdict[jkey];
|
||||
if (j < blo) continue;
|
||||
if (j >= bhi) break;
|
||||
newj2len[j] = k = difflib.__dictget(j2len, j - 1, 0) + 1;
|
||||
if (k > bestsize) {
|
||||
besti = i - k + 1;
|
||||
bestj = j - k + 1;
|
||||
bestsize = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
j2len = newj2len;
|
||||
}
|
||||
|
||||
while (besti > alo && bestj > blo && !isbjunk(b[bestj - 1]) && a[besti - 1] == b[bestj - 1]) {
|
||||
besti--;
|
||||
bestj--;
|
||||
bestsize++;
|
||||
}
|
||||
|
||||
while (besti + bestsize < ahi && bestj + bestsize < bhi &&
|
||||
!isbjunk(b[bestj + bestsize]) &&
|
||||
a[besti + bestsize] == b[bestj + bestsize]) {
|
||||
bestsize++;
|
||||
}
|
||||
|
||||
while (besti > alo && bestj > blo && isbjunk(b[bestj - 1]) && a[besti - 1] == b[bestj - 1]) {
|
||||
besti--;
|
||||
bestj--;
|
||||
bestsize++;
|
||||
}
|
||||
|
||||
while (besti + bestsize < ahi && bestj + bestsize < bhi && isbjunk(b[bestj + bestsize]) &&
|
||||
a[besti + bestsize] == b[bestj + bestsize]) {
|
||||
bestsize++;
|
||||
}
|
||||
|
||||
return [besti, bestj, bestsize];
|
||||
}
|
||||
|
||||
this.get_matching_blocks = function () {
|
||||
if (this.matching_blocks != null) return this.matching_blocks;
|
||||
var la = this.a.length;
|
||||
var lb = this.b.length;
|
||||
|
||||
var queue = [[0, la, 0, lb]];
|
||||
var matching_blocks = [];
|
||||
var alo, ahi, blo, bhi, qi, i, j, k, x;
|
||||
while (queue.length) {
|
||||
qi = queue.pop();
|
||||
alo = qi[0];
|
||||
ahi = qi[1];
|
||||
blo = qi[2];
|
||||
bhi = qi[3];
|
||||
x = this.find_longest_match(alo, ahi, blo, bhi);
|
||||
i = x[0];
|
||||
j = x[1];
|
||||
k = x[2];
|
||||
|
||||
if (k) {
|
||||
matching_blocks.push(x);
|
||||
if (alo < i && blo < j)
|
||||
queue.push([alo, i, blo, j]);
|
||||
if (i+k < ahi && j+k < bhi)
|
||||
queue.push([i + k, ahi, j + k, bhi]);
|
||||
}
|
||||
}
|
||||
|
||||
matching_blocks.sort(difflib.__ntuplecomp);
|
||||
|
||||
var i1 = 0, j1 = 0, k1 = 0, block = 0;
|
||||
var i2, j2, k2;
|
||||
var non_adjacent = [];
|
||||
for (var idx in matching_blocks) {
|
||||
if (matching_blocks.hasOwnProperty(idx)) {
|
||||
block = matching_blocks[idx];
|
||||
i2 = block[0];
|
||||
j2 = block[1];
|
||||
k2 = block[2];
|
||||
if (i1 + k1 == i2 && j1 + k1 == j2) {
|
||||
k1 += k2;
|
||||
} else {
|
||||
if (k1) non_adjacent.push([i1, j1, k1]);
|
||||
i1 = i2;
|
||||
j1 = j2;
|
||||
k1 = k2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (k1) non_adjacent.push([i1, j1, k1]);
|
||||
|
||||
non_adjacent.push([la, lb, 0]);
|
||||
this.matching_blocks = non_adjacent;
|
||||
return this.matching_blocks;
|
||||
}
|
||||
|
||||
this.get_opcodes = function () {
|
||||
if (this.opcodes != null) return this.opcodes;
|
||||
var i = 0;
|
||||
var j = 0;
|
||||
var answer = [];
|
||||
this.opcodes = answer;
|
||||
var block, ai, bj, size, tag;
|
||||
var blocks = this.get_matching_blocks();
|
||||
for (var idx in blocks) {
|
||||
if (blocks.hasOwnProperty(idx)) {
|
||||
block = blocks[idx];
|
||||
ai = block[0];
|
||||
bj = block[1];
|
||||
size = block[2];
|
||||
tag = '';
|
||||
if (i < ai && j < bj) {
|
||||
tag = 'replace';
|
||||
} else if (i < ai) {
|
||||
tag = 'delete';
|
||||
} else if (j < bj) {
|
||||
tag = 'insert';
|
||||
}
|
||||
if (tag) answer.push([tag, i, ai, j, bj]);
|
||||
i = ai + size;
|
||||
j = bj + size;
|
||||
|
||||
if (size) answer.push(['equal', ai, i, bj, j]);
|
||||
}
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
// this is a generator function in the python lib, which of course is not supported in javascript
|
||||
// the reimplementation builds up the grouped opcodes into a list in their entirety and returns that.
|
||||
this.get_grouped_opcodes = function (n) {
|
||||
if (!n) n = 3;
|
||||
var codes = this.get_opcodes();
|
||||
if (!codes) codes = [["equal", 0, 1, 0, 1]];
|
||||
var code, tag, i1, i2, j1, j2;
|
||||
if (codes[0][0] == 'equal') {
|
||||
code = codes[0];
|
||||
tag = code[0];
|
||||
i1 = code[1];
|
||||
i2 = code[2];
|
||||
j1 = code[3];
|
||||
j2 = code[4];
|
||||
codes[0] = [tag, Math.max(i1, i2 - n), i2, Math.max(j1, j2 - n), j2];
|
||||
}
|
||||
if (codes[codes.length - 1][0] == 'equal') {
|
||||
code = codes[codes.length - 1];
|
||||
tag = code[0];
|
||||
i1 = code[1];
|
||||
i2 = code[2];
|
||||
j1 = code[3];
|
||||
j2 = code[4];
|
||||
codes[codes.length - 1] = [tag, i1, Math.min(i2, i1 + n), j1, Math.min(j2, j1 + n)];
|
||||
}
|
||||
|
||||
var nn = n + n;
|
||||
var group = [];
|
||||
var groups = [];
|
||||
for (var idx in codes) {
|
||||
if (codes.hasOwnProperty(idx)) {
|
||||
code = codes[idx];
|
||||
tag = code[0];
|
||||
i1 = code[1];
|
||||
i2 = code[2];
|
||||
j1 = code[3];
|
||||
j2 = code[4];
|
||||
if (tag == 'equal' && i2 - i1 > nn) {
|
||||
group.push([tag, i1, Math.min(i2, i1 + n), j1, Math.min(j2, j1 + n)]);
|
||||
groups.push(group);
|
||||
group = [];
|
||||
i1 = Math.max(i1, i2-n);
|
||||
j1 = Math.max(j1, j2-n);
|
||||
}
|
||||
|
||||
group.push([tag, i1, i2, j1, j2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (group && !(group.length == 1 && group[0][0] == 'equal')) groups.push(group)
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
this.ratio = function () {
|
||||
matches = difflib.__reduce(
|
||||
function (sum, triple) { return sum + triple[triple.length - 1]; },
|
||||
this.get_matching_blocks(), 0);
|
||||
return difflib.__calculate_ratio(matches, this.a.length + this.b.length);
|
||||
}
|
||||
|
||||
this.quick_ratio = function () {
|
||||
var fullbcount, elt;
|
||||
if (this.fullbcount == null) {
|
||||
this.fullbcount = fullbcount = {};
|
||||
for (var i = 0; i < this.b.length; i++) {
|
||||
elt = this.b[i];
|
||||
fullbcount[elt] = difflib.__dictget(fullbcount, elt, 0) + 1;
|
||||
}
|
||||
}
|
||||
fullbcount = this.fullbcount;
|
||||
|
||||
var avail = {};
|
||||
var availhas = difflib.__isindict(avail);
|
||||
var matches = numb = 0;
|
||||
for (var i = 0; i < this.a.length; i++) {
|
||||
elt = this.a[i];
|
||||
if (availhas(elt)) {
|
||||
numb = avail[elt];
|
||||
} else {
|
||||
numb = difflib.__dictget(fullbcount, elt, 0);
|
||||
}
|
||||
avail[elt] = numb - 1;
|
||||
if (numb > 0) matches++;
|
||||
}
|
||||
|
||||
return difflib.__calculate_ratio(matches, this.a.length + this.b.length);
|
||||
}
|
||||
|
||||
this.real_quick_ratio = function () {
|
||||
var la = this.a.length;
|
||||
var lb = this.b.length;
|
||||
return _calculate_ratio(Math.min(la, lb), la + lb);
|
||||
}
|
||||
|
||||
this.isjunk = isjunk ? isjunk : difflib.defaultJunkFunction;
|
||||
this.a = this.b = null;
|
||||
this.set_seqs(a, b);
|
||||
}
|
||||
};
|
||||
@@ -5,7 +5,7 @@ include("settings.php");
|
||||
// Establish the real absolute path to the file
|
||||
$file = realpath($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['file'])));
|
||||
// If it doesn't exist, or doesn't start with the $docRoot, stop here
|
||||
if (!file_exists($file) || strpos($file,$docRoot) !== 0) {
|
||||
if (!file_exists($file) || strpos(str_replace("\\","/",$file),$docRoot) !== 0) {
|
||||
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
/* ICEcoder default theme by Matt Pass */
|
||||
|
||||
.cm-s-icecoder {color: #666; background: #161612}
|
||||
.cm-s-icecoder {color: #666; background: #141612}
|
||||
|
||||
.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-keyword {color: #eee; font-weight:bold} /* off-white 1 */
|
||||
.cm-s-icecoder span.cm-atom {color: #e1c76e} /* yellow */
|
||||
.cm-s-icecoder span.cm-number {color: #6cb5d9} /* blue */
|
||||
.cm-s-icecoder span.cm-def {color: #b9ca4a} /* green */
|
||||
|
||||
.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-variable {color: #6cb5d9} /* blue */
|
||||
.cm-s-icecoder span.cm-variable-2 {color: #bf255c} /* pink */
|
||||
.cm-s-icecoder span.cm-variable-3 {color: #f9602c} /* orange */
|
||||
|
||||
.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-property {color: #eee} /* off-white 1 */
|
||||
.cm-s-icecoder span.cm-operator {color: #9179bb} /* purple */
|
||||
.cm-s-icecoder span.cm-comment {color: #97a3aa} /* grey-blue */
|
||||
|
||||
.cm-s-icecoder span.cm-string {color: #ccb100}
|
||||
.cm-s-icecoder span.cm-string-2 {color: #cc6d00}
|
||||
.cm-s-icecoder span.cm-string {color: #b9ca4a} /* green */
|
||||
.cm-s-icecoder span.cm-string-2 {color: #6cb5d9} /* blue */
|
||||
|
||||
.cm-s-icecoder span.cm-meta {color: #555}
|
||||
.cm-s-icecoder span.cm-error {color: #d00}
|
||||
.cm-s-icecoder span.cm-meta {color: #555} /* grey */
|
||||
.cm-s-icecoder span.cm-error {color: #d00} /* red */
|
||||
|
||||
.cm-s-icecoder span.cm-qualifier {color: #555}
|
||||
.cm-s-icecoder span.cm-builtin {color: #0052a3}
|
||||
.cm-s-icecoder span.cm-bracket {color: #cc7}
|
||||
.cm-s-icecoder span.cm-qualifier {color: #555} /* grey */
|
||||
.cm-s-icecoder span.cm-builtin {color: #214e7b} /* bright blue */
|
||||
.cm-s-icecoder span.cm-bracket {color: #cc7} /* grey-yellow */
|
||||
|
||||
.cm-s-icecoder span.cm-tag {color: #e8e8e8}
|
||||
.cm-s-icecoder span.cm-attribute {color: #099}
|
||||
.cm-s-icecoder span.cm-tag {color: #e8e8e8} /* off-white 2 */
|
||||
.cm-s-icecoder span.cm-attribute {color: #099} /* teal */
|
||||
|
||||
.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 span.cm-header {color: #6a0d6a} /* purple-pink */
|
||||
.cm-s-icecoder span.cm-quote {color: #186718} /* dark green */
|
||||
.cm-s-icecoder span.cm-hr {color: #888} /* mid-grey */
|
||||
.cm-s-icecoder span.cm-link {color: #e1c76e} /* yellow */
|
||||
|
||||
.cm-s-icecoder .CodeMirror-cursor {border-left: 1px solid white !important}
|
||||
.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-gutters {background: #141612; 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}
|
||||
617
lib/file-control-xhr.php
Normal file
617
lib/file-control-xhr.php
Normal file
@@ -0,0 +1,617 @@
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
$t = $text['file-control'];
|
||||
|
||||
// ===============================
|
||||
// SET OUR ERROR INFO TO A DEFAULT
|
||||
// ===============================
|
||||
|
||||
$error = false;
|
||||
$errorStr = "false";
|
||||
$errorMsg = "None";
|
||||
|
||||
// ==============================
|
||||
// GET CLEANED FILENAMES OR ERROR
|
||||
// ==============================
|
||||
|
||||
// Get the save type if any
|
||||
$saveType = isset($_GET['saveType']) ? strClean($_GET['saveType']) : "";
|
||||
|
||||
// Establish the filename/new filename
|
||||
$file = str_replace("|","/",strClean(
|
||||
isset($_POST['newFileName']) && $_POST['newFileName']!=""
|
||||
? $_POST['newFileName']
|
||||
: $_REQUEST['file']
|
||||
));
|
||||
|
||||
// Establish the actual name as we may have HTML entities in filename
|
||||
$file = html_entity_decode($file);
|
||||
|
||||
// Put the original $file var aside for use
|
||||
$fileOrig = $file;
|
||||
|
||||
// Trim any +'s or spaces from the end of file
|
||||
$file = rtrim(rtrim($file,'+'),' ');
|
||||
|
||||
// Also remove [NEW] from $file, we can consider $_GET['action'] or $fileOrig to pick that up
|
||||
$file = rtrim($file,'[NEW]');
|
||||
|
||||
// Make each path in $file a full path (; seperated list)
|
||||
$allFiles = explode(";",$file);
|
||||
for ($i=0; $i<count($allFiles); $i++) {
|
||||
if (strpos($allFiles[$i],$docRoot)===false && $_GET['action']!="getRemoteFile") {
|
||||
$allFiles[$i]=str_replace("|","/",$docRoot.$iceRoot.$allFiles[$i]);
|
||||
}
|
||||
};
|
||||
$file = implode(";",$allFiles);
|
||||
|
||||
// Establish the $fileLoc and $fileName (used in single file cases, eg opening. Multiple file cases, eg deleting, is worked out in that loop)
|
||||
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));
|
||||
$fileName = basename($file);
|
||||
|
||||
// Check through all files to make sure they're valid/safe
|
||||
$allFiles = explode(";",$file);
|
||||
for ($i=0; $i<count($allFiles); $i++) {
|
||||
|
||||
// Uncomment to alert and console.log the action and file, useful for debugging
|
||||
// echo ";alert('".xssClean($_GET['action'],"html")." : ".$allFiles[$i]."');console.log('".xssClean($_GET['action'],"html")." : ".$allFiles[$i]."');";
|
||||
|
||||
// Die if the file requested isn't something we expect
|
||||
if(
|
||||
// A local folder that isn't the doc root or starts with the doc root
|
||||
($_GET['action']!="getRemoteFile" &&
|
||||
rtrim($allFiles[$i],"/") !== rtrim($docRoot,"/") &&
|
||||
strpos(realpath(rtrim(dirname($allFiles[$i]),"/")),realpath(rtrim($docRoot,"/"))) !== 0
|
||||
) ||
|
||||
// Or a remote URL that doesn't start http
|
||||
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
|
||||
) {
|
||||
$error = true;
|
||||
$errorStr = "true";
|
||||
$errorMsg = "Sorry! - problem with file requested";
|
||||
};
|
||||
}
|
||||
|
||||
// ============
|
||||
// SAVING FILES
|
||||
// ============
|
||||
|
||||
if (!$error && $_GET['action']=="save") {
|
||||
|
||||
// ====================================
|
||||
// NEW FILES AND SAVE AS XHR LOOPAROUND
|
||||
// ====================================
|
||||
|
||||
if (strpos($fileOrig,"[NEW]")>0||$saveType=="saveAs") {
|
||||
$finalAction = strpos($fileOrig,"[NEW]")>0 ? "save as" : "save";
|
||||
$fileURL = isset($file) ? $file : "";
|
||||
$fileMDTURLPart = isset($_GET["fileMDT"]) && $_GET["fileMDT"]!="undefined" ? "&fileMDT=".numClean($_GET['fileMDT']) : "";
|
||||
$doNext = '
|
||||
top.ICEcoder.serverMessage();
|
||||
fileLoc = "'.$fileLoc.'";
|
||||
newFileName = top.ICEcoder.getInput("'.$t['Enter filename to...'].' "+(fileLoc!="" ? fileLoc : "/"),"");
|
||||
if (newFileName) {
|
||||
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName};
|
||||
newFileName = fileLoc + newFileName;
|
||||
if (top.ICEcoder.filesFrame.contentWindow.document.getElementById(newFileName.replace(/\\\//g,"|"))) {
|
||||
overwriteOK = top.ICEcoder.ask("'.$t['That file exists...'].'");
|
||||
}
|
||||
};
|
||||
|
||||
if ("undefined" == typeof newFileName || (newFileName && "undefined" == typeof overwriteOK) || ("undefined" != typeof overwriteOK && overwriteOK)) {
|
||||
newFileName = "'.$docRoot.'" + newFileName;
|
||||
saveURL = "lib/file-control-xhr.php?action=save'.$fileMDTURLPart.'&csrf='.$_GET["csrf"].'";
|
||||
|
||||
var xhr = top.ICEcoder.xhrObj();
|
||||
|
||||
xhr.onreadystatechange=function() {
|
||||
if (xhr.readyState==4 && xhr.status==200) {
|
||||
/* console.log(xhr.responseText); */
|
||||
var statusObj = JSON.parse(xhr.responseText);
|
||||
/* Set the actions end time and time taken in JSON object */
|
||||
statusObj.action.timeEnd = new Date().getTime();
|
||||
statusObj.action.timeTaken = statusObj.action.timeEnd - statusObj.action.timeStart;
|
||||
/* console.log(statusObj); */
|
||||
|
||||
if (statusObj.status.error) {
|
||||
top.ICEcoder.message(statusObj.status.errorMsg);
|
||||
} else {
|
||||
eval(statusObj.action.doNext);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
/* console.log(\'Calling \'+saveURL+\' via XHR\'); */
|
||||
xhr.open("POST",saveURL,true);
|
||||
xhr.setRequestHeader(\'Content-type\', \'application/x-www-form-urlencoded\');
|
||||
xhr.send(\'timeStart='.$_POST["timeStart"].'&file='.$fileURL.'&newFileName=\'+newFileName+\'&contents=\'+top.document.getElementById(\'saveTemp1\').value);
|
||||
top.ICEcoder.serverMessage("<b>'.$t['Saving'].'</b><br>" + "'.($finalAction == "Save" ? "newFileName" : "'".$fileName."'").'");
|
||||
} else {
|
||||
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);
|
||||
}';
|
||||
|
||||
// ===================
|
||||
// FILE CONTENT SAVING
|
||||
// ===================
|
||||
|
||||
} elseif (isset($_POST['contents'])) {
|
||||
$finalAction = isset($_POST["newFileName"]) ? "save as" : "save";
|
||||
|
||||
// =================
|
||||
// FILE IS WRITEABLE
|
||||
// =================
|
||||
|
||||
if (!$demoMode && ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="")) {
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
|
||||
// =======================
|
||||
// MDT'S MATCH, WRITE FILE
|
||||
// =======================
|
||||
|
||||
if (!(isset($_GET['fileMDT']))||$filemtime==$_GET['fileMDT']) {
|
||||
// Newly created files have the perms set too
|
||||
$setPerms = (!file_exists($file)) ? true : false;
|
||||
// get old file contents, if file exists, and count stats on usage \n and \r there
|
||||
// in this case we can keep line endings, which file had before, without
|
||||
// making code version control systems going crazy about line endings change in whole file.
|
||||
$oldContents = file_exists($file)?file_get_contents($file):'';
|
||||
$unixNewLines = preg_match_all('/[^\r][\n]/u', $oldContents);
|
||||
$windowsNewLines = preg_match_all('/[\r][\n]/u', $oldContents);
|
||||
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
|
||||
// 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);
|
||||
if (($unixNewLines > 0) || ($windowsNewLines > 0)){
|
||||
if ($unixNewLines > $windowsNewLines){
|
||||
$contents = str_replace($ICEcoder["lineEnding"], "\n", $contents);
|
||||
} elseif ($windowsNewLines > $unixNewLines){
|
||||
$contents = str_replace($ICEcoder["lineEnding"], "\r\n", $contents);
|
||||
}
|
||||
}
|
||||
// Now write that content, close the file and clear the statcache
|
||||
fwrite($fh, $contents);
|
||||
fclose($fh);
|
||||
if ($setPerms) {
|
||||
chmod($file,octdec($ICEcoder['newFilePerms']));
|
||||
}
|
||||
clearstatcache();
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
$doNext = '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']!="") {
|
||||
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'file\');';
|
||||
$doNext .= 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');';
|
||||
if (!strpos($_REQUEST['file'],"[NEW]")) {
|
||||
// We're saving as a new file, so unhighlight the old name in the file manager if visible
|
||||
$doNext .= "fileLink = top.ICEcoder.filesFrame.contentWindow.document.getElementById('".str_replace("/","|",$fileLoc)."|".basename($_REQUEST['file'])."');";
|
||||
$doNext .= "if (fileLink) {fileLink.style.backgroundColor = top.ICEcoder.tabBGnormal; fileLink.style.color = top.ICEcoder.tabFGnormalFile};";
|
||||
}
|
||||
}
|
||||
// Reload previewWindow window if not a Markdown file
|
||||
// In doing this, we check on an interval for the page to be complete and if we last saw it loading
|
||||
// When we are done loading, so set the loading status to false and load plugins ontop...
|
||||
$doNext .= 'if (top.ICEcoder.previewWindow.location && top.ICEcoder.previewWindow.location.pathname.indexOf(".md")==-1) {
|
||||
top.ICEcoder.previewWindowLoading = false;
|
||||
top.ICEcoder.previewWindow.location.reload(true);
|
||||
|
||||
top.ICEcoder.checkPreviewWindowLoadingInt = setInterval(function() {
|
||||
if (top.ICEcoder.previewWindow.document.readyState != "loading" && top.ICEcoder.previewWindowLoading) {
|
||||
top.ICEcoder.previewWindowLoading = false;
|
||||
try {top.ICEcoder.doPesticide();} catch(err) {};
|
||||
try {top.ICEcoder.doStatsJS(\'save\');} catch(err) {};
|
||||
clearInterval(top.ICEcoder.checkPreviewWindowLoadingInt);
|
||||
} else {
|
||||
top.ICEcoder.previewWindowLoading = top.ICEcoder.previewWindow.document.readyState == "loading" ? true : false;
|
||||
}
|
||||
},4);
|
||||
|
||||
};';
|
||||
|
||||
// Copy over content to diff pane if we have that setting on
|
||||
$doNext .= '
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
cMdiff = top.ICEcoder.getcMdiffInstance();
|
||||
if (top.ICEcoder.updateDiffOnSave) {
|
||||
cMdiff.setValue(cM.getValue());
|
||||
};
|
||||
';
|
||||
|
||||
// Finally, set previous files, indicate changes, set saved points and redo tabs
|
||||
$doNext .= '
|
||||
top.ICEcoder.setPreviousFiles();
|
||||
setTimeout(function(){top.ICEcoder.indicateChanges()},4);
|
||||
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
|
||||
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);';
|
||||
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-save.php");
|
||||
|
||||
// ======================================================
|
||||
// MDT'S DON'T MATCH, OFFER TO LOAD FILE & SHOW DIFF VIEW
|
||||
// ======================================================
|
||||
|
||||
} else {
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
$doNext = '
|
||||
var loadedFile = document.createElement("textarea");
|
||||
loadedFile.value = "'.str_replace('"','\\\"',str_replace("\r","\\\\r",str_replace("\n","\\\\n",str_replace("</textarea>","<ICEcoder:/:textarea>",$loadedFile)))).'";
|
||||
var refreshFile = top.ICEcoder.ask("'.$t['Sorry, this file...'].'\\\n'.$file.'\\\n\\\n'.$t['Reload this file...'].'");
|
||||
if (refreshFile) {
|
||||
var cM = top.ICEcoder.getcMInstance();
|
||||
var thisTab = top.ICEcoder.selectedTab;
|
||||
var userVersionFile = cM.getValue();
|
||||
/* Revert back to original */
|
||||
cM.setValue(loadedFile.value);
|
||||
top.ICEcoder.savedPoints[thisTab-1] = cM.changeGeneration();
|
||||
top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "'.$filemtime.'";
|
||||
cM.clearHistory();
|
||||
/* Now for the new version in the diff pane */
|
||||
top.ICEcoder.setSplitPane(\'on\');
|
||||
var cMdiff = top.ICEcoder.getcMdiffInstance();
|
||||
cMdiff.setValue(userVersionFile);
|
||||
};';
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
|
||||
// ===================
|
||||
// FILE IS UNWRITEABLE
|
||||
// ===================
|
||||
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot save']."\\\\n".$file."');";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
};
|
||||
|
||||
// ==========
|
||||
// NEW FOLDER
|
||||
// ==========
|
||||
|
||||
if (!$error && $_GET['action']=="newFolder") {
|
||||
if (!$demoMode && is_writable($docRoot.$fileLoc)) {
|
||||
mkdir($file, octdec($ICEcoder['newDirPerms']));
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'folder\');';
|
||||
$finalAction = "newFolder";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-new-dir.php");
|
||||
} else {
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot create...']."\\\\n".$fileLoc."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ================
|
||||
// MOVE FILE/FOLDER
|
||||
// ================
|
||||
|
||||
if (!$error && $_GET['action']=="move") {
|
||||
$moved=false;
|
||||
$doNext = "";
|
||||
$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";
|
||||
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'move\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean(str_replace("|","/",$_GET['oldFileName']))).'\',false,\''.$fileOrFolder.'\');';
|
||||
$finalAction = "move";
|
||||
$moved=true;
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-move.php");
|
||||
}
|
||||
}
|
||||
if (!$moved) {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot move']."\\\\n".str_replace("|","/",strClean($_GET['oldFileName']))."\\\\n\\\\n".$t['Maybe public write...']."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ==================
|
||||
// RENAME FILE/FOLDER
|
||||
// ==================
|
||||
|
||||
if (!$error && $_GET['action']=="rename") {
|
||||
$renamed=false;
|
||||
if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
|
||||
if(rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName)) {
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');';
|
||||
$finalAction = "rename";
|
||||
$renamed=true;
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-rename.php");
|
||||
}
|
||||
}
|
||||
if (!$renamed) {
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot rename']."\\\\n".strClean($_GET['oldFileName'])."\\\\n\\\\n".$t['Maybe public write...']."');";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// =================
|
||||
// PASTE FILE/FOLDER
|
||||
// =================
|
||||
|
||||
if (!$error && $_GET['action']=="paste") {
|
||||
$source = $file;
|
||||
$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, octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!is_dir($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
mkdir($dest, octdec($ICEcoder['newDirPerms']));
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::SELF_FIRST) as $item
|
||||
) {
|
||||
if ($item->isDir()) {
|
||||
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
copy($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$fileOrFolder = "file";
|
||||
if (!file_exists($dest)) {
|
||||
copy($source, $dest);
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!file_exists($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
copy($source, $dest);
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\',false,false,false,\''.$fileOrFolder.'\');';
|
||||
$finalAction = "pasteFile";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-paste.php");
|
||||
} else {
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot copy']." \\\\n".str_replace($docRoot,"",$source)."\\\\n ".$t['into']." \\\\n".str_replace($docRoot,"",$dest)."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ==============
|
||||
// UPLOAD FILE(S)
|
||||
// ==============
|
||||
|
||||
if (!$error && $_GET['action']=="upload") {
|
||||
if (!$demoMode) {
|
||||
$doNext = "";
|
||||
class fileUploader {
|
||||
public function __construct($uploads) {
|
||||
global $docRoot,$iceRoot,$ICEcoder,$doNext;
|
||||
$uploadDir=$docRoot.$iceRoot.str_replace("..","",str_replace("|","/",strClean($_POST['folder'])."/"));
|
||||
foreach($uploads as $current) {
|
||||
$this->uploadFile=$uploadDir.$current->name;
|
||||
$fileName = $current->name;
|
||||
// Get & set existing perms for existing files, or set to newFilePerms setting for new files
|
||||
if (file_exists($this->uploadFile)) {
|
||||
$chmodInfo = substr(sprintf('%o', fileperms($this->uploadFile)), -4);
|
||||
$setPerms = substr($chmodInfo,1,3); // reduces 0755 down to 755
|
||||
} else {
|
||||
$setPerms = $ICEcoder['newFilePerms'];
|
||||
}
|
||||
if ($this->upload($current,$this->uploadFile,$setPerms)) {
|
||||
$doNext .= 'top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,\'/\'),\''.str_replace("'","\'",$fileName).'\',false,false,true,\'file\'); top.ICEcoder.serverMessage("'.$t['Uploaded file(s) OK'].'");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
$finalAction = "upload";
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot upload']." \\\\n".$fileName."\\\\n ".$t['into']." \\\\n'+top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'));";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function upload($current,$uploadFile,$setPerms){
|
||||
if(move_uploaded_file($current->tmp_name,$uploadFile)){
|
||||
chmod($uploadFile,octdec($setPerms));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getDetails($fileArr) {
|
||||
foreach($fileArr['name'] as $keyee => $info) {
|
||||
$uploads[$keyee]->name=$fileArr['name'][$keyee];
|
||||
$uploads[$keyee]->type=$fileArr['type'][$keyee];
|
||||
$uploads[$keyee]->tmp_name=$fileArr['tmp_name'][$keyee];
|
||||
$uploads[$keyee]->error=$fileArr['error'][$keyee];
|
||||
}
|
||||
return $uploads;
|
||||
}
|
||||
|
||||
if($_FILES['filesInput']){
|
||||
$uploads = getDetails($_FILES['filesInput']);
|
||||
$fileUploader=new fileUploader($uploads);
|
||||
}
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-upload.php");
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot upload...']."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
|
||||
$doNext .= "top.ICEcoder.hideFileMenu();top.document.getElementById('fileInput').value='';top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));";
|
||||
|
||||
// Upload is not handled by XHR methods, but form post, so we need to manually trigger $doNext in a script tag
|
||||
echo "<script>".$doNext."</script>";
|
||||
};
|
||||
|
||||
// ========================
|
||||
// DELETE FILE(S)/FOLDER(S)
|
||||
// ========================
|
||||
|
||||
if (!$error && $_GET['action']=="delete") {
|
||||
$doNext = "";
|
||||
$filesArray = explode(";",$file); // May contain more than one file here
|
||||
for ($i=0;$i<count($filesArray);$i++) {
|
||||
$fullPath = str_replace($docRoot,"",$filesArray[$i]);
|
||||
$fullPath = str_replace($iceRoot,"",$fullPath);
|
||||
$fullPath = $docRoot.$iceRoot.$fullPath;
|
||||
|
||||
if (rtrim($fullPath,"/") == rtrim($docRoot,"/")) {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot delete...']."');";
|
||||
} 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
|
||||
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
$finalAction = "delete";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-delete.php");
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot delete']."\\\\n".str_replace($docRoot,"",$fullPath)."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// The function to recursively remove folders & files
|
||||
function rrmdir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
filetype($dir."/".$object) == "dir"
|
||||
? rrmdir($dir."/".$object)
|
||||
: unlink($dir."/".$object);
|
||||
}
|
||||
}
|
||||
reset($objects);
|
||||
rmdir($dir);
|
||||
}
|
||||
};
|
||||
|
||||
// ======================
|
||||
// REPLACE TEXT IN A FILE
|
||||
// ======================
|
||||
|
||||
if (!$error && $_GET['action']=="replaceText") {
|
||||
$doNext = "";
|
||||
if (!$demoMode && is_writable($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($t['Sorry, cannot save']);
|
||||
fwrite($fh, $newContent);
|
||||
fclose($fh);
|
||||
$finalAction = "replaceText";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-replace-text.php");
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot replace...']."\\\\n".$file."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ==========================
|
||||
// GET CONTENTS OF REMOTE URL
|
||||
// ==========================
|
||||
|
||||
if (!$error && $_GET['action']=="getRemoteFile") {
|
||||
$doNext = "";
|
||||
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);
|
||||
$doNext .= 'top.ICEcoder.newTab();';
|
||||
$doNext .= 'top.ICEcoder.getcMInstance().setValue(\''.str_replace("\r","",str_replace("\t","\\\\t",str_replace("\n","\\\\n",str_replace("'","\\\\'",str_replace("\\","\\\\",preg_quote($remoteFile)))))).'\');';
|
||||
$finalAction = "getRemoteFile";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-get-remote-file.php");
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
$doNext .= 'top.ICEcoder.message(\''.$t['Sorry, could not...'].' '.$file.'\');';
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// =======================
|
||||
// CHANGING FILE/DIR PERMS
|
||||
// =======================
|
||||
|
||||
if (!$error && $_GET['action']=="perms") {
|
||||
if (!$demoMode && is_writable($file)) {
|
||||
chmod($file,octdec(numClean($_GET['perms'])));
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
|
||||
$finalAction = "perms";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-perms.php");
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot change...']." \\n".strClean($file)."');";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ===================
|
||||
// JSON DATA TO RETURN
|
||||
// ===================
|
||||
|
||||
// No $filemtime yet? Get it now!
|
||||
if (!isset($filemtime)) {
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
}
|
||||
|
||||
echo '{
|
||||
"file": {
|
||||
"absPath": "'.$file.'",
|
||||
"relPath": "'.$fileLoc.'/'.$fileName.'",
|
||||
"name": "'.$fileName.'",
|
||||
"path": "'.dirname($file).'",
|
||||
"bytes": "'.filesize($file).'",
|
||||
"modifiedDT": "'.$filemtime.'"
|
||||
},
|
||||
"action": {
|
||||
"initial" : "'.$_GET["action"].'",
|
||||
"final" : "'.$finalAction.'",
|
||||
"timeStart": '.$_POST["timeStart"].',
|
||||
"timeEnd": 0,
|
||||
"timeTaken": 0,
|
||||
"csrf": "'.$_GET["csrf"].'",
|
||||
"doNext" : "'.preg_replace('/\r|\n/','',str_replace(' ','',str_replace('"','\"',$doNext))).'top.ICEcoder.switchMode();"
|
||||
},
|
||||
"status": {
|
||||
"error" : '.($error ? 'true' : 'false').',
|
||||
"errorStr" : "'.$errorStr.'",
|
||||
"errorMsg" : "'.$errorMsg.'"
|
||||
}
|
||||
}';
|
||||
?>
|
||||
@@ -1,8 +1,12 @@
|
||||
<?php
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
$t = $text['file-control'];
|
||||
?>
|
||||
<?php if ($_SESSION['githubDiff']) { ?>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="underscore-min.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php ;}; ?>
|
||||
<script>
|
||||
<?php
|
||||
// Get the save type if any
|
||||
@@ -12,12 +16,21 @@ $saveType = isset($_GET['saveType']) ? strClean($_GET['saveType']) : "";
|
||||
$file = str_replace("|","/",strClean(
|
||||
isset($_POST['newFileName']) && $_POST['newFileName']!=""
|
||||
? $_POST['newFileName']
|
||||
: $_GET['file']
|
||||
: $_REQUEST['file']
|
||||
));
|
||||
|
||||
// Establish the actual name as we may have HTML entities in filename
|
||||
$file = html_entity_decode($file);
|
||||
|
||||
// Put the original $file var aside for use
|
||||
$fileOrig = $file;
|
||||
|
||||
// Trim any +'s or spaces from the end of file
|
||||
$file = rtrim(rtrim($file,'+'),' ');
|
||||
|
||||
// Also remove [NEW] from $file, we can consider $_GET['action'] or $fileOrig to pick that up
|
||||
$file = rtrim($file,'[NEW]');
|
||||
|
||||
// Make each path in $file a full path (; seperated list)
|
||||
$allFiles = explode(";",$file);
|
||||
for ($i=0; $i<count($allFiles); $i++) {
|
||||
@@ -34,22 +47,28 @@ $fileName = basename($file);
|
||||
// Check through all files to make sure they're valid/safe
|
||||
$allFiles = explode(";",$file);
|
||||
for ($i=0; $i<count($allFiles); $i++) {
|
||||
|
||||
// Uncomment to alert and console.log the action and file, useful for debugging
|
||||
// echo ";alert('".xssClean($_GET['action'],"html")." : ".$allFiles[$i]."');console.log('".xssClean($_GET['action'],"html")." : ".$allFiles[$i]."');";
|
||||
|
||||
// Die if the file requested isn't something we expect
|
||||
if(
|
||||
($_GET['action']!="getRemoteFile" && $_GET['action']!="upload" && strpos(realpath($allFiles[$i]),realpath($docRoot)) !== 0) ||
|
||||
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
|
||||
) {
|
||||
die("alert('Sorry - problem with file/folder requested');window.history.back();</script>");
|
||||
// A local folder that isn't the doc root or starts with the doc root
|
||||
($_GET['action']!="getRemoteFile" &&
|
||||
rtrim($allFiles[$i],"/") !== rtrim($docRoot,"/") &&
|
||||
strpos(realpath(rtrim(dirname($allFiles[$i]),"/")),realpath(rtrim($docRoot,"/"))) !== 0
|
||||
) ||
|
||||
// Or a remote URL that doesn't start http
|
||||
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
|
||||
) {
|
||||
die("alert('Sorry! - problem with file requested');</script>");
|
||||
};
|
||||
}
|
||||
|
||||
// Uncomment to alert and console.log the action and file, useful for debugging
|
||||
// echo ";alert('".xssClean($_GET['action'],"html")." : ".$file."');console.log('".xssClean($_GET['action'],"html")." : ".$file."');";
|
||||
|
||||
// If we're due to open a file...
|
||||
if ($_GET['action']=="load") {
|
||||
echo 'action="load";';
|
||||
|
||||
$lineNumber = max(isset($_REQUEST['lineNumber'])?intval($_REQUEST['lineNumber']):1, 1);
|
||||
if (file_exists($file)) {
|
||||
$finfo = "text";
|
||||
// Determine what to do based on mime type
|
||||
@@ -63,11 +82,13 @@ if ($_GET['action']=="load") {
|
||||
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) {
|
||||
if (strpos($finfo,"text")===0 || strpos($finfo, "application/xml")===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>';
|
||||
echo '</script><textarea name="loadedFile" id="loadedFile">'.htmlentities($loadedFile).'</textarea><script>';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-load.php");
|
||||
} else if (strpos($finfo,"image")===0) {
|
||||
echo 'fileType="image";fileName=\''.$fileLoc."/".$fileName.'\';';
|
||||
} else {
|
||||
@@ -79,321 +100,14 @@ if ($_GET['action']=="load") {
|
||||
|
||||
};
|
||||
|
||||
// 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(\''.$t['Sorry, could not...'].' '.$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 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'folder\');action="newFolder";';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$fileLoc."');";
|
||||
}
|
||||
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.$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),
|
||||
RecursiveIteratorIterator::SELF_FIRST) as $item
|
||||
) {
|
||||
if ($item->isDir()) {
|
||||
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), 0705);
|
||||
} else {
|
||||
copy($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$fileOrFolder = "file";
|
||||
if (!file_exists($dest)) {
|
||||
copy($source, $dest);
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!file_exists($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
copy($source, $dest);
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\',false,false,false,\''.$fileOrFolder.'\');action="pasteFile";';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot copy']." \\n".str_replace($docRoot,"",$source)."\\n ".$t['into']." \\n".str_replace($docRoot,"",$dest)."');";
|
||||
}
|
||||
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,$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 '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("'.$t['Uploaded file(s) OK'].'");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot upload']." \\n".$fileName."\\n ".$t['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)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getDetails($fileArr) {
|
||||
foreach($fileArr['name'] as $keyee => $info) {
|
||||
$uploads[$keyee]->name=$fileArr['name'][$keyee];
|
||||
$uploads[$keyee]->type=$fileArr['type'][$keyee];
|
||||
$uploads[$keyee]->tmp_name=$fileArr['tmp_name'][$keyee];
|
||||
$uploads[$keyee]->error=$fileArr['error'][$keyee];
|
||||
}
|
||||
return $uploads;
|
||||
}
|
||||
|
||||
if($_FILES['filesInput']){
|
||||
$uploads = getDetails($_FILES['filesInput']);
|
||||
$fileUploader=new fileUploader($uploads);
|
||||
}
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot upload...']."');";
|
||||
}
|
||||
|
||||
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'])))) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (!$renamed) {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot rename']."\\n".strClean($_GET['oldFileName'])."\\n\\n".$t['Maybe public write...']."');";
|
||||
}
|
||||
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('".$t['Sorry, cannot move']."\\n".strClean($_GET['oldFileName'])."\\n\\n".$t['Maybe public write...']."');";
|
||||
}
|
||||
} 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 = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
$newContent = str_replace(strClean($_GET['find']),strClean($_GET['replace']),$loadedFile);
|
||||
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
|
||||
fwrite($fh, $newContent);
|
||||
fclose($fh);
|
||||
echo 'action="replaceText";';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot replace...']."\\n".strClean($_GET['fileRef'])."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to change permissions on a file/folder...
|
||||
if ($_GET['action']=="perms") {
|
||||
if (!$demoMode && is_writable($file)) {
|
||||
chmod($file,octdec(numClean($_GET['perms'])));
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
|
||||
echo 'action="perms";';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot change...']." \\n".strClean($file)."');";
|
||||
}
|
||||
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);$i++) {
|
||||
$fullPath = str_replace($docRoot,"",$filesArray[$i]);
|
||||
$fullPath = str_replace($iceRoot,"",$fullPath);
|
||||
$fullPath = $docRoot.$iceRoot.$fullPath;
|
||||
|
||||
if (rtrim($fullPath,"/") == rtrim($docRoot,"/")) {
|
||||
echo "top.ICEcoder.message('".$t['Sorry, cannot delete...']."');";
|
||||
} 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 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
echo 'action="delete";';
|
||||
} else {
|
||||
echo "top.ICEcoder.message('".$t['Sorry, cannot delete']."\\n".str_replace($docRoot,"",$fullPath)."');";
|
||||
}
|
||||
echo 'action="nothing";';
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// The function to recursively remove folders & files
|
||||
function rrmdir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
filetype($dir."/".$object) == "dir"
|
||||
? rrmdir($dir."/".$object)
|
||||
: unlink($dir."/".$object);
|
||||
}
|
||||
}
|
||||
reset($objects);
|
||||
rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET['action']=="save") {
|
||||
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']!="")) {
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
if (!(isset($_GET['fileMDT']))||$filemtime==$_GET['fileMDT']) {
|
||||
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
|
||||
// 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();
|
||||
$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 '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 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();setTimeout(function(){top.ICEcoder.indicateChanges()},4);action="doneSave";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-save.php");
|
||||
} else {
|
||||
$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>';
|
||||
?>
|
||||
var refreshFile = top.ICEcoder.ask('<?php echo $t['Sorry, this file...']."\n".$file."\n\n".$t['Reload this file...'];?>');
|
||||
if (refreshFile) {
|
||||
var cM = top.ICEcoder.getcMInstance();
|
||||
var thisTab = top.ICEcoder.selectedTab;
|
||||
document.getElementById('userVersionFile').value = cM.getValue();
|
||||
// Revert back to original
|
||||
cM.setValue(document.getElementById('loadedFile').value);
|
||||
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();
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
cM.setValue(document.getElementById('userVersionFile').value);
|
||||
cM.clearHistory();
|
||||
// Finally, switch back to original tab
|
||||
top.ICEcoder.switchTab(thisTab);
|
||||
}
|
||||
action='nothing';
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "action='nothing';top.ICEcoder.message('".$t['Sorry, cannot save']."\\n".$file."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
};
|
||||
?>
|
||||
if (action=="load") {
|
||||
if (fileType=="text") {
|
||||
setTimeout(function() {
|
||||
if (!top.ICEcoder.content.contentWindow.createNewCMInstance) {
|
||||
console.log('<?php echo $t['There was a...']; ?>');
|
||||
window.location.reload();
|
||||
window.location.reload(true);
|
||||
<?php
|
||||
if (file_exists($file)) {
|
||||
?>
|
||||
@@ -408,25 +122,58 @@ if (action=="load") {
|
||||
top.ICEcoder.setLayout();
|
||||
top.ICEcoder.content.contentWindow.createNewCMInstance(top.ICEcoder.nextcMInstance);
|
||||
|
||||
<?php if ($_SESSION['githubDiff']) { ?>
|
||||
// If we're in GitHub diff mode and have a split pane display, get the content for the diff pane
|
||||
if (top.ICEcoder.githubDiff && top.ICEcoder.splitPane) {
|
||||
<?php
|
||||
// Get our GitHub relative site path & local path
|
||||
$ghRemoteURLPos = array_search($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
|
||||
|
||||
$ghLocalURLPaths = $ICEcoder['githubLocalPaths'];
|
||||
$ghLocalPath = $ghLocalURLPaths[$ghRemoteURLPos];
|
||||
|
||||
$ghRemoteURLPaths = $ICEcoder['githubRemotePaths'];
|
||||
$ghRemoteURL = $ghRemoteURLPaths[$ghRemoteURLPos];
|
||||
|
||||
$ghRemoteURL = str_replace("https://github.com/","",$ghRemoteURL);
|
||||
$ghRemoteURL = str_replace("/","|",$ghRemoteURL);
|
||||
|
||||
// If the file is not in a sub-sub dir of the doc root
|
||||
if (!strpos($fileLoc,"/",1)) {
|
||||
// The file path is simply the file name in the root
|
||||
$ghFilePath = $fileName;
|
||||
} else {
|
||||
// We need to get rid of the root dir and trailing slash
|
||||
$ghFilePath = substr(str_replace($ghLocalPath,"",$fileLoc),1);
|
||||
// If it's not within a sub-dir, it's just the filename, otherwise prefix with dir path and pipe
|
||||
$ghFilePath = $ghFilePath == "" ? $fileName : $ghFilePath."|".$fileName;
|
||||
}
|
||||
?>
|
||||
|
||||
top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = "github.php?action=read&repo=<?php echo $ghRemoteURL;?>&filePath=<?php echo $ghFilePath;?>&csrf="+top.ICEcoder.csrf;
|
||||
}
|
||||
<?php ;}; ?>
|
||||
|
||||
// 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);
|
||||
top.ICEcoder.focus();
|
||||
top.ICEcoder.switchTab(top.ICEcoder.selectedTab,'noFocus');
|
||||
setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.focus();},0);
|
||||
|
||||
// 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.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.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLinecM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]], "background");
|
||||
top.ICEcoder['cMActiveLinecM'+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 $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;
|
||||
top.ICEcoder.goToLine(<?php echo $lineNumber; ?>);
|
||||
<?php
|
||||
;};
|
||||
?>
|
||||
@@ -452,44 +199,6 @@ if (action=="load") {
|
||||
}
|
||||
</script>
|
||||
|
||||
<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") {
|
||||
?>
|
||||
fileLoc = '<?php echo $fileLoc;?>';
|
||||
newFileName = top.ICEcoder.getInput('<?php echo $t['Enter filename to...']; ?> '+(fileLoc!='' ? fileLoc : '/'),'');
|
||||
if (newFileName) {
|
||||
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('<?php echo $t['That file exists...']; ?>');
|
||||
}
|
||||
}
|
||||
document.saveFile.newFileName.value = '<?php echo $docRoot; ?>' + newFileName;
|
||||
<?php ;};?>
|
||||
if ("undefined" == typeof newFileName || (newFileName && "undefined" == typeof overwriteOK) || ("undefined" != typeof overwriteOK && overwriteOK)) {
|
||||
top.ICEcoder.serverMessage('<b><?php echo $t['Saving']; ?></b><br>'+ <?php echo strpos($file,"[NEW]")>0 ? "newFileName" : "'$file'"; ?>);
|
||||
document.saveFile.contents.value = top.document.getElementById('saveTemp1').value;
|
||||
document.saveFile.submit();
|
||||
} else {
|
||||
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);
|
||||
action=="nothing";
|
||||
}
|
||||
}
|
||||
|
||||
if (action=="doneSave") {
|
||||
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>
|
||||
@@ -17,9 +17,21 @@ table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {margin: 0; overflow: auto}
|
||||
body {margin: 0; overflow: auto;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.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}
|
||||
.plugins {position: fixed; display: inline-block; width: 16px; height: 16px; background: url('../images/file-manager-icons.png') -64px 0 no-repeat; right: 0; margin-right: 15px; top: 47px; cursor: pointer}
|
||||
.githubOn {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: 72px; cursor: pointer}
|
||||
.githubOff {position: fixed; display: inline-block; width: 14px; height: 14px; background: url('../images/file-manager-icons.png') -96px 0 no-repeat; right: 0; margin-right: 15px; top: 72px; cursor: pointer}
|
||||
.fmDragBox {position: absolute; display: inline-block; width: 0; height: 0; top: 0; left: 0; background: rgba(0,198,255,0.3);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -18,93 +18,98 @@ $t = $text['get-branch'];
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> get branch</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<script src="github.js"></script>
|
||||
<?php if ($_SESSION['githubDiff']) { ?>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php ;}; ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
// Function to sort given values alphabetically
|
||||
function alphasort($a, $b) {
|
||||
return strcmp($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);
|
||||
// Need to get dir contents recursively? (Used by GitHub diff mode)
|
||||
if ($_SESSION['githubDiff']) {
|
||||
// Function to sort given values alphabetically
|
||||
function alphasort($a, $b) {
|
||||
return strcmp($a->getPathname(), $b->getPathname());
|
||||
}
|
||||
public function getIterator() {
|
||||
return $this->iterator;
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get a full list of dirs & files and begin sorting using above class & function
|
||||
$path = $docRoot.$iceRoot;
|
||||
$objectList = new SortingIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST), 'alphasort');
|
||||
// Get a full list of dirs & files and begin sorting using above class & function
|
||||
$path = $docRoot.$iceRoot;
|
||||
$objectList = new SortingIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST), 'alphasort');
|
||||
|
||||
// Iterator to get files
|
||||
$iter = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::SELF_FIRST,
|
||||
RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore "Permission denied"
|
||||
);
|
||||
// Iterator to get files
|
||||
$iter = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::SELF_FIRST,
|
||||
RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore "Permission denied"
|
||||
);
|
||||
|
||||
// Check if dir has .gitignore file
|
||||
function hasGitignore($dir) {
|
||||
return is_file("$dir/.gitignore");
|
||||
}
|
||||
|
||||
// Get a list of .gitignore files into $gi array
|
||||
$gi = array();
|
||||
if(hasGitignore($path)) {
|
||||
$gi[] = "$path/.gitignore";
|
||||
}
|
||||
foreach ($iter as $scanpath) {
|
||||
if (is_dir($scanpath) && strpos($scanpath,".git") == false) {
|
||||
$thisDir = str_replace("\\","/",$scanpath);
|
||||
if(hasGitignore($thisDir)) {
|
||||
$gi[] = $thisDir."/.gitignore";
|
||||
// Check if dir has .gitignore file
|
||||
function hasGitignore($dir) {
|
||||
return is_file("$dir/.gitignore");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get $matches array containing existing files listed in .gitignore
|
||||
function parseGitignore($file) { # $file = '/absolute/path/to/.gitignore'
|
||||
$dir = dirname($file);
|
||||
$matches = array();
|
||||
$lines = file($file);
|
||||
foreach ($lines as $line) {
|
||||
$line = trim($line);
|
||||
if ($line === '') continue; # empty line
|
||||
if (substr($line, 0, 1) == '#') continue; # a comment
|
||||
if (substr($line, 0, 1) == '!') { # negated glob
|
||||
$line = substr($line, 1);
|
||||
$files = array_diff(glob("$dir/*"), glob("$dir/$line"));
|
||||
} else { # normal glob
|
||||
$files = glob("$dir/$line");
|
||||
}
|
||||
$matches = array_merge($matches, $files);
|
||||
}
|
||||
return $matches;
|
||||
}
|
||||
|
||||
// Cycle through all .gitignore files running above function to get a list of $excluded files
|
||||
// Exclude the .git dir as first item as we don't want to see that
|
||||
$excluded = array("/.git");
|
||||
foreach ($gi as $scanpath) {
|
||||
$excludedTest = (parseGitignore($scanpath));
|
||||
if (count($excludedTest) > 0) {
|
||||
$excluded = array_merge($excluded, $excludedTest);
|
||||
// Get a list of .gitignore files into $gi array
|
||||
$gi = array();
|
||||
if(hasGitignore($path)) {
|
||||
$gi[] = "$path/.gitignore";
|
||||
}
|
||||
foreach ($iter as $scanpath) {
|
||||
if (is_dir($scanpath) && strpos($scanpath,".git") == false) {
|
||||
$thisDir = str_replace("\\","/",$scanpath);
|
||||
if(hasGitignore($thisDir)) {
|
||||
$gi[] = $thisDir."/.gitignore";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$objectListArray = array();
|
||||
foreach ($objectList as $objectRef) {
|
||||
$fileFolderName = @ltrim(substr(str_replace("\\","/",$objectRef->getPathname()), strlen($path)),"/");
|
||||
array_push($objectListArray,$fileFolderName);
|
||||
// Get $matches array containing existing files listed in .gitignore
|
||||
function parseGitignore($file) { # $file = '/absolute/path/to/.gitignore'
|
||||
$dir = dirname($file);
|
||||
$matches = array();
|
||||
$lines = file($file);
|
||||
foreach ($lines as $line) {
|
||||
$line = trim($line);
|
||||
if ($line === '') continue; # empty line
|
||||
if (substr($line, 0, 1) == '#') continue; # a comment
|
||||
if (substr($line, 0, 1) == '!') { # negated glob
|
||||
$line = substr($line, 1);
|
||||
$files = array_diff(glob("$dir/*"), glob("$dir/$line"));
|
||||
} else { # normal glob
|
||||
$files = glob("$dir/$line");
|
||||
}
|
||||
$matches = array_merge($matches, $files);
|
||||
}
|
||||
return $matches;
|
||||
}
|
||||
|
||||
// Cycle through all .gitignore files running above function to get a list of $excluded files
|
||||
// Exclude the .git dir as first item as we don't want to see that
|
||||
$excluded = array("/.git");
|
||||
foreach ($gi as $scanpath) {
|
||||
$excludedTest = (parseGitignore($scanpath));
|
||||
if (count($excludedTest) > 0) {
|
||||
$excluded = array_merge($excluded, $excludedTest);
|
||||
}
|
||||
}
|
||||
|
||||
$objectListArray = array();
|
||||
foreach ($objectList as $objectRef) {
|
||||
$fileFolderName = @ltrim(substr(str_replace("\\","/",$objectRef->getPathname()), strlen($path)),"/");
|
||||
array_push($objectListArray,$fileFolderName);
|
||||
}
|
||||
}
|
||||
|
||||
// If we're just getting a branch, get that and set as the finalArray
|
||||
@@ -121,7 +126,7 @@ foreach($finalArray as $entry) {
|
||||
for ($i=0;$i<count($_SESSION['bannedFiles']);$i++) {
|
||||
if($_SESSION['bannedFiles'][$i] != "" && strpos($entry,$_SESSION['bannedFiles'][$i])!==false) {$canAdd = false;}
|
||||
}
|
||||
if ("/".$entry == $ICEcoderDir) {
|
||||
if ($docRoot.$iceRoot.$location."/".$entry == $docRoot.$ICEcoderDir) {
|
||||
$canAdd = false;
|
||||
}
|
||||
if ($entry != "." && $entry != ".." && $canAdd) {
|
||||
@@ -147,9 +152,19 @@ for ($i=0;$i<count($finalArray);$i++) {
|
||||
}
|
||||
$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 "<li class=\"".$class."\" draggable=\"false\" ondrag=\"top.ICEcoder.draggingWithKeyTest(event);if(top.ICEcoder.getcMInstance()){top.ICEcoder.editorFocusInstance.indexOf('diff') == -1 ? top.ICEcoder.getcMInstance().focus() : top.ICEcoder.getcMdiffInstance().focus()}\" ondragend=\"top.ICEcoder.dropFile(this)\"><a nohref title=\"$fileFolderName\" onMouseOver=\"parentNode.draggable=true;top.ICEcoder.overFileFolder('$type',this.childNodes[1].id)\" onMouseOut=\"parentNode.draggable=false;top.ICEcoder.overFileFolder('$type','')\" ".
|
||||
|
||||
(($type == "folder")?"ondragover=\"if(parentNode.nextSibling && parentNode.nextSibling.tagName != 'UL' && top.ICEcoder.thisFileFolderLink != this.childNodes[1].id) {top.ICEcoder.openCloseDir(this,true);}\"":"").
|
||||
|
||||
" onClick=\"if(!event.ctrlKey && !top.ICEcoder.cmdKey) {".
|
||||
|
||||
(($type == "folder")?" 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> ";
|
||||
$thisPermVal = $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot.$fileFolderName)), -3) : '';
|
||||
$permColors = $thisPermVal == 777 ? 'background: #800; color: #eee' : 'color: #888';
|
||||
echo '<span style="'.$permColors.'; font-size: 8px" id="'.str_replace($docRoot,"",str_replace("/","|",$fileFolderName)).'_perms">';
|
||||
echo $thisPermVal;
|
||||
echo "</span></a></li>\n";
|
||||
}
|
||||
|
||||
@@ -181,7 +196,7 @@ if ($_SESSION['githubDiff']) {
|
||||
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) {
|
||||
if (strpos($finfo,"text")===0 || strpos($finfo, "application/xml")===0 || strpos($finfo,"empty")!==false) {
|
||||
$contents = str_replace("\r","",$contents);
|
||||
};
|
||||
// Establish the blob SHA contents and push name, SHA and type into 3 arrays
|
||||
@@ -319,61 +334,77 @@ if ($_SESSION['githubDiff']) {
|
||||
x.parentNode.removeChild(x);
|
||||
}
|
||||
folderContent = document.getElementById('branch').innerHTML;
|
||||
folderItems = folderContent.split("\n");
|
||||
|
||||
showFiles = function () {
|
||||
// Now animate folders & files into view
|
||||
i=0;
|
||||
animFolders = setInterval(function() {
|
||||
i++;
|
||||
showFiles = function() {
|
||||
// Now display folders & files
|
||||
|
||||
// Animate into view?
|
||||
if (folderItems.length <= 50) {
|
||||
showFileI=0;
|
||||
animFolders = setInterval(function() {
|
||||
showFileI++;
|
||||
showNextFile('progressive');
|
||||
},4);
|
||||
// Display immediately
|
||||
} else {
|
||||
showFileJ = folderItems.length;
|
||||
showContent = folderContent;
|
||||
showNextFile();
|
||||
}
|
||||
}
|
||||
|
||||
showNextFile = function(progressive) {
|
||||
if (progressive) {
|
||||
showContent = "";
|
||||
folderItems = folderContent.split("\n");
|
||||
for (j=0; j<=i; j++) {
|
||||
showContent += folderItems[j];
|
||||
if (j<i) {showContent += "\n";};
|
||||
for (showFileJ=0; showFileJ<=showFileI; showFileJ++) {
|
||||
showContent += folderItems[showFileJ];
|
||||
if (showFileJ<showFileI) {showContent += "\n";};
|
||||
}
|
||||
showContent = showContent.slice(28);
|
||||
if (j==folderItems.length) {
|
||||
clearInterval(animFolders);
|
||||
showContent = showContent.slice(0,-2);
|
||||
// If we've got some deleted files (as we're in GitHub diff mode), add those into the file manager
|
||||
if ("undefined" != typeof top.deletedPaths && top.deletedPaths.length > 0) {
|
||||
k = 0;
|
||||
top.addDeletedFiles = setInterval(function() {
|
||||
fSplit = top.deletedPaths[k].lastIndexOf("/");
|
||||
thePath = top.deletedPaths[k].substr(0,fSplit);
|
||||
theFile = top.deletedPaths[k].substr(fSplit+1);
|
||||
}
|
||||
showContent = showContent.slice(28);
|
||||
if (showFileJ==folderItems.length) {
|
||||
// If we've been animating into view, clear that interval
|
||||
if ("undefined" != typeof animFolders) {clearInterval(animFolders);};
|
||||
showContent = showContent.slice(0,-2);
|
||||
// If we've got some deleted files (as we're in GitHub diff mode), add those into the file manager
|
||||
if ("undefined" != typeof top.deletedPaths && top.deletedPaths.length > 0) {
|
||||
i = 0;
|
||||
top.addDeletedFiles = setInterval(function() {
|
||||
fSplit = top.deletedPaths[i].lastIndexOf("/");
|
||||
thePath = top.deletedPaths[i].substr(0,fSplit);
|
||||
theFile = top.deletedPaths[i].substr(fSplit+1);
|
||||
|
||||
// If it's not excluded
|
||||
if ("undefined" != typeof excludedArray && excludedArray.indexOf((thePath == "" ? "" : "/" + thePath)+"/"+theFile) == -1) {
|
||||
// If it's not excluded
|
||||
if ("undefined" != typeof excludedArray && excludedArray.indexOf((thePath == "" ? "" : "/" + thePath)+"/"+theFile) == -1) {
|
||||
|
||||
// If we're adding a deleted dir/file in a sub-dir
|
||||
if ("<?php echo $location;?>" == "/"+thePath) {
|
||||
top.ICEcoder.updateFileManagerList('add','/'+thePath,theFile,false,false,false,'file');
|
||||
// If we're adding a deleted dir/file at the root level
|
||||
// If we're adding a deleted dir/file in a sub-dir
|
||||
if ("<?php echo $location;?>" == "/"+thePath) {
|
||||
top.ICEcoder.updateFileManagerList('add','/'+thePath,theFile,false,false,false,'file');
|
||||
// If we're adding a deleted dir/file at the root level
|
||||
} else {
|
||||
// Folder
|
||||
if (thePath != "") {
|
||||
top.ICEcoder.updateFileManagerList('add',top.iceRoot,thePath,false,false,false,'folder');
|
||||
// File
|
||||
} else {
|
||||
// Folder
|
||||
if (thePath != "") {
|
||||
top.ICEcoder.updateFileManagerList('add',top.iceRoot,thePath,false,false,false,'folder');
|
||||
// File
|
||||
} else {
|
||||
top.ICEcoder.updateFileManagerList('add',top.iceRoot+thePath,theFile,false,false,false,'file');
|
||||
}
|
||||
top.ICEcoder.updateFileManagerList('add',top.iceRoot+thePath,theFile,false,false,false,'file');
|
||||
}
|
||||
|
||||
}
|
||||
k++;
|
||||
if ("undefined" == typeof top.deletedPaths[k]) {
|
||||
clearInterval(top.addDeletedFiles);
|
||||
}
|
||||
|
||||
},20);
|
||||
}
|
||||
setTimeout(function(){top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);},4);
|
||||
if (!top.ICEcoder.fmReady) {top.ICEcoder.fmReady=true;};
|
||||
}
|
||||
i++;
|
||||
if ("undefined" == typeof top.deletedPaths[i]) {
|
||||
clearInterval(top.addDeletedFiles);
|
||||
}
|
||||
|
||||
},20);
|
||||
}
|
||||
newUL.innerHTML = showContent;
|
||||
locNest.parentNode.insertBefore(newUL,locNest.nextSibling);
|
||||
},4);
|
||||
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);
|
||||
}
|
||||
|
||||
// If we're not in githubDiff mode, show files here
|
||||
|
||||
@@ -33,4 +33,5 @@ input:focus {
|
||||
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}
|
||||
.githubManager {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
.githubManager .info {font-size: 10px; color: rgba(0,198,255,0.7); cursor: help}
|
||||
@@ -25,7 +25,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
|
||||
if (!is_dir($docRoot.$chosenLocal)) {
|
||||
if (is_writable($docRoot)) {
|
||||
mkdir($docRoot.$chosenLocal, 0705);
|
||||
mkdir($docRoot.$chosenLocal, octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$chosenLocal."');</script>";
|
||||
}
|
||||
@@ -168,7 +168,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="github-manager.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="githubManager">
|
||||
@@ -187,8 +187,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
<form id="githubUpdateForm" action="github-manager.php?action=update" method="POST">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-left: 5px"><?php echo $t['Local path'];?></td>
|
||||
<td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?></td>
|
||||
<td style="padding-left: 5px"><?php echo $t['Local path'];?> <span class="info" title="<?php echo $t['Slash prefixed'];?>">[?]</span></td>
|
||||
<td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?> <span class="info" title="<?php echo $t['Absolute URL beginning...'];?>">[?]</span></td>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i=0; $i<count($pathsLocal); $i++) {
|
||||
@@ -217,8 +217,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
<form id="githubAddForm" action="github-manager.php?action=add" method="POST">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-left: 5px"><?php echo $t['Local path'];?></td>
|
||||
<td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?></td>
|
||||
<td style="padding-left: 5px"><?php echo $t['Local path'];?> <span class="info" title="<?php echo $t['Slash prefixed'];?>">[?]</span></td>
|
||||
<td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?> <span class="info" title="<?php echo $t['Absolute URL beginning...'];?>">[?]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPathNEW" value="" style="width: 250px"></td>
|
||||
|
||||
@@ -23,7 +23,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="github.js"></script>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
</body>
|
||||
<script>
|
||||
top.ICEcoder.githubAuthTokenSet = true;
|
||||
@@ -39,6 +39,39 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
</html>';
|
||||
}
|
||||
|
||||
// ====
|
||||
// READ
|
||||
// ====
|
||||
if ($_GET['action']=="read") {
|
||||
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="underscore-min.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
</body>
|
||||
<script>
|
||||
// Start our github object, establish this repo & file path
|
||||
var github = new Github({token: "'.$_SESSION['githubAuthToken'].'", auth: "oauth"});
|
||||
var thisRepo = "'.$_GET['repo'].'";
|
||||
var thisFilePath = "'.$_GET['filePath'].'";
|
||||
|
||||
// Start our repo and read the data in, then update diff pane with that
|
||||
var repo = github.getRepo(thisRepo.split("|")[0], thisRepo.split("|")[1]);
|
||||
repo.read("master", thisFilePath.replace(/\|/g,"/"), function(err, data) {
|
||||
if (err) {
|
||||
top.ICEcoder.message("There has been an error trying to get that file from GitHub.\n\nGitHub response:\n"+err);
|
||||
} else {
|
||||
cMdiff = top.ICEcoder.getcMdiffInstance();
|
||||
cMdiff.setValue(data);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>';
|
||||
}
|
||||
|
||||
// =====
|
||||
// CLONE
|
||||
// =====
|
||||
@@ -120,8 +153,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub commit files</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<script src="github.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="github.css">
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<link rel="stylesheet" type="text/css" href="github.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="githubAction">
|
||||
@@ -131,7 +164,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
echo $action == "commit" ? "Commit files" : "Pull files"; ?></h1>
|
||||
|
||||
<form name="commitDetails">
|
||||
Title:<br><input type="text" name="commitTitle" id="commitTitle" value="" style="width: 300px; margin: 5px 0 15px 0"><br>
|
||||
Title:<br><input type="text" name="commitTitle" id="commitTitle" value="" style="width: 300px; margin: 5px 0 15px 0" maxlength="50"><br>
|
||||
Message:<br><textarea name="commitMessage" id="commitMessage" style="width: 300px; height: 118px; margin: 5px 0 15px 0"></textarea>
|
||||
</form>
|
||||
|
||||
@@ -234,7 +267,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
?>
|
||||
<script>
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
top.ICEcoder.message("Pull actions not yet available. Will be in ICEcoder v4.3");
|
||||
top.ICEcoder.message("Pull actions not yet available. Will be in available soon!");
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -6,8 +6,10 @@ if(strpos(str_replace("\\","/",dirname(__FILE__)),"tmp/oldVersion") !== false) {
|
||||
|
||||
// Load common functions
|
||||
include_once(dirname(__FILE__)."/settings-common.php");
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['headers'];
|
||||
if (isset($_SESSION['text'])) {
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['headers'];
|
||||
}
|
||||
|
||||
// CSRF synchronizer token pattern, 32 chars
|
||||
if (!isset($_SESSION["csrf"])) {
|
||||
@@ -25,9 +27,14 @@ if (($_GET || $_POST) && (!isset($_REQUEST["csrf"]) || $_REQUEST["csrf"] !== $_S
|
||||
POST: ".xssClean(var_export($_POST, true),"html"));
|
||||
}
|
||||
|
||||
// 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
|
||||
if (!headers_sent()) {
|
||||
// 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
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate'); // Caching over HTTP 1.1 covered
|
||||
header('Pragma: no-cache'); // Caching over HTTP 1.0 covered
|
||||
header('Expires: 0'); // Caching over Proxies covered
|
||||
}
|
||||
?>
|
||||
@@ -29,5 +29,5 @@ a {color: #fff; text-decoration: none}
|
||||
.help {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
.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}
|
||||
.shortcut {display: inline-block; width: 195px; color: #888; margin-left: 5px; float: left}
|
||||
.info {font-size: 10px; color: rgba(0,198,255,0.7); cursor: help}
|
||||
20
lib/help.php
20
lib/help.php
@@ -10,7 +10,7 @@ $t = $text['help'];
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</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="help.css">
|
||||
<link rel="stylesheet" type="text/css" href="help.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="help">
|
||||
@@ -18,7 +18,7 @@ $t = $text['help'];
|
||||
<h1 id="title"><?php echo $t['shortcuts'];?></h1>
|
||||
|
||||
<?php $isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false;?>
|
||||
<div style="display: inline-block; width: 365px; margin-right: 20px">
|
||||
<div style="display: inline-block; width: 385px; margin-right: 20px">
|
||||
<h2><?php echo $t['Within document'];?></h2>
|
||||
<!-- This can only be CTRL+space as Cmd+space is a reserved apple shortcut -->
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> <?php echo $t['Space'];?></span> <span class="shortcut"><?php echo $t['Autocomplete add snippet'];?></span><br>
|
||||
@@ -33,6 +33,8 @@ $t = $text['help'];
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> j</span> <span class="shortcut"><?php echo $t['Jump to definition'];?></span><br>
|
||||
<span class="key">Esc</span> <span class="shortcut"><?php echo $t['Comment uncomment'];?></span><br>
|
||||
<span class="key">Tab</span> <span class="shortcut"><?php echo $t['Insert tab indent'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> [</span> <span class="shortcut"><?php echo $t['Insert less'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> ]</span> <span class="shortcut"><?php echo $t['Insert more'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> d</span> <span class="shortcut"><?php echo $t['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"><?php echo $t['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"><?php echo $t['Wrap unwrap p'];?></span><br>
|
||||
@@ -43,19 +45,18 @@ $t = $text['help'];
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> e</span> <span class="shortcut"><?php echo $t['Wrap unwrap em'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> 8</span> <span class="shortcut"><?php echo $t['Wrap unwrap li'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> 1, 2 <?php echo $t['or'];?> 3</span> <span class="shortcut"><?php echo $t['Wrap unwrap h1...'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['End line with...'];?></span><br><br>
|
||||
<h2><?php echo $t['On Tabs'];?></h2>
|
||||
<span class="key"><?php echo $t['Middle click'];?></span> <span class="shortcut"><?php echo $t['Close tab'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['End line with...'];?></span><br>
|
||||
</div>
|
||||
|
||||
<div style="display: inline-block; width: 365px">
|
||||
<div style="display: inline-block; width: 385px">
|
||||
<h2><?php echo $t['Within file manager'];?></h2>
|
||||
<span class="key"><?php echo $t['Left click'];?></span> <span class="shortcut"><?php echo $t['Select file folder'];?></span><br>
|
||||
<span class="key"><?php echo $t['Double click tap...'];?></span> <span class="shortcut"><?php echo $t['Open file'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> <?php echo strtolower($t['Left click']);?></span> <span class="shortcut"><?php echo $t['Multiple select'];?></span><br>
|
||||
<span class="key">Shift <span class="plus">+</span> <?php echo strtolower($t['Left click']);?></span> <span class="shortcut"><?php echo $t['Range select'];?></span><br>
|
||||
<span class="key"><?php echo $t['Right click'];?></span> <span class="shortcut"><?php echo $t['Options for selected'];?></span><br>
|
||||
<span class="key">Delete</span> <span class="shortcut"><?php echo $t['Delete selected'];?></span><br><br>
|
||||
<span class="key">Delete</span> <span class="shortcut"><?php echo $t['Delete selected'];?></span><br>
|
||||
<span class="key">← → ↑ ↓, Enter</span> <span class="shortcut">Move around file manager, open</span><br><br>
|
||||
|
||||
<h2><?php echo $t['Anywhere'];?></h2>
|
||||
<span class="key"><?php echo $t['Middle scrollwheel'];?></span> <span class="shortcut"><?php echo $t['Next previous tab'];?></span><br>
|
||||
@@ -71,8 +72,11 @@ $t = $text['help'];
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['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"><?php echo $t['Contract expand file...'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> .</span> <span class="shortcut"><?php echo $t['Fold unfold current...'];?></span><br>
|
||||
<span class="key"><?php echo $t['Space'];?></span> <span class="shortcut"><?php echo $t['Refocus on document'];?></span><br>
|
||||
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> ← / →</span> <span class="shortcut">Focus on file manager / content<!--<?php echo $t['Refocus on document'];?>//--></span><br>
|
||||
<span class="key">Esc</span> <span class="shortcut"><?php echo $t['Cancel tasks'];?></span><br><br>
|
||||
|
||||
<h2><?php echo $t['On Tabs'];?></h2>
|
||||
<span class="key"><?php echo $t['Middle click'];?></span> <span class="shortcut"><?php echo $t['Close tab'];?></span><br>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -56,7 +56,9 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
|
||||
.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 {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;
|
||||
transition: background 0.2s ease-out;
|
||||
}
|
||||
.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}
|
||||
@@ -71,7 +73,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
.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 {position: absolute; display: inline-block; visibility: hidden; background: #383838; 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}
|
||||
@@ -86,7 +88,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
|
||||
.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;
|
||||
.tabsBar .tab {position: absolute; display: none; height: 15px; padding: 5px 8px 2px 9px; border-right: 1px solid #ddd; 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;
|
||||
}
|
||||
@@ -105,7 +107,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
.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}
|
||||
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #141612}
|
||||
.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;
|
||||
@@ -133,7 +135,9 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
|
||||
.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 .splitPaneControls {position: absolute; display: inline-block; width: 50px; text-align: center; padding: 6px}
|
||||
.footer .splitPaneControls .off {display: inline-block; width: 18px; height: 18px; margin-right: 10px; background: url('../images/split-pane-controls.gif') no-repeat 0 0; cursor: pointer}
|
||||
.footer .splitPaneControls .on {display: inline-block; width: 19px; height: 18px; background: url('../images/split-pane-controls.gif') no-repeat -18px 0; cursor: pointer}
|
||||
.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;
|
||||
@@ -147,6 +151,12 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
.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 .trialBarContainer {display: inline-block; width: 170px; height: 8px; color: #bbb; background: #0b0b0b; text-align: right; margin-bottom: 40px}
|
||||
.screenCenter .trialBarRemaining {display: inline-block; width: 170px; height: 8px; background: rgba(0,198,255,0.7); box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
transition: width 0.7s ease-in-out;
|
||||
}
|
||||
.screenCenter .trialBarText {text-align: center}
|
||||
.screenCenter .trialBarText a {color: #fff; text-decoration: none}
|
||||
.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}
|
||||
|
||||
1433
lib/ice-coder.js
1433
lib/ice-coder.js
File diff suppressed because it is too large
Load Diff
260
lib/ice-coder.min.js
vendored
260
lib/ice-coder.min.js
vendored
@@ -1,122 +1,156 @@
|
||||
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,githubAuthTokenSet:!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 li".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(top.t["No text selected..."])},
|
||||
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,b){var c,d,e,f,g,m;if(""==top.ICEcoder.thisFileFolderLink)b||a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink)if(d=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),c=ICEcoder.filesFrame.contentWindow.document.getElementById(d),b||a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(d)?(ICEcoder.selectDeselectFile("deselect",c),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(d),
|
||||
1)):(ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d));else if(a.shiftKey){var h=function(a,b,c,d){return("00000000000000000000"+a).substr(-20)};e=!1;f=c.parentNode.parentNode.parentNode;g=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];m=d.replace(/\d+/g,h)<g.replace(/\d+/g,h)?d:g;g=d.replace(/\d+/g,h)>g.replace(/\d+/g,h)?d:g;if(0<top.ICEcoder.selectedFiles.length&&m.substr(0,m.lastIndexOf("|"))==g.substr(0,g.lastIndexOf("|")))for(d=0;1E6>d&&("LI"!=f.childNodes[d].nodeName&&
|
||||
d++,c=f.childNodes[d].childNodes[0].childNodes[1],c.id==m&&(e=!0),1==e&&-1==top.ICEcoder.selectedFiles.indexOf(c.id)&&(ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(c.id)),c.id!=g);d+=2);else ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d);top.ICEcoder.githubDiff&&(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,
|
||||
top.get("githubNavCommit").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavCommit").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555",top.get("githubNavSelectedCount").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555");document.findAndReplace.target[2].innerHTML=
|
||||
top.ICEcoder.selectedFiles[0]?top.t["selected files"]:top.t["all files"];document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected filenames"]:top.t["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>"+top.t["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(top.t["Sorry you can..."]),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>"+top.t["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(top.t["Enter relative file..."],""))-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>"+top.t.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>"+top.t.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-
|
||||
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,scrollbarVisible:!1,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,previewWindowLoading:!1,pluginIntervalRefs:[],overPopup:!1,cmdKey:!1,fmReady:!1,bugReportStatus:"off",bugReportPath:"",bugFilesSizesSeen:[],bugFilesSizesActual:[],githubDiff:!1,githubAuthTokenSet:!1,splitPane:!1,renderLineStyle:[],renderPaneShiftAmount:0,debounce:"",editorFocusInstance:"",ready:!1,initAliases:function(){for(var a="header files fileOptions optionsFile optionsEdit optionsSource optionsHelp filesFrame editor tabsBar findBar content footer nestValid splitPaneControls charDisplay byteDisplay".split(" "),
|
||||
b=0;b<a.length;b++)ICEcoder[a[b]]=top.get(a[b])},init:function(){top.ICEcoder.lockedNav||(top.ICEcoder.filesW=ICEcoder.minFilesW);ICEcoder.setLayout();top.ICEcoder.overFileFolder("folder","|");top.ICEcoder.selectFileFolder("init");top.ICEcoder.filesFrame.contentWindow.focus();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.optionsSource.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.splitPaneControls.style.left=parseInt((b-this.filesW)/2,10)-25-4+this.filesW+"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.splitPane?(top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]+"diff"].setSize("50%",top.ICEcoder.content.style.height),top.ICEcoder.content.contentWindow["cM"+
|
||||
ICEcoder.cMInstances[a]].setSize("50%",top.ICEcoder.content.style.height)):(top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize("100%",top.ICEcoder.content.style.height),top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]+"diff"].setSize("0",top.ICEcoder.content.style.height));top.ICEcoder.splitPane?top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=top.ICEcoder.scrollBarVisible?parseInt(parseInt(ICEcoder.content.style.width,10)/2,
|
||||
10)+17+"px":parseInt(parseInt(ICEcoder.content.style.width,10)/2,10)+"px":top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=top.ICEcoder.scrollBarVisible?"17px":"0"},4))},setSplitPane:function(a){var b;top.ICEcoder.splitPane="on"==a?!0:!1;top.get("splitPaneControlsOff").style.opacity=top.ICEcoder.splitPane?.5:1;top.get("splitPaneControlsOn").style.opacity=top.ICEcoder.splitPane?1:.5;top.ICEcoder.setLayout();if(top.ICEcoder.splitPane)top.ICEcoder.updateDiffs();else{b=
|
||||
top.ICEcoder.getcMInstance();a=top.ICEcoder.getcMdiffInstance();cMmarks=b.getAllMarks();for(b=0;b<cMmarks.length;b++)cMmarks[b].clear();cMdiffMarks=a.getAllMarks();for(b=0;b<cMdiffMarks.length;b++)cMdiffMarks[b].clear()}},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.ICEcoder.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")},cMonFocus:function(a,b){top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.editorFocusInstance=b;top.ICEcoder.getCaretPosition()},cMonBlur:function(a,b){},cMonKeyUp:function(a,
|
||||
b){"undefined"!=typeof top.doFind&&clearInterval(top.doFind);top.doFind=setTimeout(function(){top.ICEcoder.findReplace(top.get("find").value,!0,!1)},500);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()},cMonCursorActivity:function(a,b){var c;top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();a.removeLineClass(top.ICEcoder["cMActiveLine"+b],"background");a.getCursor("start").line==a.getCursor().line&&(top.ICEcoder["cMActiveLine"+
|
||||
b]=a.addLineClass(a.getCursor().line,"background","cm-s-activeLine"));"CSS"==top.ICEcoder.caretLocType&&top.ICEcoder.cssColorPreview();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.prevLineDiff:top.ICEcoder.prevLine;c!=a.getCursor().line&&a.getLine(c)&&0<a.getLine(c).length&&0==a.getLine(c).replace(/\s/g,"").length&&a.replaceRange("",{line:c,ch:0},{line:c,ch:1E6});setTimeout(function(){for(var c,e=0;e<top.ICEcoder.renderLineStyle.length;e++){c=!1;if("diff"!=top.ICEcoder.renderLineStyle[e][0]&&
|
||||
-1==b.indexOf("diff")||"diff"==top.ICEcoder.renderLineStyle[e][0]&&-1<b.indexOf("diff"))c=!0;c&&a.getCursor().line+1==top.ICEcoder.renderLineStyle[e][1]?a.setOption("cursorHeight",a.defaultTextHeight()/a.lineInfo(a.getCursor().line).handle.height):a.setOption("cursorHeight",1)}},0)},cMonChange:function(a,b,c){var d,e;top.ICEcoder.loadingFile||top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);setTimeout(function(){top.ICEcoder.scrollBarVisible=a.getScrollInfo().height>a.getScrollInfo().clientHeight;
|
||||
top.ICEcoder.setLayout()},0);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.updateNestingIndicator();top.ICEcoder.findMode&&(top.ICEcoder.results.splice(top.ICEcoder.findResult,1),top.get("results").innerHTML=top.ICEcoder.results.length+" "+top.t.results,top.ICEcoder.findMode=!1);if(b=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]){d=b.substr(b.lastIndexOf("/")+1);e=d.substr(d.lastIndexOf(".")+1);for(var f=c.from.line;f<c.from.line+
|
||||
c.text.length;f++)top.ICEcoder.content.contentWindow.CodeMirror.doFold(-1<a.getLine(f).indexOf("{")?"brace":"xml",null,"+","-",!0)(a,f);if("}"==c.text[0]||c.removed&&"}"==c.removed[0])for(cursor=a.getSearchCursor("{",a.getCursor(),!1),cursor.findPrevious(),f=cursor.from().line;f<a.getCursor().line;f++)top.ICEcoder.content.contentWindow.CodeMirror.doFold(-1<a.getLine(f).indexOf("{")?"brace":"xml",null,"+","-",!0)(a,f)}top.ICEcoder.splitPane&&top.ICEcoder.updateDiffs();b&&top.ICEcoder.previewWindow.location&&
|
||||
top.ICEcoder.updatePreviewWindow(a,b,d,e);top.ICEcoder.indicateChanges()},cMonScroll:function(a,b){var c,d;c=top.ICEcoder.getcMInstance();d=top.ICEcoder.getcMdiffInstance();c=-1<b.indexOf("diff")?c:d;top.ICEcoder.mouseDown=!1;c.scrollTo(a.getScrollInfo().left,a.getScrollInfo().top)},cMonInputRead:function(a,b){"keypress"==top.ICEcoder.autoComplete&&top.ICEcoder.codeAssist&&(a.state.completionActive||top.ICEcoder.autocomplete())},cMonRenderLine:function(a,b,c,d){for(var e,f=0;f<top.ICEcoder.renderLineStyle.length;f++){e=
|
||||
!1;if("diff"!=top.ICEcoder.renderLineStyle[f][0]&&-1==b.indexOf("diff")||"diff"==top.ICEcoder.renderLineStyle[f][0]&&-1<b.indexOf("diff"))e=!0;e&&a.lineInfo(c).line+1==top.ICEcoder.renderLineStyle[f][1]&&(d.style[top.ICEcoder.renderLineStyle[f][2]]=top.ICEcoder.renderLineStyle[f][3])}},updateDiffs:function(){var a,b,c,d,e;top.ICEcoder.renderLineStyle=[];top.ICEcoder.renderPaneShiftAmount=0;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();c=a?difflib.stringAsLines(a.getValue()):"";
|
||||
d=b?difflib.stringAsLines(b.getValue()):"";c=(new difflib.SequenceMatcher(c,d)).get_opcodes();if(a){e=a.getAllMarks();for(d=0;d<e.length;d++)e[d].clear();e=b.getAllMarks();for(d=0;d<e.length;d++)e[d].clear()}if(a&&""!=b.getValue())for(d=0;d<c.length;d++)if("equal"!==c[d][0]){if("replace"==c[d][0]){e=(c[d][4]-c[d][2]+1+top.ICEcoder.renderPaneShiftAmount)*a.defaultTextHeight();e>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",e+"px"]);for(var f=0;f<c[d][2]-c[d][1];f++)e=
|
||||
top.ICEcoder.findStringDiffs(a.getLine(c[d][1]+f),b.getLine(c[d][3]+f)),a.markText({line:c[d][1]+f,ch:0},{line:c[d][3]+f+top.ICEcoder.renderPaneShiftAmount,ch:e[0]},{className:"diffGreyLighter"}),a.markText({line:c[d][1]+f,ch:e[0]},{line:c[d][3]+f+top.ICEcoder.renderPaneShiftAmount,ch:e[0]+e[1]},{className:"diffGrey"}),a.markText({line:c[d][1]+f,ch:e[0]+e[1]},{line:c[d][3]+f+top.ICEcoder.renderPaneShiftAmount,ch:1E6},{className:"diffGreyLighter"})}else a.markText({line:c[d][1],ch:0},{line:c[d][2]-
|
||||
1,ch:1E6},{className:"diffGreen"});"replace"!=c[d][0]&&c[d][1]==c[d][2]&&(top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",(c[d][4]-c[d][3]+1)*a.defaultTextHeight()+"px"]),a.markText({line:c[d][2]-1,ch:0},{line:c[d][2]-1,ch:1E6},{className:"diffNone"}));if("replace"==c[d][0])for(e=(c[d][2]-c[d][4]+1-top.ICEcoder.renderPaneShiftAmount)*a.defaultTextHeight(),e>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",e+"px"]),f=0;f<c[d][4]-c[d][3];f++)e=top.ICEcoder.findStringDiffs(a.getLine(c[d][1]+
|
||||
f),b.getLine(c[d][3]+f)),b.markText({line:c[d][1]+f-top.ICEcoder.renderPaneShiftAmount,ch:0},{line:c[d][3]+f,ch:e[0]},{className:"diffGreyLighter"}),b.markText({line:c[d][1]+f-top.ICEcoder.renderPaneShiftAmount,ch:e[0]},{line:c[d][3]+f,ch:e[0]+e[2]},{className:"diffGrey"}),b.markText({line:c[d][1]+f-top.ICEcoder.renderPaneShiftAmount,ch:e[0]+e[2]},{line:c[d][3]+f,ch:1E6},{className:"diffGreyLighter"});else b.markText({line:c[d][3],ch:0},{line:c[d][4]-1,ch:1E6},{className:"diffRed"});"replace"!=c[d][0]&&
|
||||
c[d][3]==c[d][4]&&(top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",(c[d][2]-c[d][1]+1)*a.defaultTextHeight()+"px"]),b.markText({line:c[d][4]-1,ch:0},{line:c[d][4]-1,ch:1E6},{className:"diffNone"}));top.ICEcoder.renderPaneShiftAmount=c[d][2]-c[d][4]}},findStringDiffs:function(a,b){"undefined"==typeof a&&(a="");"undefined"==typeof b&&(b="");for(var c=0,d=a.length,e=b.length;a[c]&&a[c]==b[c];c++);for(;d>c&e>c&a[d-1]==b[e-1];d--)e--;return[c,d-c,e-c]},updatePreviewWindow:function(a,b,c,d){top.ICEcoder.previewWindow.location.pathname==
|
||||
b?-1<["htm","html","txt"].indexOf(d)?top.ICEcoder.previewWindow.document.documentElement.innerHTML=a.getValue():-1<["md"].indexOf(d)&&(top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())):-1<["css"].indexOf(d)&&-1<top.ICEcoder.previewWindow.document.documentElement.innerHTML.indexOf(c)&&(a=a.getValue(),c=document.createElement("style"),c.type="text/css",c.id="ICEcoder"+b.replace(/\//g,"_"),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),top.ICEcoder.previewWindow.document.getElementById(c.id)&&
|
||||
top.ICEcoder.previewWindow.document.documentElement.removeChild(top.ICEcoder.previewWindow.document.getElementById(c.id)),top.ICEcoder.previewWindow.document.documentElement.appendChild(c));try{top.ICEcoder.doPesticide()}catch(e){}try{top.ICEcoder.doStatsJS("update")}catch(f){}},contentCleanUp:function(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;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(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a).undo()},redo:function(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a).redo()},indent:function(a){var b,c;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
c:b;"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,g,k;b=top.ICEcoder.getcMInstance();c=top.ICEcoder.getcMdiffInstance();d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;e=d.getCursor("start");f=d.getCursor("end");"up"==a&&0<e.line&&(g=e.line-1);"down"==a&&f.line<d.lineCount()-1&&(g=f.line+1);isNaN(g)||(k=d.getLine(g),d.operation(function(){if("up"==a)for(var b=
|
||||
e.line;b<=f.line;b++)d.replaceRange(d.getLine(b),{line:b-1,ch:0},{line:b-1,ch:1E6});else for(b=f.line;b>=e.line;b--)d.replaceRange(d.getLine(b),{line:b+1,ch:0},{line:b+1,ch:1E6});d.replaceRange(k,{line:"up"==a?f.line:e.line,ch:0},{line:"up"==a?f.line:e.line,ch:1E6});d.setSelection({line:e.line+("up"==a?-1:1),ch:e.ch},{line:f.line+("up"==a?-1:1),ch:f.ch})}))},highlightLine:function(a){var b,c;b=top.ICEcoder.getcMInstance();c=top.ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
c:b;b.setSelection({line:a,ch:0},{line:a,ch:b.lineInfo(a).text.length})},focus:function(a){var b,c;/iPhone|iPad|iPod/i.test(navigator.userAgent)||(b=top.ICEcoder.getcMInstance(),c=top.ICEcoder.getcMdiffInstance(),(a=a?c:b)&&a.focus())},goToLine:function(a){var b,c;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b).setCursor(a?a-1:top.get("goToLineNo").value-1);top.ICEcoder.focus();setTimeout(function(){top.ICEcoder.focus()},0);return!1},
|
||||
lineCommentToggle:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getCursor().ch;c=a.getCursor().line;d=a.getLine(c);ICEcoder.lineCommentToggleSub(a,b,c,d,d.length)},tagWrapper:function(a){var b,c,d,e,f;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;b=a;"div"==a?(e=d.getCursor("start").line,f=d.getCursor().line,d.operation(function(){d.replaceSelection("<div>\n"+
|
||||
d.getSelection()+"\n</div>","around");for(var a=e+1;a<=f+1;a++)d.indentLine(a);d.indentLine(f+2,"prev");d.indentLine(f+2,"subtract")})):-1<"p a b i strong em h1 h2 h3 li".split(" ").indexOf(a)&&d.getSelection().substr(0,a.length+1)=="<"+b&&d.getSelection().substr(-(a.length+3))=="</"+a+">"?d.replaceSelection(d.getSelection().substr(d.getSelection().indexOf(">")+1,d.getSelection().length-d.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(b='a href=""'),d.replaceSelection("<"+b+">"+d.getSelection()+
|
||||
"</"+a+">","around"),"a"==a&&d.setCursor({line:d.getCursor("start").line,ch:d.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b,c;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;a||(a=b.getCursor().line);b.replaceRange(b.getLine(a)+"<br>",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b,c,d;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
c:b;a||(a=d.getCursor().line);d.operation(function(){d.replaceRange("\n"+d.getLine(a),{line:a,ch:0},{line:a,ch:1E6});d.setCursor({line:d.getCursor().line-1,ch:0});d.execCommand("indentAuto")})},insertLineAfter:function(a){var b,c,d;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;a||(a=d.getCursor().line);d.operation(function(){d.replaceRange(d.getLine(a)+"\n",{line:a,ch:0},{line:a,ch:1E6});d.execCommand("indentAuto")})},duplicateLines:function(a){var b,
|
||||
c,d;b=ICEcoder.getcMInstance();c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;!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();c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;!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=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;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,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
b:a;top.ICEcoder.content.contentWindow.CodeMirror.commands.autocomplete(a)},pasteURL:function(a){var b,c;b=top.ICEcoder.getcMInstance();c=top.ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;"CTRL"==top.ICEcoder.draggingWithKey&&(a=window.location.protocol+"//"+window.location.hostname+a);b.replaceSelection(a,"around")},searchForSelected:function(){var a,b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
b:a;top.ICEcoder.caretLocType&&(""!=a.getSelection()?(b=top.ICEcoder.caretLocType.toLowerCase()+" ","Content"==top.ICEcoder.caretLocType&&(b=""),window.open("http://www.google.com/#output=search&q="+b+a.getSelection())):top.ICEcoder.message(top.t["No text selected..."]))},fmAction:function(a,b){var c,d,e,f;c=top.get("filesFrame").contentWindow.document.getElementById(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1]+"_perms").parentNode;d=c.parentNode;e=-1<c.onmouseover.toString().indexOf("'folder'")?
|
||||
"folder":"file";f=!1;"up"==b&&(d.previousSibling&&d.previousSibling.previousSibling?(f=d.previousSibling.previousSibling,"UL"==f.tagName&&(f=f.childNodes[f.childNodes.length-1])):d.parentNode.previousSibling&&(f=d.parentNode.previousSibling),f&&(f=f.childNodes[0]));"down"==b&&(d.nextSibling&&d.nextSibling.childNodes[0]?f=d.nextSibling.childNodes[0]:d.nextSibling&&d.nextSibling.nextSibling?f=d.nextSibling.nextSibling:d.parentNode.nextSibling&&(f=d.parentNode.nextSibling.nextSibling),f&&(f=f.childNodes[0]));
|
||||
"left"==b&&"folder"==e&&d.parentNode.previousSibling&&top.ICEcoder.openCloseDir(c,!1);if("right"==b||"enter"==b)"folder"==e?top.ICEcoder.openCloseDir(c,!0):top.ICEcoder.openFile(c.childNodes[1].id.replace(/\|/g,"/"));f&&f.childNodes[1]&&(top.ICEcoder.overFileFolder(e,f.childNodes[1].id),top.ICEcoder.selectFileFolder(a))},openCloseDir:function(a,b){var c,d;a.onclick=function(a){a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.openCloseDir(this,!b)};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:"UL"==c.tagName&&c.parentNode.removeChild(c);return!1},overFileFolder:function(a,b){ICEcoder.thisFileFolderType=a;ICEcoder.thisFileFolderLink=b},selectFileFolder:function(a,b,c){var d,e,f;if(""==top.ICEcoder.thisFileFolderLink)b||
|
||||
a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink)if(e=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),d=top.ICEcoder.filesFrame.contentWindow.document.getElementById(e),b||a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(e)?(ICEcoder.selectDeselectFile("deselect",d),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(e),1)):(ICEcoder.selectDeselectFile("select",d),top.ICEcoder.selectedFiles.push(e));else if(c||
|
||||
a.shiftKey){var g=function(a,b,c,d){return("00000000000000000000"+a).substr(-20)};a=!1;b=d.parentNode.parentNode.parentNode;f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];c=e.replace(/\d+/g,g)<f.replace(/\d+/g,g)?e:f;f=e.replace(/\d+/g,g)>f.replace(/\d+/g,g)?e:f;if(0<top.ICEcoder.selectedFiles.length&&c.substr(0,c.lastIndexOf("|"))==f.substr(0,f.lastIndexOf("|")))for(e=0;1E6>e&&("LI"!=b.childNodes[e].nodeName&&e++,d=b.childNodes[e].childNodes[0].childNodes[1],d.id==c&&(a=!0),1==
|
||||
a&&-1==top.ICEcoder.selectedFiles.indexOf(d.id)&&(ICEcoder.selectDeselectFile("select",d),top.ICEcoder.selectedFiles.push(d.id)),d.id!=f);e+=2);else ICEcoder.selectDeselectFile("select",d),top.ICEcoder.selectedFiles.push(e)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",d),top.ICEcoder.selectedFiles.push(e);top.ICEcoder.githubDiff&&(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,top.get("githubNavCommit").style.color=0<top.ICEcoder.selectedFiles.length?
|
||||
"#fff":"#333",top.get("githubNavCommit").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555",top.get("githubNavSelectedCount").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555");document.findAndReplace.target[2].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected files"]:top.t["all files"];
|
||||
document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected filenames"]:top.t["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)},boxSelect:function(a,b){var c,d;c=top.ICEcoder.filesFrame.contentWindow.document.getElementById("fmDragBox");
|
||||
"down"==b&&(top.ICEcoder.fmDragBoxStartX=top.ICEcoder.mouseX,top.ICEcoder.fmDragBoxStartY=top.ICEcoder.mouseY,top.ICEcoder.fmDragSelectFirst="",top.ICEcoder.fmDragSelectLast="");top.ICEcoder.mouseDown&&"drag"==b&&(top.ICEcoder.fmDraggedBox=!0,d=0<top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX,c.style.left=(d?top.ICEcoder.fmDragBoxStartX:top.ICEcoder.mouseX)+"px",c.style.width=Math.abs(top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX)+"px",d=0<top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY,c.style.top=
|
||||
(d?top.ICEcoder.fmDragBoxStartY-70:top.ICEcoder.mouseY-70)+"px",c.style.height=Math.abs(top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY)+"px",""!=top.ICEcoder.thisFileFolderLink&&(""==top.ICEcoder.fmDragSelectFirst?(top.ICEcoder.fmDragSelectFirst=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectFirst),top.ICEcoder.selectFileFolder(a)):(top.ICEcoder.fmDragSelectLast=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<
|
||||
top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectLast),top.ICEcoder.selectFileFolder(a,!1,"shiftSim"))));"up"==b&&(c.style.width=0,c.style.height=0)},newFile:function(){top.ICEcoder.newTab("alsoSave")},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-xhr.php?action=newFolder&csrf="+
|
||||
top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+"</b><br>"+b)},openFile:function(a){var b,c=1;"undefined"!=typeof a&&(b=/^([^ ]*)\s+(on\s+)?(line\s+)?(\d+)/.exec(a),null!==b?(c=b[4],a=b[1]):0<a.indexOf(":")?(c=a.split(":")[1],a=a.split(":")[0]):0<a.indexOf("(")&&0<a.indexOf(")")&&(c=a.split("(")[1].split(")")[0],a=a.split("(")[0]));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),1<c&&top.ICEcoder.goToLine(c)):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),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+"&lineNumber="+c),top.ICEcoder.serverMessage("<b>"+top.t["Opening File"]+"</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab("new"),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(top.t["Enter relative file..."],""))-1<a.indexOf("://")?top.ICEcoder.getRemoteFile(a):top.ICEcoder.openFile(a)},getRemoteFile:function(a){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=getRemoteFile&csrf="+top.ICEcoder.csrf,a);top.ICEcoder.serverMessage("<b>"+top.t.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-xhr.php?action=save&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+a+"&csrf="+top.ICEcoder.csrf,b);top.ICEcoder.serverMessage("<b>"+top.t.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(top.t["Please enter the..."],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>"+top.t["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]=
|
||||
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-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf,b),top.ICEcoder.serverMessage("<b>"+top.t["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>"+top.t["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>"+top.t["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>"+top.t["Pasting File"]+"</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},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(top.iceRoot,"").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,"/");b=b.replace("//","/");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+"',this.childNodes[1].id)\" onMouseOut=\"top.ICEcoder.overFileFolder('"+g+"','')\" onClick=\"if(!event.ctrlKey && !top.ICEcoder.cmdKey) {top.ICEcoder.openCloseDir(this,"+("folder"==g?"true":"false")+'); if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}" 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&&(b||(b=""),b=b.replace(top.iceRoot,"/"),b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).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.contentWindow.location.reload();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=
|
||||
document.findAndReplace.connector.value==top.t.and?"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&&document.findAndReplace.target.value==top.t["this document"]){a.getValue().toLowerCase();document.findAndReplace.connector.value==top.t.and&&c&&(document.findAndReplace.replaceAction.value==top.t.replace&&a.getSelection().toLowerCase()==d?a.replaceSelection(e,"around"):document.findAndReplace.replaceAction.value==
|
||||
top.t["replace all"]&&(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="",document.findAndReplace.connector.value==
|
||||
top.t.and&&(a="&replace="+e),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(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>"+
|
||||
top.t["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),top.ICEcoder.ask("Are you sure you want to move file "+a+" to "+b+" ?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage("<b>"+top.t["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-xhr.php?action=delete&&csrf="+top.ICEcoder.csrf,a.join(";")),top.ICEcoder.serverMessage("<b>"+top.t["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-xhr.php?action=paste&location="+a+"&csrf="+top.ICEcoder.csrf,top.ICEcoder.copiedFiles[b]),top.ICEcoder.serverMessage("<b>"+top.t["Pasting File"]+"</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},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","optionsSource","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)},isPathFolder:function(a){a=top.ICEcoder.filesFrame.contentDocument.getElementsByClassName("pft-directory");
|
||||
for(var b=top.ICEcoder.selectedFiles[0],c,d=0;d<a.length;d++)if(c=a[d],"underfined"!=typeof c&&(c=c.childNodes[0],"undefined"!=typeof c&&(c=c.childNodes[1],"undefined"!=typeof c&&b===c.getAttribute("id"))))return!0;return!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=this.isPathFolder(top.ICEcoder.selectedFiles[0])?"folder":"file",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 k,h,l,p,n,m,t;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//","/");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));l=h.parentNode.parentNode.nextSibling;
|
||||
p=document.createTextNode("\n");n=777==d?"background: #800; color: #eee":"color: #888";n='<a nohref title="'+b.replace(/\/$/,"")+"/"+c+'" onMouseOver="parentNode.draggable=true;top.ICEcoder.overFileFolder(\''+g+"',this.childNodes[1].id)\" onMouseOut=\"parentNode.draggable=false;top.ICEcoder.overFileFolder('"+g+"','')\" "+("folder"==g?"ondragover=\"if(parentNode.nextSibling && parentNode.nextSibling.tagName != 'UL' && top.ICEcoder.thisFileFolderLink != this.childNodes[1].id) {top.ICEcoder.openCloseDir(this,true);}\"":
|
||||
"")+' onClick="if(!event.ctrlKey && !top.ICEcoder.cmdKey) {'+("folder"==g?"top.ICEcoder.openCloseDir(this,"+("folder"==g?"true":"false")+");":"")+' if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}" style="position: relative; left:-22px"> <span id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'">'+c+'</span> <span style="'+n+'; font-size: 8px" id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'_perms">'+
|
||||
d+"</span></a>";if(3>l.childNodes.length)m=document.createElement("ul"),l=h.parentNode.parentNode,l.parentNode.insertBefore(m,l.nextSibling),m=document.createElement("li"),m.className=k,m.draggable=!1,m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())},m.ondragend=function(){top.ICEcoder.dropFile(this)},m.innerHTML=n,l.nextSibling.appendChild(m),
|
||||
l.nextSibling.appendChild(p);else for(h=0;h<l.childNodes.length;h++)if(l.childNodes[h].className&&(m=0<l.childNodes[h].className.indexOf("directory")?"folder":"file",t=l.childNodes[h].getElementsByTagName("span")[0].innerHTML,m==g&&t>c||"folder"==g&&"file"==m||h==l.childNodes.length-1)){m=document.createElement("li");m.className=k;m.draggable=!1;m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():
|
||||
top.ICEcoder.getcMdiffInstance().focus())};m.ondragend=function(){top.ICEcoder.dropFile(this)};m.innerHTML=n;h==l.childNodes.length-1?(l.appendChild(m),l.appendChild(p)):(l.insertBefore(m,l.childNodes[h]),l.insertBefore(p,l.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.style.background=
|
||||
777==d?"#800":"none",h.style.color=777==d?"#eee":"#888",h.innerHTML=d);"delete"==a&&(b||(b=""),b=b.replace(top.iceRoot,"/"),b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).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.contentWindow.location.reload(!0);
|
||||
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=document.findAndReplace.connector.value==top.t.and?"inline-block":"none"},findReplace:function(a,b,c,d){if(d)top.get("find").value=top.get("find").value,top.ICEcoder.focus();else{var e,f,g;a=a.toLowerCase();e=top.get("replace").value;f=top.get("results");d=ICEcoder.getcMInstance();g=ICEcoder.getcMdiffInstance();if((d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?g:d)&&0<a.length&&document.findAndReplace.target.value==top.t["this document"]){d.getValue().toLowerCase();
|
||||
document.findAndReplace.connector.value==top.t.and&&c&&(document.findAndReplace.replaceAction.value==top.t.replace&&d.getSelection().toLowerCase()==a?d.replaceSelection(e,"around"):document.findAndReplace.replaceAction.value==top.t["replace all"]&&(c=new RegExp(a,"gi"),d.setValue(d.getValue().replace(c,e))));c=d.getValue().toLowerCase();if(!top.ICEcoder.findMode||a!=top.ICEcoder.lastsearch){ICEcoder.results=[];ICEcoder.resultsLines=[];for(e=0;e<c.length;e++)c.substr(e,a.length)==a&&-1==ICEcoder.results.indexOf(e)&&
|
||||
(ICEcoder.results.push(e),-1==ICEcoder.resultsLines.indexOf(d.posFromIndex(e).line+1)&&ICEcoder.resultsLines.push(d.posFromIndex(e).line+1));ICEcoder.lastsearch=a}if(0<ICEcoder.results.length){if(b)f.innerHTML=ICEcoder.results.length+" results";else{for(e=ICEcoder.findResult=0;e<ICEcoder.results.length;e++)ICEcoder.results[e]<d.indexFromPos(d.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=d.getSearchCursor(a,d.getCursor(),!0);b.findNext();b.from()||(b=d.getSearchCursor(a,{line:0,ch:0},!0),b.findNext());d.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/d.lineCount():d.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?0:d.heightAtLine(0);f="";for(e=1;e<=d.lineCount();e++)c=-1<ICEcoder.resultsLines.indexOf(e)?d.getCursor().line+1==
|
||||
e?"#b00":"#888":"transparent",f+='<div style="position: absolute; display: block; width: 5px; height:'+a+"px; background: "+c+"; top: "+parseInt(a*(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}""!=a&&c?(f=b=d="",document.findAndReplace.connector.value==top.t.and&&(d="&replace="+e),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),a=a.replace(/\'/g,"'"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),
|
||||
top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+a+d+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-xhr.php?action=replaceText&find="+
|
||||
b+"&replace="+c+"&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|"));top.ICEcoder.serverMessage("<b>"+top.t["Replacing text in"]+"</b><br>"+a)},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;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},updateCharDisplay:function(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();
|
||||
a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateByteDisplay:function(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;ICEcoder.byteDisplay.innerHTML=a.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]]},getcMdiffInstance: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])+"diff"]},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;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();if(a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a){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">'+top.t["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(top.t["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: 515px"></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"))},githubAction:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/github.php?action='+a+"&selectedFiles="+top.ICEcoder.selectedFiles.join(";")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';
|
||||
top.ICEcoder.showHide("show",top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet?
|
||||
farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,e,f,g,k,h,l,p,n;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];k=f[1];h=f[2];l=g+","+k+","+h;p=top.ICEcoder.rgbToHex(g,
|
||||
k,h);top.get("rgbMouseXY").value=l;top.get("hexMouseXY").value="#"+p;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+p;n=128>g||128>k||128>h&&200>g&&200>k&&50<h?"#fff":"#000";top.get("hexMouseXY").style.color=top.get("rgbMouseXY").style.color=n};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=n}},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=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;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,b;top.ICEcoder.codeAssist=!top.ICEcoder.codeAssist;top.get("codeAssistDisplay").style.backgroundPosition=top.ICEcoder.codeAssist?"0 0":"-16px 0";top.ICEcoder.cssColorPreview();
|
||||
top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?"diff":!1);for(i=0;i<top.ICEcoder.cMInstances.length;i++)if(a=top.ICEcoder.openFiles[i],a=a.split("."),a=a[a.length-1],"js"==a||"json"==a)a=top.ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[i]],b=top.ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[i]+"diff"],top.ICEcoder.codeAssist?(a.setOption("lint",!0),b.setOption("lint",!0)):(a.clearGutter("CodeMirror-lint-markers"),a.setOption("lint",!1),b.clearGutter("CodeMirror-lint-markers"),
|
||||
b.setOption("lint",!1))},serverQueue:function(a,b,c){var d,e,f,g,k;d=ICEcoder.getcMInstance();for(f=e=0;f<ICEcoder.serverQueueItems.length;f++)0<ICEcoder.serverQueueItems[f].indexOf("action=save")&&e++;e++;if("add"==a)ICEcoder.serverQueueItems.push(b),0<b.indexOf("action=save")&&(f=document.createElement("textarea"),f.setAttribute("id","saveTemp"+e),document.body.appendChild(f),top.get("saveTemp"+e).value=d.getValue());else if("del"==a){if(ICEcoder.serverQueueItems[0]&&0<ICEcoder.serverQueueItems[0].indexOf("action=save")){d=
|
||||
e-1;for(f=1;f<d;f++)top.get("saveTemp"+f).value=top.get("saveTemp"+(f+1)).value;d=top.get("saveTemp"+d);d.parentNode.removeChild(d)}ICEcoder.serverQueueItems.splice(0,1)}if("del"==a&&1<=ICEcoder.serverQueueItems.length||1==ICEcoder.serverQueueItems.length)b&&-1==b.indexOf("saveFiles=")&&-1==b.indexOf("action=load")?(g=top.ICEcoder.xhrObj(),g.onreadystatechange=function(){4==g.readyState&&200==g.status&&(k=JSON.parse(g.responseText),k.action.timeEnd=(new Date).getTime(),k.action.timeTaken=k.action.timeEnd-
|
||||
k.action.timeStart,k.status.error?top.ICEcoder.message(k.status.errorMsg):eval(k.action.doNext))},g.open("POST",ICEcoder.serverQueueItems[0],!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a=(new Date).getTime(),0<b.indexOf("action=save")?g.send("timeStart="+a+"&file="+c+"&contents="+encodeURIComponent(top.document.getElementById("saveTemp1").value)):g.send("timeStart="+a+"&file="+c)):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">'+top.t["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(top.t["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: 515px"></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"))},githubAction:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/github.php?action='+a+"&selectedFiles="+top.ICEcoder.selectedFiles.join(";")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';top.ICEcoder.showHide("show",
|
||||
top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet?
|
||||
(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"))):top.ICEcoder.githubTokenAsk("showManager")},githubDiffToggle:function(){var a;if(!top.ICEcoder.githubAuthTokenSet)top.ICEcoder.githubTokenAsk("loadFiles");else if(top.ICEcoder.githubDiff||top.ICEcoder.ask(top.t["This will compare..."]))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff?
|
||||
"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,e,f,g,m,h,k,n,p,l,r,s,t){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);top.ICEcoder.githubAuthTokenSet=s;t&&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(top.t["Please note for..."])?(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},
|
||||
"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,e,f,g,k,h,l,p,n,m,t,u,v,w,x){var q,r=a.slice(0,a.lastIndexOf("?")),r=r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."));top.ICEcoder.theme!==r&&(top.ICEcoder.theme=r,"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),
|
||||
q=-1<"3024-day base16-light eclipse elegant mdn-like neat neo paraiso-light solarized the-matrix xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":-1<"3024-night blackboard colorforth liquibyte night tomorrow-night-bright tomorrow-night-eighties vibrant-ink".split(" ").indexOf(top.ICEcoder.theme)?"#888":"#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(),
|
||||
ICEcoder.changeFilesW(c?"expand":"contract"),top.ICEcoder.hideFileMenu());b=ICEcoder.content.contentWindow.document.styleSheets[4];a=b.rules?"rules":"cssRules";b[a][0].style.fontSize=g;b[a][4].style["border-left-width"]=f?"1px":"0";b[a][4].style["margin-left"]=f?"-1px":"0";b[a][2].style.cssText="background-color: "+q+" !important";top.ICEcoder.lineWrapping=k;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=p;top.ICEcoder.indentAuto=l;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),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].refresh(),ICEcoder.content.contentWindow["cM"+
|
||||
ICEcoder.cMInstances[f]+"diff"].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]+"diff"].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]+"diff"].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]+"diff"].setOption("tabSize",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]+"diff"].refresh();
|
||||
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=m;top.ICEcoder.bugFileCheckTimer=t;top.ICEcoder.bugFileMaxLines=u;""!=top.ICEcoder.bugFilePaths[0]?top.ICEcoder.startBugChecking():"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt);top.ICEcoder.splitPane&&
|
||||
top.ICEcoder.updateDiffs();top.ICEcoder.githubAuthTokenSet=v;top.ICEcoder.updateDiffOnSave=w;x&&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-xhr.php?action=perms&perms="+b+"&csrf="+top.ICEcoder.csrf,a);top.ICEcoder.serverMessage("<b>chMod "+b+" on </b><br>"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c,d,e;d=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];a=d.substr(d.lastIndexOf("/")+
|
||||
1);e=a.substr(a.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;top.ICEcoder.previewWindowLoading=!0;top.ICEcoder.previewWindow=window.open(d,"previewWindow");-1<["md"].indexOf(e)?top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindowLoading=!1;top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(c.getValue())}:top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindowLoading=
|
||||
!1;try{top.ICEcoder.doPesticide()}catch(a){}try{top.ICEcoder.doStatsJS("open")}catch(b){}}}},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(top.t["Please note for..."])?(top.ICEcoder.showHide("show",
|
||||
top.get("loadingMask")),window.location="lib/updater.php"):window.open("https://icecoder.net")},updated:function(){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<h1 style="color: #fff; cursor: default">Thanks for updating to v'+top.ICEcoder.versionNo+'!</h1><h2 style="color: #888; cursor: default">Click anywhere to continue using ICEcoder...</h2>'},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(top.t["You can start..."]);"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["Error cannot find..."]);"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["No new errors..."]);"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 style="white-space: pre-wrap">'+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(top.t["You have made..."]));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(top.t["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):56==c?(top.ICEcoder.tagWrapper("li"),!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()}}};
|
||||
""").replace(/'/g,"'")},printCode:function(){var a,b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=top.ICEcoder.filesFrame.contentWindow.frames.fileControl;b.window.document.body.innerHTML='<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre style="white-space: pre-wrap">'+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,d;ICEcoder.selectedTab=a;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();if(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c){ICEcoder.switchMode();for(var e=0;e<ICEcoder.cMInstances.length;e++)ICEcoder.content.contentWindow["cM"+
|
||||
ICEcoder.cMInstances[e]].getWrapperElement().style.display="none",ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].getWrapperElement().style.display="none";c.setOption("theme",top.ICEcoder.theme);d.setOption("theme",top.ICEcoder.theme+" diff");c.getWrapperElement().style.display="block";d.getWrapperElement().style.display="block";top.ICEcoder.splitPane&&top.ICEcoder.updateDiffs();b||setTimeout(function(){top.ICEcoder.focus()},4);c.refresh();d.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(a){var b;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();b=ICEcoder.getcMInstance("new");ICEcoder.switchTab(ICEcoder.openFiles.length);b.removeLineClass(ICEcoder["cMActiveLinecM"+ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]],"background");ICEcoder["cMActiveLinecM"+ICEcoder.selectedTab]=b.addLineClass(0,"background","cm-s-activeLine");ICEcoder.nextcMInstance++;a&&top.ICEcoder.saveFile()},createNewTab:function(a){var b;top.ICEcoder.openFiles.push(top.ICEcoder.shortURL);top.get("tab"+top.ICEcoder.openFiles.length).style.display=
|
||||
"inline-block";b=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> '+b.slice(b.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);a||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();
|
||||
ICEcoder.getcMdiffInstance();d=!0;c||ICEcoder.savedPoints[a-1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask(top.t["You have made..."]));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";ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[a-1]+"diff"].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: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.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(top.t["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,d,e;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)return d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1,"ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d?"content"==a?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):56==c?(top.ICEcoder.tagWrapper("li"),!1):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):37==c?(top.ICEcoder.filesFrame.contentWindow.focus(),
|
||||
!1):c:37==c?(top.ICEcoder.filesFrame.contentWindow.focus(),!1):39==c?(top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?!0:!1),!1):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c;if(13==c&&b.shiftKey)return top.ICEcoder.insertLineBefore(),!1;if(70==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return c=top.get("find"),d=ICEcoder.getcMInstance(),e=ICEcoder.getcMdiffInstance(),d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?e:d,d=d.getSelections(),0<d.length&&0<d[0].length&&(c.value=
|
||||
d[0]),c.select(),top.get("goToLineNo").focus(),c.focus(),!1;if(71==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return c=top.get("goToLineNo"),c.select(),top.get("find").focus(),c.focus(),!1;if(73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.searchForSelected(),!1;if(39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.nextTab(),!1;if(37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.previousTab(),!1;if(38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&
|
||||
"content"==a)return top.ICEcoder.moveLines("up"),!1;if(40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.moveLines("down"),!1;if(107==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.duplicateLines():top.ICEcoder.newTab(),!1;if(109==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1;if(83==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return b.shiftKey?top.ICEcoder.saveFile("saveAs"):
|
||||
top.ICEcoder.saveFile(),!1;if(13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1])return top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]),!1;if(13==c&&"files"==a)return b.ctrlKey||top.ICEcoder.cmdKey||(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder","|"),top.ICEcoder.selectFileFolder("init")),top.ICEcoder.fmAction(b,"enter")),!1;if(38!=c&&40!=c&&37!=c&&39!=c||"files"!=a)return 79==
|
||||
c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!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)?(d=ICEcoder.getcMInstance(),e=ICEcoder.getcMdiffInstance(),d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
e:d,c=d.getCursor().line,top.contentFrame.CodeMirror.doFold(-1<d.getLine(c).indexOf("{")?"brace":"xml",null,"+","-",!1)(d,c),!1):27==c&&"content"==a?(d=ICEcoder.getcMInstance(),e=ICEcoder.getcMdiffInstance(),d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?e:d,1<d.getSelections().length?d.execCommand("singleSelection"):top.ICEcoder.lineCommentToggle(),!1):27==c&&"content"!=a?(top.ICEcoder.cancelAllActions(),!1):c;b.ctrlKey||top.ICEcoder.cmdKey||(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder",
|
||||
"|"),top.ICEcoder.selectFileFolder("init")),top.ICEcoder.fmAction(b,38==c?"up":40==c?"down":37==c?"left":"right"));return!1},resetKeys:function(a){top.ICEcoder.cmdKey=!1},addSnippet:function(){var a,b,c;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;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,k;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c;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;k=d;for(i=0;i<e.length;i++)e.indexOf("\n",g)<e.indexOf("CURSOR")&&(g=e.indexOf("\n",g)+1,k+=1);c.replaceRange(e.replace("CURSOR",""),{line:d,ch:0},{line:d,ch:1E6});c.setCursor(k,f);top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?!0:!1)}}};
|
||||
@@ -14,19 +14,44 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" type="text/css" href="ice-coder.css">
|
||||
<link rel="stylesheet" type="text/css" href="ice-coder.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="icon" type="image/png" href="../favicon.png">
|
||||
</head>
|
||||
|
||||
<body onLoad="document.settingsUpdate.<?php echo $ICEcoder["multiUser"] ? "username" : "password";?>.focus()">
|
||||
<body style="background-color: #141414" onLoad="<?php if (!isset($_GET["get"])) {$inputFocus = $ICEcoder["multiUser"] ? "username" : "password"; echo "document.settingsUpdate.".$inputFocus.".focus(); ";}; ?>setTimeout(function(){document.getElementById('screenContainer').style.opacity=1},50);if (document.getElementById('trialBarRemaining')) {setTimeout(function(){document.getElementById('trialBarRemaining').style.width = '<?php echo $tRemainingPerc*170;?>px';},150)}">
|
||||
|
||||
<div class="screenContainer" style="background-color: #141414">
|
||||
<div class="screenContainer" id="screenContainer" style="background-color: #141414; opacity: 0; transition: opacity 0.1s ease-out">
|
||||
<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>
|
||||
|
||||
<?php if (generateHash(strClean($ICEcoder['licenseEmail']),$ICEcoder['licenseCode'])!=$ICEcoder['licenseCode'] && !isset($_GET['get']) && !isset($_POST['code'])) {?>
|
||||
<div class="trialBarContainer"><div class="trialBarRemaining" id="trialBarRemaining"></div><br>
|
||||
<div class="trialBarText"><?php echo $tDaysRemaining;?> days left - <a href="login.php?get=code&csrf=<?php echo $_SESSION["csrf"];?>">Unlock now</a></div>
|
||||
</div>
|
||||
<?php ;}; ?>
|
||||
|
||||
<form name="settingsUpdate" action="login.php" method="POST">
|
||||
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" class="password"><br><br>'.PHP_EOL;};?>
|
||||
<?php
|
||||
if (isset($_GET["get"]) && $_GET["get"]=="code") {
|
||||
?>
|
||||
<span style="color: #fff"><h1>Thanks for trialling ICEcoder!</h1><b>Please donate on the website to continue using it.</b><br><br>
|
||||
<h2>Step 1: Donate</h2><br><br>
|
||||
<a href="https://icecoder.net/?display=trialDonateScreen" target="_blank" style="background: #097695; color: #fff; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer">Donate now</a><br><br><br>
|
||||
<h2>Step 2: Enter email address & code</h2><br>
|
||||
<?php if (isset($_GET["success"]) && $_GET["success"]=="no") {echo "Sorry, that doesn't seem to be correct.<br>Please check your emailed details and try again.<br><br>";};?>
|
||||
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" value="Username" onfocus="origValue=\'Username\';if(this.value==origValue){this.value=\'\';};" onblur="if(this.value==\'\'){this.value=origValue;};" class="password"><br><br>'.PHP_EOL;};?>
|
||||
<input type="email" name="email" value="Email" onfocus="origValue='Email';if(this.value==origValue){this.value='';};" onblur="if(this.value==''){this.value=origValue;};" class="password"><br><br>
|
||||
<input type="text" name="code" value="Code" onfocus="origValue='Code';if(this.value==origValue){this.value='';};" onblur="if(this.value==''){this.value=origValue;};" class="password"><br><br>
|
||||
<input type="submit" name="submit" value="Unlock ICEcoder" style="background: #097695; color: #fff; border: 0; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer"><br><br><br>
|
||||
Future development relies on your donation, to keep making awesome new features.<br><br>
|
||||
Many thanks.</span>
|
||||
<?php
|
||||
} else {
|
||||
if (isset($_GET["message"]) && $_GET["message"]=="trialDonateThanks") {echo '<span style="color: #fff"><b>Thank you very much for your donation!</b><br><br>Your details have been accepted and<br>ICEcoder is now fully unlocked.</span><br><br><br>';};
|
||||
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 $t['set password']." / ".$t['login'];} else {echo $ICEcoder["password"] == "" ? $t['set password'] : $t['login'];}; ?>" class="button">
|
||||
<?php
|
||||
@@ -42,6 +67,7 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
|
||||
echo '<div class="text"><input type="checkbox" name="checkUpdates" value="true" checked> '.$t['auto-check for updates'].'</div>';
|
||||
}
|
||||
if (!$ICEcoder["multiUser"]) { echo '<div class="text"><a href="javascript:alert(\''.$t['To put into...'].'\')">'.$t['multi-user'].'?</a></div>';};
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
|
||||
</form>
|
||||
|
||||
@@ -15,7 +15,7 @@ if(isset($_GET['selectedFiles'])) {
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</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="multiple-results.css">
|
||||
<link rel="stylesheet" type="text/css" href="multiple-results.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="results" onLoad="top.get('loadingMask').style.visibility = 'hidden'">
|
||||
@@ -44,7 +44,7 @@ var resultsDisplay = "";
|
||||
var foundArray = [];
|
||||
foundInSelected = false;
|
||||
userTarget = top.document.findAndReplace.target.value;
|
||||
findText = top.findAndReplace.find.value.toLowerCase();
|
||||
findText = top.findAndReplace.find.value;
|
||||
<?php
|
||||
$findText = str_replace("ICEcoder:","",str_replace("'","\'",$_GET['find']));
|
||||
// Find in open docs?
|
||||
@@ -94,7 +94,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.get(\'blackMask\'))">';
|
||||
resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.goFindAfterOpenInt = setInterval(function(){goFindAfterOpen(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\')},20);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'])) { ?>
|
||||
@@ -146,7 +146,7 @@ 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.get('blackMask'))\\\">";
|
||||
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.goFindAfterOpenInt = setInterval(function(){goFindAfterOpen('".$fullPath."')},20);top.ICEcoder.showHide('hide',top.get('blackMask'))\\\">";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">".$t['Found']." ".substr_count(strtolower(toUTF8noBOM(file_get_contents($fullPath,false,$context),false)),$q)." ".$t['times']."</div>";
|
||||
if (isset($_GET['replace'])) {
|
||||
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">".$t['replace']."</div>";
|
||||
@@ -222,6 +222,18 @@ var renameAll = function() {
|
||||
}
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
}
|
||||
|
||||
var goFindAfterOpen = function(fileName) {
|
||||
if (top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1] == fileName.replace(top.docRoot,"") && !top.ICEcoder.loadingFile) {
|
||||
// Change options back to finding only in this document
|
||||
top.document.findAndReplace.connector.selectedIndex = 0;
|
||||
top.ICEcoder.findReplaceOptions();
|
||||
top.document.findAndReplace.target.selectedIndex = 0;
|
||||
// Submit to select first instance
|
||||
top.document.findAndReplace.submit.click();
|
||||
clearInterval(top.ICEcoder.goFindAfterOpenInt);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -15,7 +15,7 @@ if ($_SESSION['loggedIn']) {
|
||||
|
||||
// If we're updating plugins, update those shown
|
||||
if (isset($_GET['updatedPlugins'])) {
|
||||
echo "<script>top.document.getElementById('pluginsOptional').innerHTML = '".$pluginsDisplay."';</script>";
|
||||
echo "<script>top.document.getElementById('pluginsOptional').innerHTML = '".str_replace("'","\\'",$pluginsDisplay)."';</script>";
|
||||
}
|
||||
|
||||
// Work out what plugins we'll need to set on a setInterval
|
||||
|
||||
@@ -154,7 +154,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
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('".$t['ICEcoder needs to...']."')) {top.window.location.reload();} else {window.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;}</script>";
|
||||
echo "<script>if (top.confirm('".$t['ICEcoder needs to...']."')) {top.window.location.reload(true);} 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>";
|
||||
@@ -193,7 +193,7 @@ function deletePlugin($dir) {
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="plugins-manager.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="pluginsManager">
|
||||
|
||||
@@ -17,7 +17,7 @@ if (!file_exists($fileName) || strpos(str_replace("\\","/",$fileName),$docRoot)
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="properties.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="properties">
|
||||
@@ -83,7 +83,7 @@ echo $chmodInfo;
|
||||
</span>
|
||||
<span class="column" style="margin: 0 10px">
|
||||
<?php
|
||||
$perms = str_split(substr($chmodInfo,1,3)); // reduces 0705 down to 705
|
||||
$perms = str_split(substr($chmodInfo,1,3)); // reduces 0755 down to 755
|
||||
$readVars = array(4,5,6,7);
|
||||
$writeVars = array(2,3,6,7);
|
||||
$execVars = array(1,3,5,7);
|
||||
|
||||
@@ -16,11 +16,34 @@ $context = stream_context_create(array('http'=>
|
||||
));
|
||||
|
||||
// Start a session if we haven't already
|
||||
if(!isset($_SESSION)) {@session_start();}
|
||||
if(!isset($_SESSION)) {
|
||||
ini_set('session.use_cookies','1'); // Use cookies not URL parameters
|
||||
ini_set('session.use_only_cookies','1'); // Force use of cookies and nothing else
|
||||
ini_set('session.name','ICEcoder_Cookie'); // Set a seperate cookie session name
|
||||
ini_set('session.cookie_lifetime','0'); // Until the browser restarts by default
|
||||
ini_set('session.cookie_domain',''); // This domain only
|
||||
// ini_set('session.cookie_path',str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(dirname(__FILE__)))); // ICEcoder path only, fails ON IE
|
||||
ini_set('session.use_trans_sid','0'); // Ensure this insecure feature is disabled
|
||||
ini_set('session.hash_function','sha512'); // Use Sha512 for session
|
||||
ini_set('session.hash_bits_per_character','6'); // Specify hash scheme of 0-9,a-v,A-Z,-,,
|
||||
// ini_set('session.use_strict_mode','1'); // Reject any session ID that was user provided and not generated by the session (since PHP 5.5.2)
|
||||
ini_set('session.httponly','1'); // Only allow http protocol (ie, not JS) access to the cookie (since PHP 5.2.0)
|
||||
ini_set('session.save_path',dirname(__FILE__).'/../tmp'); // Localise the session files to /tmp
|
||||
|
||||
// Set the language file
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['settings-common'];
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
|
||||
ini_set('session.cookie_secure','1'); // Only allows access to session ID when protocol is HTTPS, switched on under 'if https' condition
|
||||
}
|
||||
@session_start(); // Finally, start the session!
|
||||
if (!isset($_SESSION['csrf'])){
|
||||
session_regenerate_id(true); // Create a new ID to help prevent fixation
|
||||
}
|
||||
}
|
||||
|
||||
// Set the language file, if now possible
|
||||
if (isset($_SESSION['text'])) {
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['settings-common'];
|
||||
}
|
||||
|
||||
// Logout if that's the action we're taking
|
||||
if (isset($_GET['logout'])) {
|
||||
@@ -28,7 +51,8 @@ if (isset($_GET['logout'])) {
|
||||
$_SESSION['loggedIn']=false;
|
||||
$_SESSION['username']=false;
|
||||
session_destroy();
|
||||
header("Location: dirname(__FILE__)./?loggedOut");
|
||||
header("Location: .");
|
||||
die("Logging you out...");
|
||||
}
|
||||
|
||||
// If magic quotes are still on (attempted to switch off in php.ini)
|
||||
@@ -125,4 +149,34 @@ function toUTF8noBOM($string,$message) {
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
?>
|
||||
|
||||
// Polyfill for array_replace_recursive, which is in PHP 5.3+
|
||||
if (!function_exists('array_replace_recursive')) {
|
||||
function array_replace_recursive($base, $replacements) {
|
||||
foreach (array_slice(func_get_args(), 1) as $replacements) {
|
||||
$bref_stack = array(&$base);
|
||||
$head_stack = array($replacements);
|
||||
|
||||
do {
|
||||
end($bref_stack);
|
||||
|
||||
$bref = &$bref_stack[key($bref_stack)];
|
||||
$head = array_pop($head_stack);
|
||||
|
||||
unset($bref_stack[key($bref_stack)]);
|
||||
|
||||
foreach (array_keys($head) as $key) {
|
||||
if (isset($key, $bref) && is_array($bref[$key]) && is_array($head[$key])) {
|
||||
$bref_stack[] = &$bref[$key];
|
||||
$head_stack[] = $head[$key];
|
||||
} else {
|
||||
$bref[$key] = $head[$key];
|
||||
}
|
||||
}
|
||||
} while(count($head_stack));
|
||||
}
|
||||
|
||||
return $base;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
$t = $text['settings-screen'];
|
||||
@@ -10,9 +10,9 @@ $t = $text['settings-screen'];
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> settings screen</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="settings-screen.css">
|
||||
<link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
|
||||
<script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="settings-screen.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css?microtime=<?php echo microtime(true);?>">
|
||||
<script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.CodeMirror {position: absolute; width: 409px; height: 180px; font-size: <?php echo $ICEcoder["fontSize"];?>}
|
||||
@@ -21,7 +21,7 @@ $t = $text['settings-screen'];
|
||||
.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)}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="editor.css">
|
||||
<link rel="stylesheet" href="editor.css?microtime=<?php echo microtime(true);?>">
|
||||
<?php
|
||||
$themeArray = array();
|
||||
$handle = opendir('../'.$ICEcoder["codeMirrorDir"].'/theme/');
|
||||
@@ -32,7 +32,7 @@ while (false !== ($file = readdir($handle))) {
|
||||
}
|
||||
sort($themeArray);
|
||||
for ($i=0;$i<count($themeArray);$i++) {
|
||||
echo '<link rel="stylesheet" href="../'.$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css">'.PHP_EOL;
|
||||
echo '<link rel="stylesheet" href="../'.$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css?microtime='.microtime(true).'">'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
@@ -71,8 +71,14 @@ for ($i=0;$i<count($themeArray);$i++) {
|
||||
<?php echo $ICEcoder['root'] == "" ? "/" : $ICEcoder['root'];?>
|
||||
<br><br>
|
||||
|
||||
<div style="font-size: 10px; line-height: 12px">ICEcoder on Twitter (<a href="https://www.twitter.com/icecoder" style="font-size: 10px" target="_blank">@icecoder</a>)<br><br>
|
||||
<?php echo $t['Free to use...'];?> <a href="https://icecoder.net" target="_blank">https://icecoder.net</a>
|
||||
<div style="font-size: 10px; line-height: 12px">
|
||||
<?php echo $t['Get in contact...'];?><br>
|
||||
<a href="https://www.twitter.com/icecoder" style="font-size: 10px" target="_blank">Twitter</a><br>
|
||||
<a href="https://facebook.com/ICEcoder.net" style="font-size: 10px" target="_blank">Facebook</a><br>
|
||||
<a href="https://groups.google.com/forum/#!forum/icecoder" style="font-size: 10px" target="_blank">Google Groups</a><br>
|
||||
<a href="https://github.com/mattpass/ICEcoder" style="font-size: 10px" target="_blank">GitHub</a><br>
|
||||
<a href="mailto:info@icecoder.net" style="font-size: 10px">Email</a><br><br>
|
||||
<?php echo $t['You may use...'];?>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
@@ -82,6 +88,17 @@ for ($i=0;$i<count($themeArray);$i++) {
|
||||
<h2><?php echo $t['functionality'];?></h2>
|
||||
<input type="checkbox" onclick="showButton()" name="checkUpdates" value="true"<?php if($ICEcoder["checkUpdates"]) {echo ' checked';};?>> <?php echo $t['check for updates...'];?><br>
|
||||
<input type="checkbox" onclick="showButton()" name="openLastFiles" value="true"<?php if($ICEcoder["openLastFiles"]) {echo ' checked';};?>> <?php echo $t['auto open last...'];?><br>
|
||||
<input type="checkbox" onclick="showButton()" name="updateDiffOnSave" value="true"<?php if($ICEcoder["updateDiffOnSave"]) {echo ' checked';};?>> update diff pane on save<br>
|
||||
language <span class="info" title="Reload required after changing">[?]</span><br>
|
||||
<select onchange="showButton()" name="languageUser">
|
||||
<?php
|
||||
$langFiles = array("chinese-simplified.php","chinese-traditional.php","dutch.php","english.php","french.php","german.php","italian.php","norwegian.php","persian.php","portuguese-brazilian.php","spanish.php");
|
||||
$langText = array("中国(简体)","中國(繁體)","Nederlands","English","Français","Deutsch","Italiano","Norsk","فارسی","Portugues(br)","Español");
|
||||
for ($i=0; $i<count($langFiles); $i++) {
|
||||
echo '<option value="'.$langFiles[$i].'"'.($ICEcoder["languageUser"]==$langFiles[$i] ? ' selected' : '').'>'.$langText[$i].'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select><br>
|
||||
<br>
|
||||
<?php echo $t['when finding in...'];?>:<br>
|
||||
<input type="text" onkeydown="showButton()" name="findFilesExclude" value="<?php echo implode(", ",$ICEcoder["findFilesExclude"]); ?>"><br>
|
||||
@@ -132,15 +149,7 @@ for ($i=0;$i<count($themeArray);$i++) {
|
||||
?>
|
||||
</select>
|
||||
|
||||
<span style="position: absolute; margin: -15px 0 0 10px">
|
||||
<?php echo $t['line wrapping'];?><br>
|
||||
<select onchange="showButton()" name="lineWrapping">
|
||||
<option value="true"<?php if($ICEcoder["lineWrapping"]) {echo " selected";};?>>yes</option>
|
||||
<option value="false"<?php if(!$ICEcoder["lineWrapping"]) {echo " selected";};?>>no</option>
|
||||
</select>
|
||||
</span>
|
||||
|
||||
<span style="position: absolute; margin: -15px 0 0 100px">
|
||||
<span style="position: absolute; margin: -15px 0 0 15px">
|
||||
<?php echo $t['indent type'];?><br>
|
||||
<select onchange="showButton()" name="indentWithTabs">
|
||||
<option value="true"<?php if($ICEcoder["indentWithTabs"]) {echo " selected";};?>>tabs</option>
|
||||
@@ -148,16 +157,33 @@ for ($i=0;$i<count($themeArray);$i++) {
|
||||
</select>
|
||||
</span>
|
||||
|
||||
<span style="position: absolute; margin: -15px 0 0 190px">
|
||||
<span style="position: absolute; margin: -15px 0 0 100px">
|
||||
<?php echo $t['indent size'];?><br>
|
||||
<input type="text" name="indentSize" id="indentSize" style="width: 30px" onkeydown="showButton()" onkeyup="changeIndentSize()" value="<?php echo $ICEcoder["indentSize"];?>">
|
||||
</span>
|
||||
|
||||
<span style="position: absolute; margin: -15px 0 0 267px">
|
||||
<span style="position: absolute; margin: -15px 0 15px 175px">
|
||||
<?php echo $t['auto indent'];?><br>
|
||||
<select onchange="showButton()" name="indentAuto">
|
||||
<option value="true"<?php if($ICEcoder["indentAuto"]) {echo " selected";};?>>yes</option>
|
||||
<option value="false"<?php if(!$ICEcoder["indentAuto"]) {echo " selected";};?>>no</option>
|
||||
</select>
|
||||
</span>
|
||||
<br>
|
||||
<span style="position: absolute; margin: 5px 0 0 0">
|
||||
<?php echo $t['line wrapping'];?><br>
|
||||
<select onchange="showButton()" name="lineWrapping">
|
||||
<option value="true"<?php if($ICEcoder["lineWrapping"]) {echo " selected";};?>>yes</option>
|
||||
<option value="false"<?php if(!$ICEcoder["lineWrapping"]) {echo " selected";};?>>no</option>
|
||||
</select>
|
||||
</span>
|
||||
|
||||
<span style="position: absolute; margin: 5px 0 0 95px">
|
||||
<?php echo $t['font size'];?><br>
|
||||
<input type="text" name="fontSize" id="fontSize" style="width: 44px" onkeydown="showButton()" onkeyup="changeFontSize()" value="<?php echo $ICEcoder["fontSize"];?>">
|
||||
</span>
|
||||
<br><br>
|
||||
|
||||
<br><br><br><br>
|
||||
|
||||
<textarea id="code" name="code">
|
||||
function findSequence(goal) {
|
||||
@@ -174,7 +200,7 @@ function findSequence(goal) {
|
||||
}</textarea>
|
||||
<br>
|
||||
|
||||
<span style="position: absolute; top: 300px">
|
||||
<span style="position: absolute; top: 325px">
|
||||
|
||||
<div style="position: relative; display: inline-block; margin-right: 20px">
|
||||
<h2><?php echo $t['layout'];?></h2>
|
||||
@@ -218,8 +244,8 @@ function findSequence(goal) {
|
||||
|
||||
<div>
|
||||
<h2>github</h2>
|
||||
<?php echo $t['auth token'];?> <span class="info" title="<?php echo $t['Required to get...'];?>">[?]</span><br>
|
||||
<input type="text" name="githubAuthToken" style="width: 300px" onkeydown="showButton()" value="<?php echo $ICEcoder["githubAuthToken"];?>">
|
||||
<?php echo $t['auth token'];?> <span class="info" title="<?php echo $t['Required to get...'];?>">[?]</span> <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use" target="_blank" class="info">Personal Access Token</a> <a href="(http://developer.github.com/v3/oauth" target="_blank" class="info">Client/Secret Pair Token</a><br>
|
||||
<input type="text" name="githubAuthToken" style="width: 320px" onkeydown="showButton()" value="<?php echo $ICEcoder["githubAuthToken"];?>" autocomplete="off">
|
||||
</div>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -10,10 +10,15 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
$repPosStart = strpos($settingsContents,'"root"');
|
||||
$repPosEnd = strpos($settingsContents,'"plugins"');
|
||||
|
||||
// Has there been a language change?
|
||||
$languageUserChanged = $ICEcoder['languageUser'] != $_POST['languageUser'];
|
||||
|
||||
// Prepare all our vars
|
||||
$ICEcoder["root"] = xssClean($_POST['root'],"html");
|
||||
$ICEcoder["checkUpdates"] = isset($_POST['checkUpdates']) && $_POST['checkUpdates'] ? "true" : "false";
|
||||
$ICEcoder["openLastFiles"] = isset($_POST['openLastFiles']) && $_POST['openLastFiles'] ? "true" : "false";
|
||||
$ICEcoder["updateDiffOnSave"] = isset($_POST['updateDiffOnSave']) && $_POST['updateDiffOnSave'] ? "true" : "false";
|
||||
$ICEcoder["languageUser"] = strClean($_POST['languageUser']);
|
||||
$ICEcoder["findFilesExclude"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['findFilesExclude']))).'")';
|
||||
$ICEcoder["codeAssist"] = isset($_POST['codeAssist']) && $_POST['codeAssist'] ? "true" : "false";
|
||||
$ICEcoder["visibleTabs"] = isset($_POST['visibleTabs']) && $_POST['visibleTabs'] ? "true" : "false";
|
||||
@@ -28,6 +33,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
$ICEcoder["fontSize"] = strClean($_POST['fontSize']);
|
||||
$ICEcoder["lineWrapping"] = strClean($_POST['lineWrapping']);
|
||||
$ICEcoder["indentWithTabs"] = strClean($_POST['indentWithTabs']);
|
||||
$ICEcoder["indentAuto"] = strClean($_POST['indentAuto']);
|
||||
$ICEcoder["indentSize"] = intval($_POST['indentSize']);
|
||||
$ICEcoder["pluginPanelAligned"] = strClean($_POST['pluginPanelAligned']);
|
||||
$ICEcoder["bugFilePaths"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['bugFilePaths']))).'")';
|
||||
@@ -35,12 +41,12 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
$ICEcoder["bugFileMaxLines"] = intval($_POST['bugFileMaxLines']);
|
||||
$ICEcoder["githubAuthToken"] = strClean($_POST['githubAuthToken']);
|
||||
|
||||
$settingsArray = array("root","checkUpdates","openLastFiles","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","theme","fontSize","lineWrapping","indentWithTabs","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines","githubAuthToken");
|
||||
$settingsArray = array("root","checkUpdates","openLastFiles","updateDiffOnSave","languageUser","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","theme","fontSize","lineWrapping","indentWithTabs","indentAuto","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines","githubAuthToken");
|
||||
$settingsNew = "";
|
||||
for ($i=0;$i<count($settingsArray);$i++) {
|
||||
$settingsNew .= '"'.$settingsArray[$i].'" => ';
|
||||
// Wrap certain values in double quotes
|
||||
$settingWrap = $settingsArray[$i]=="root"||$settingsArray[$i]=="password"||$settingsArray[$i]=="theme"||$settingsArray[$i]=="fontSize"||$settingsArray[$i]=="tagWrapperCommand"||$settingsArray[$i]=="autoComplete"||$settingsArray[$i]=="pluginPanelAligned"||$settingsArray[$i]=="githubAuthToken" ? '"' : '';
|
||||
$settingWrap = $settingsArray[$i]=="root"||$settingsArray[$i]=="password"||$settingsArray[$i]=="languageUser"||$settingsArray[$i]=="theme"||$settingsArray[$i]=="fontSize"||$settingsArray[$i]=="tagWrapperCommand"||$settingsArray[$i]=="autoComplete"||$settingsArray[$i]=="pluginPanelAligned"||$settingsArray[$i]=="githubAuthToken" ? '"' : '';
|
||||
$settingsNew .= $settingWrap.$ICEcoder[$settingsArray[$i]].$settingWrap.','.PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -64,28 +70,39 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
|
||||
// Work out the theme to use now
|
||||
$ICEcoder["theme"]=="default" ? $themeURL = 'lib/editor.css' : $themeURL = $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';
|
||||
$themeURL .= "?microtime=".microtime(true);
|
||||
|
||||
// Do we need a file manager refresh?
|
||||
$refreshFM = $_POST['changedFileSettings']=="true" ? "true" : "false";
|
||||
|
||||
// Change multiUser and enableRegistration in config___settings.php
|
||||
$generalSettingsContents = file_get_contents($configSettings,false,$context);
|
||||
$isMultiUser = $_POST['multiUser'] ? "true" : "false";
|
||||
$isMultiUser = isset($_POST['multiUser']) && $_POST['multiUser'] ? "true" : "false";
|
||||
$generalSettingsContents = str_replace('"multiUser" => true,','"multiUser" => '.$isMultiUser.',',$generalSettingsContents);
|
||||
$generalSettingsContents = str_replace('"multiUser" => false,','"multiUser" => '.$isMultiUser.',',$generalSettingsContents);
|
||||
|
||||
$isEnableRegistration = $_POST['enableRegistration'] ? "true" : "false";
|
||||
$isEnableRegistration = isset($_POST['enableRegistration']) && $_POST['enableRegistration'] ? "true" : "false";
|
||||
$generalSettingsContents = str_replace('"enableRegistration" => true','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents);
|
||||
$generalSettingsContents = str_replace('"enableRegistration" => false','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents);
|
||||
|
||||
$fConfigSettings = fopen($configSettings, 'w') or die($t['Cannot update config']." ".$configSettings." ".$t['and press refresh']);
|
||||
fwrite($fConfigSettings, $generalSettingsContents);
|
||||
fclose($fConfigSettings);
|
||||
if (is_writeable($configSettings)) {
|
||||
$fConfigSettings = fopen($configSettings, 'w');
|
||||
fwrite($fConfigSettings, $generalSettingsContents);
|
||||
fclose($fConfigSettings);
|
||||
} else {
|
||||
echo "<script>top.ICEcoder.message('".$t['Cannot update config']." lib/".$configSettings." ".$t['and try again']."');</script>";
|
||||
}
|
||||
|
||||
$githubAuthTokenSet = $ICEcoder["githubAuthToken"] != "" ? "true" : "false";
|
||||
|
||||
// If we've changed langugage, reload ICEcoder now
|
||||
if ($languageUserChanged) {
|
||||
echo '<script>top.window.location = "../";</script>';
|
||||
die('Reloading ICEcoder after language change');
|
||||
}
|
||||
|
||||
// With all that worked out, we can now hide the settings screen and apply the new settings
|
||||
$jsBugFilePaths = "['".str_replace(",","','",str_replace(" ","",strClean($_POST['bugFilePaths'])))."']";
|
||||
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",'".$githubAuthTokenSet."',".$refreshFM.");top.iceRoot = '".$ICEcoder["root"]."';</script>";
|
||||
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentAuto"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",'".$githubAuthTokenSet."',".$ICEcoder["updateDiffOnSave"].",".$refreshFM.");top.iceRoot = '".$ICEcoder["root"]."';</script>";
|
||||
}
|
||||
?>
|
||||
126
lib/settings.php
126
lib/settings.php
@@ -3,6 +3,34 @@
|
||||
$configSettings = 'config___settings.php';
|
||||
$configUsersTemplate = 'config___users-template.php';
|
||||
|
||||
// Create a new config file if it doesn't exist yet.
|
||||
// The reason we create it, is so it has PHP write permissions, meaning we can update it later
|
||||
if (!file_exists(dirname(__FILE__)."/".$configSettings)) {
|
||||
$newConfigSettingsFile = '<?php
|
||||
// ICEcoder system settings
|
||||
$ICEcoderSettings = array(
|
||||
"versionNo" => "5.0",
|
||||
"codeMirrorDir" => "CodeMirror",
|
||||
"docRoot" => $_SERVER[\'DOCUMENT_ROOT\'],
|
||||
"demoMode" => false,
|
||||
"devMode" => false,
|
||||
"loginRequired" => true,
|
||||
"multiUser" => false,
|
||||
"languageBase" => "english.php",
|
||||
"lineEnding" => "\n",
|
||||
"newDirPerms" => 755,
|
||||
"newFilePerms" => 644,
|
||||
"enableRegistration" => true
|
||||
);
|
||||
?>';
|
||||
if ($fConfigSettings = fopen(dirname(__FILE__)."/".$configSettings, 'w')) {
|
||||
fwrite($fConfigSettings, $newConfigSettingsFile);
|
||||
fclose($fConfigSettings);
|
||||
} else {
|
||||
die("Cannot update config file lib/".$configSettings.". Please check write permissions on lib/ and try again");
|
||||
}
|
||||
}
|
||||
|
||||
// Load config settings
|
||||
include(dirname(__FILE__)."/".$configSettings);
|
||||
|
||||
@@ -29,10 +57,42 @@ if (!file_exists(dirname(__FILE__)."/".$settingsFile) && $ICEcoderSettings['enab
|
||||
// Load user settings
|
||||
include(dirname(__FILE__)."/".$settingsFile);
|
||||
|
||||
// Remove any previous files that are no longer there
|
||||
$prevFiles = explode(",",$ICEcoderUserSettings['previousFiles']);
|
||||
$prevFilesAvail = "";
|
||||
for ($i=0; $i<count($prevFiles); $i++) {
|
||||
if (file_exists(str_replace("|","/",$prevFiles[$i]))) {
|
||||
$prevFilesAvail .= $prevFiles[$i].",";
|
||||
}
|
||||
}
|
||||
$prevFilesAvail = rtrim($prevFilesAvail,",");
|
||||
$ICEcoderUserSettings['previousFiles'] = $prevFilesAvail;
|
||||
|
||||
// Replace our config created date with the filemtime?
|
||||
if (basename($_SERVER['SCRIPT_NAME']) == "index.php" && $ICEcoderUserSettings['configCreateDate'] == 0) {
|
||||
$settingsContents = file_get_contents(dirname(__FILE__)."/".$settingsFile,false,$context);
|
||||
clearstatcache();
|
||||
$configfilemtime = filemtime(dirname(__FILE__)."/"."config___settings.php");
|
||||
// Make it a number (avoids null, undefined etc)
|
||||
$configfilemtime = intval($configfilemtime);
|
||||
// Set it to the epoch time now if we don't have a real value
|
||||
if ($configfilemtime == 0) {
|
||||
$configfilemtime = time();
|
||||
}
|
||||
$settingsContents = str_replace('"configCreateDate" => 0,','"configCreateDate" => '.$configfilemtime.',',$settingsContents);
|
||||
// Now update the config file
|
||||
$fh = fopen(dirname(__FILE__)."/".$settingsFile, 'w') or die("Can't update config file. Please set public write permissions on ".$settingsFile." and press refresh");
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
// Set the new value in array
|
||||
$ICEcoderUserSettings['configCreateDate'] = $configfilemtime;
|
||||
}
|
||||
|
||||
// On mismatch of settings file to system, rename to .old and reload
|
||||
If ($ICEcoderUserSettings["versionNo"] != $ICEcoderSettings["versionNo"]) {
|
||||
rename(dirname(__FILE__)."/".$settingsFile,dirname(__FILE__)."/".str_replace(".php",".old",$settingsFile));
|
||||
header("Location: settings.php");
|
||||
echo "<script>window.location='settings.php';</script>";
|
||||
die('Found old settings file, reloading...');
|
||||
}
|
||||
|
||||
@@ -40,18 +100,35 @@ If ($ICEcoderUserSettings["versionNo"] != $ICEcoderSettings["versionNo"]) {
|
||||
$ICEcoder = $ICEcoderSettings + $ICEcoderUserSettings;
|
||||
|
||||
// Include language file
|
||||
// Load English first as foundation
|
||||
include(dirname(__FILE__)."/../lang/english.php");
|
||||
$englishText = $text;
|
||||
// Load chosen language ontop to replace English
|
||||
include(dirname(__FILE__)."/../lang/english.php");
|
||||
$text = array_replace_recursive ($englishText, $text);
|
||||
// Load base first as foundation
|
||||
include(dirname(__FILE__)."/../lang/".basename($ICEcoder['languageBase']));
|
||||
$baseText = $text;
|
||||
// Load chosen language ontop to replace base
|
||||
include(dirname(__FILE__)."/../lang/".basename($ICEcoder['languageUser']));
|
||||
$text = array_replace_recursive($baseText, $text);
|
||||
$_SESSION['text'] = $text;
|
||||
|
||||
// Login not required or we're in demo mode and have password set in our settings, log us straight in
|
||||
if ((!$ICEcoder['loginRequired'] || $ICEcoder['demoMode']) && $ICEcoder['password']!="") {$_SESSION['loggedIn']=true;};
|
||||
$demoMode = $ICEcoder['demoMode'];
|
||||
|
||||
// Check if trial period has ended
|
||||
$tPeriod = 1296000-1;
|
||||
if (generateHash(strClean($ICEcoder['licenseEmail']),$ICEcoder['licenseCode'])!=$ICEcoder['licenseCode'] && $ICEcoder['configCreateDate'] > 0 && $ICEcoder['configCreateDate']+$tPeriod < time() && !isset($_GET['get']) && !isset($_POST['code'])) {
|
||||
if (file_exists('lib/login.php')) {
|
||||
header('Location: lib/login.php?get=code&csrf='.$_SESSION["csrf"]);
|
||||
echo "<script>window.location='lib/login.php?get=code&csrf=".$_SESSION["csrf"]."';</script>";
|
||||
} else {
|
||||
header('Location: login.php?get=code&csrf='.$_SESSION["csrf"]);
|
||||
echo "<script>window.location='login.php?get=code&csrf=".$_SESSION["csrf"]."';</script>";
|
||||
}
|
||||
die('Redirecting to donate screen...');
|
||||
}
|
||||
$tRemaining = ($ICEcoder['configCreateDate']+$tPeriod)-time();
|
||||
if ($tRemaining > $tPeriod || $ICEcoder['configCreateDate'] == 0) {$tRemaining = $tPeriod;};
|
||||
$tRemainingPerc = number_format($tRemaining/$tPeriod,2);
|
||||
$tDaysRemaining = intval($tRemaining/(60*60*24));
|
||||
|
||||
// Update this config file?
|
||||
include(dirname(__FILE__)."/settings-update.php");
|
||||
|
||||
@@ -63,12 +140,14 @@ if (!isset($_SESSION['username'])) {$_SESSION['username'] = false;};
|
||||
if(isset($_POST['submit']) && $setPWorLogin=="login") {
|
||||
// On success, set username if multiUser, loggedIn to true and redirect
|
||||
if (generateHash(strClean($_POST['password']),$ICEcoder["password"])==$ICEcoder["password"]) {
|
||||
session_regenerate_id();
|
||||
if ($ICEcoder["multiUser"]) {
|
||||
$_SESSION['username'] = $_POST['username'];
|
||||
}
|
||||
$_SESSION['loggedIn'] = true;
|
||||
include(dirname(__FILE__)."/../processes/on-user-login.php");
|
||||
header('Location: ../');
|
||||
echo "<script>window.location='../';</script>";
|
||||
die('Logging you in...');
|
||||
} else {
|
||||
include(dirname(__FILE__)."/../processes/on-user-login-fail.php");
|
||||
@@ -83,7 +162,7 @@ $_SESSION['username'] = $_SESSION['username'];
|
||||
$serverType = stristr($_SERVER['SERVER_SOFTWARE'], "win") ? "Windows" : "Linux";
|
||||
$docRoot = rtrim(str_replace("\\","/",$ICEcoder['docRoot']));
|
||||
$iceRoot = rtrim(str_replace("\\","/",$ICEcoder["root"]));
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if ($_SESSION['loggedIn'] && basename($_SERVER['SCRIPT_NAME']) == "index.php") {
|
||||
echo "<script>top.docRoot='".$docRoot."';top.iceRoot='".$iceRoot."'</script>";
|
||||
}
|
||||
|
||||
@@ -120,10 +199,41 @@ include(dirname(__FILE__)."/plugins-display.php");
|
||||
if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER['SCRIPT_NAME'],"lib/login.php")) {
|
||||
if (file_exists('lib/login.php')) {
|
||||
header('Location: lib/login.php');
|
||||
echo "<script>window.location='lib/login.php';</script>";
|
||||
} else {
|
||||
header('Location: login.php');
|
||||
echo "<script>window.location='login.php';</script>";
|
||||
}
|
||||
die('Redirecting to login...');
|
||||
|
||||
// If we're unlocking ICEcoder after donating
|
||||
} elseif (isset($_POST['submit']) && (strpos($_POST['submit'],"Unlock ICEcoder")>-1)) {
|
||||
if (generateHash(strClean($_POST['email']),$_POST['code'])==$_POST['code']) {
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
// Replace our empty email & code with the one submitted by user
|
||||
$settingsContents = str_replace('"licenseEmail" => "",','"licenseEmail" => "'.$_POST['email'].'",',$settingsContents);
|
||||
$settingsContents = str_replace('"licenseCode" => "",','"licenseCode" => "'.$_POST['code'].'",',$settingsContents);
|
||||
// Now update the config file
|
||||
$fh = fopen($settingsFile, 'w') or die("Can't update config file. Please set public write permissions on ".$settingsFile." and press refresh");
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
if (file_exists('lib/login.php')) {
|
||||
header('Location: lib/login.php?message=trialDonateThanks&csrf='.$_SESSION["csrf"]);
|
||||
echo "<script>window.location='lib/login.php?message=trialDonateThanks&csrf=".$_SESSION["csrf"]."';</script>";
|
||||
} else {
|
||||
header('Location: login.php?message=trialDonateThanks&csrf='.$_SESSION["csrf"]);
|
||||
echo "<script>window.location='login.php?message=trialDonateThanks&csrf=".$_SESSION["csrf"]."';</script>";
|
||||
}
|
||||
} else {
|
||||
if (file_exists('lib/login.php')) {
|
||||
header('Location: lib/login.php?get=code&success=no&csrf='.$_SESSION["csrf"]);
|
||||
echo "<script>window.location='lib/login.php?get=code&success=no&csrf=".$_SESSION["csrf"]."';</script>";
|
||||
} else {
|
||||
header('Location: login.php?get=code&success=no&csrf='.$_SESSION["csrf"]);
|
||||
echo "<script>window.location='login.php?get=code&success=no&csrf=".$_SESSION["csrf"]."';</script>";
|
||||
}
|
||||
}
|
||||
|
||||
// If we are on the login screen and not logged in
|
||||
} elseif (!$_SESSION['loggedIn']) {
|
||||
// If the password hasn't been set and we're setting it
|
||||
@@ -149,6 +259,7 @@ if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER[
|
||||
include(dirname(__FILE__)."/../processes/on-user-new.php");
|
||||
// Finally, load again as now this file has changed and auto login
|
||||
header('Location: ../');
|
||||
echo "<script>window.location='../';</script>";
|
||||
die('Logging you in...');
|
||||
}
|
||||
// ===================================================
|
||||
@@ -156,6 +267,7 @@ if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER[
|
||||
// ===================================================
|
||||
} elseif ($ICEcoder['loginRequired'] && $_SESSION['loggedIn'] && $ICEcoder["password"]=="") {
|
||||
header("Location: ../?logout");
|
||||
echo "<script>window.location='../?logout';</script>";
|
||||
die('Logging you out...');
|
||||
} else {
|
||||
// ==================================
|
||||
|
||||
@@ -14,6 +14,33 @@ define('PATH', '../tmp/oldVersion/');
|
||||
$updateDone = false;
|
||||
|
||||
function startUpdate() {
|
||||
// First, check old version is entirely moveable
|
||||
$source = "../";
|
||||
$cantMoveArray = array();
|
||||
echo 'Checking we can entirely move old ICEcoder version...<br>';
|
||||
foreach ($iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),RecursiveIteratorIterator::SELF_FIRST) as $item) {
|
||||
if (strpos($source.DIRECTORY_SEPARATOR.$iterator->getSubPathName(),"oldVersion")==false) {
|
||||
// Don't move plugins or .git away
|
||||
$testPath = $source.DIRECTORY_SEPARATOR.$iterator->getSubPathName();
|
||||
$testPath = str_replace("\\","/",$testPath);
|
||||
if (strpos($testPath,"/plugins/")==false && strpos($testPath,"/.git/")==false) {
|
||||
if (!is_writeable($item)) {
|
||||
array_push($cantMoveArray,substr($item,count($source)+2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($cantMoveArray) > 0) {
|
||||
echo '<br>Sorry, there are dirs/files that cannot be moved. Please set write permissions on them so ICEcoder may move the old version, to make way for the new.<br><br>You can reload this page after making perms changes to check the list again.<br><br>';
|
||||
for ($i=0; $i<count($cantMoveArray); $i++) {
|
||||
echo $cantMoveArray[$i]."<br>";
|
||||
}
|
||||
die('<br><a href="'.$source.'" style="color: #fff"><< Back to ICEcoder</a>');
|
||||
}
|
||||
renameOldVersion();
|
||||
}
|
||||
|
||||
function renameOldVersion() {
|
||||
if (is_dir(PATH)) {
|
||||
echo 'Postfixing oldVersion dir with a timestamp...<br>';
|
||||
rename(PATH,trim(PATH,"/")."-".time());
|
||||
@@ -37,12 +64,12 @@ function copyOldVersion() {
|
||||
echo 'Moving current ICEcoder files...<br>';
|
||||
foreach ($iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),RecursiveIteratorIterator::SELF_FIRST) as $item) {
|
||||
if (strpos($source.DIRECTORY_SEPARATOR.$iterator->getSubPathName(),"oldVersion")==false) {
|
||||
// Don't move plugins away
|
||||
// Don't move plugins or .git away
|
||||
$testPath = $source.DIRECTORY_SEPARATOR.$iterator->getSubPathName();
|
||||
$testPath = str_replace("\\","/",$testPath);
|
||||
if (strpos($testPath,"/plugins/")==false) {
|
||||
if (strpos($testPath,"/plugins/")==false && strpos($testPath,"/.git/")==false) {
|
||||
if ($item->isDir()) {
|
||||
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), 0705);
|
||||
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), 0755);
|
||||
} else {
|
||||
rename($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
|
||||
}
|
||||
@@ -193,7 +220,7 @@ startUpdate();
|
||||
if ($updateDone) {
|
||||
echo 'Updated successfully!<br><br>';
|
||||
echo 'Restarting ICEcoder...';
|
||||
echo '<script>alert("'.$t['Update appears to...'].'");window.location = "../";</script>';
|
||||
echo '<script>alert("'.$t['Update appears to...'].'");window.location = "../?display=updated&csrf='.$_SESSION["csrf"].";</script>';
|
||||
} else {
|
||||
echo 'Something appears to have gone wrong :-/<br><br>';
|
||||
echo 'Please report bugs at <a href="https://github.com/mattpass/ICEcoder" style="color: #fff">https://github.com/mattpass/ICEcoder</a><br><br>';
|
||||
|
||||
4
plugins/index.php
Normal file
4
plugins/index.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header("Location: ../");
|
||||
die();
|
||||
?>
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
die('Sorry, not logged in.');
|
||||
}
|
||||
// Purpose: This file is run after a bug check, has $result string and $status arrays available to it
|
||||
// Langs: PHP only
|
||||
// Example:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
die('Sorry, not logged in.');
|
||||
}
|
||||
?>
|
||||
<!--
|
||||
Purpose: This file is run when ICEcoder editor has loaded
|
||||
Langs: Anything - PHP, JS etc
|
||||
@@ -13,87 +18,117 @@ CodeMirror.commands.autocomplete = function(cm) {
|
||||
|
||||
// Switch the CodeMirror mode on demand
|
||||
top.ICEcoder.switchMode = function(mode) {
|
||||
var cM, fileName;
|
||||
var cM, cMdiff, fileName, fileExt;
|
||||
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
cMdiff = top.ICEcoder.getcMdiffInstance();
|
||||
fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
|
||||
if (cM && mode) {
|
||||
cM.setOption("mode",mode);
|
||||
cMdiff.setOption("mode",mode);
|
||||
} else if (cM && fileName) {
|
||||
fileName.indexOf('.js')>0 ? cM.setOption("mode","text/javascript")
|
||||
: fileName.indexOf('.coffee')>0 ? cM.setOption("mode","text/x-coffeescript")
|
||||
: fileName.indexOf('.rb')>0 ? cM.setOption("mode","text/x-ruby")
|
||||
: fileName.indexOf('.py')>0 ? cM.setOption("mode","text/x-python")
|
||||
: fileName.indexOf('.css')>0 ? cM.setOption("mode","text/css")
|
||||
: fileName.indexOf('.less')>0 ? cM.setOption("mode","text/x-less")
|
||||
: fileName.indexOf('.md')>0 ? cM.setOption("mode","text/x-markdown")
|
||||
: fileName.indexOf('.xml')>0 ? cM.setOption("mode","application/xml")
|
||||
: fileName.indexOf('.sql')>0 ? cM.setOption("mode","text/x-mysql") // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql
|
||||
: fileName.indexOf('.erl')>0 ? cM.setOption("mode","text/x-erlang")
|
||||
: fileName.indexOf('.yaml')>0 ? cM.setOption("mode","text/x-yaml")
|
||||
: fileName.indexOf('.java')>0 ? cM.setOption("mode","text/x-java")
|
||||
: fileName.indexOf('.jl')>0 ? cM.setOption("mode","text/x-julia")
|
||||
: fileName.indexOf('.c')>0 ? cM.setOption("mode","text/x-csrc")
|
||||
: fileName.indexOf('.cpp')>0 ? cM.setOption("mode","text/x-c++src")
|
||||
: fileName.indexOf('.cs')>0 ? cM.setOption("mode","text/x-csharp")
|
||||
: fileName.indexOf('.go')>0 ? cM.setOption("mode","text/x-go")
|
||||
: fileName.indexOf('.lua')>0 ? cM.setOption("mode","text/x-lua")
|
||||
: fileName.indexOf('.pl')>0 ? cM.setOption("mode","text/x-perl")
|
||||
: fileName.indexOf('.rs')>0 ? cM.setOption("mode","text/x-rustsrc")
|
||||
: fileName.indexOf('.scss')>0 ? cM.setOption("mode","text/x-sass")
|
||||
: cM.setOption("mode","application/x-httpd-php");
|
||||
fileExt = fileName.split(".");
|
||||
fileExt = fileExt[fileExt.length-1];
|
||||
var mode =
|
||||
fileExt == "js" || fileExt == "json" ? "text/javascript"
|
||||
: fileExt == "coffee" ? "text/x-coffeescript"
|
||||
: fileExt == "rb" ? "text/x-ruby"
|
||||
: fileExt == "py" ? "text/x-python"
|
||||
: fileExt == "css" ? "text/css"
|
||||
: fileExt == "less" ? "text/x-less"
|
||||
: fileExt == "md" ? "text/x-markdown"
|
||||
: fileExt == "xml" ? "application/xml"
|
||||
: fileExt == "sql" ? "text/x-mysql" // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql
|
||||
: fileExt == "erl" ? "text/x-erlang"
|
||||
: fileExt == "yaml" ? "text/x-yaml"
|
||||
: fileExt == "java" ? "text/x-java"
|
||||
: fileExt == "jl" ? "text/x-julia"
|
||||
: fileExt == "c" ? "text/x-csrc"
|
||||
: fileExt == "cpp" ? "text/x-c++src"
|
||||
: fileExt == "cs" ? "text/x-csharp"
|
||||
: fileExt == "go" ? "text/x-go"
|
||||
: fileExt == "lua" ? "text/x-lua"
|
||||
: fileExt == "pl" ? "text/x-perl"
|
||||
: fileExt == "rs" ? "text/x-rustsrc"
|
||||
: fileExt == "scss" ? "text/x-sass"
|
||||
: "application/x-httpd-php";
|
||||
|
||||
cM.setOption("mode",mode);
|
||||
cM.setOption("lint",(fileExt == "js" || fileExt == "json") && top.ICEcoder.codeAssist ? true : false);
|
||||
cMdiff.setOption("mode",mode);
|
||||
cMdiff.setOption("lint",(fileExt == "js" || fileExt == "json") && top.ICEcoder.codeAssist ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
// Comment/uncomment line or selected range on keypress
|
||||
top.ICEcoder.lineCommentToggleSub = function(cM, cursorPos, linePos, lineContent, lCLen, adjustCursor) {
|
||||
var startLine, endLine, commentChar;
|
||||
top.ICEcoder.lineCommentToggleSub = function(cM, cursorPos, linePos, lineContent, lCLen) {
|
||||
var comments, startLine, endLine, commentCH, commentBS, commentBE;
|
||||
|
||||
// Language specific commenting
|
||||
if (["JavaScript","CoffeeScript","PHP","Python","Ruby","CSS","SQL","Erlang","Julia","Java","YAML","C","C++","C#","Go","Lua","Perl","Rust","Sass"].indexOf(top.ICEcoder.caretLocType)>-1) {
|
||||
|
||||
comments = {
|
||||
"JavaScript" : ["// ", "/* ", " */"],
|
||||
"CoffeeScript" : ["// ", "/* ", " */"],
|
||||
"PHP" : ["// ", "/* ", " */"],
|
||||
"Python" : ["# ", "/* ", " */"],
|
||||
"Ruby" : ["# ", "/* ", " */"],
|
||||
"CSS" : ["// ", "/* ", " */"],
|
||||
"SQL" : ["// ", "/* ", " */"],
|
||||
"Erlang" : ["% ", "/* ", " */"],
|
||||
"Julia" : ["# ", "/* ", " */"],
|
||||
"Java" : ["// ", "/* ", " */"],
|
||||
"YAML" : ["# ", "/* ", " */"],
|
||||
"C" : ["// ", "/* ", " */"],
|
||||
"C++" : ["// ", "/* ", " */"],
|
||||
"C#" : ["// ", "/* ", " */"],
|
||||
"Go" : ["// ", "/* ", " */"],
|
||||
"Lua" : ["-- ", "--[[ ", " ]]"],
|
||||
"Perl" : ["# ", "/* ", " */"],
|
||||
"Rust" : ["// ", "/* ", " */"],
|
||||
"Sass" : ["// ", "/* ", " */"]
|
||||
}
|
||||
|
||||
// Identify the single line, block start and block end comment chars
|
||||
commentCH = comments[top.ICEcoder.caretLocType][0];
|
||||
commentBS = comments[top.ICEcoder.caretLocType][1];
|
||||
commentBE = comments[top.ICEcoder.caretLocType][2];
|
||||
|
||||
// Block commenting
|
||||
if (cM.somethingSelected()) {
|
||||
// Language has no block commenting, so repeating singles are needed
|
||||
if (["Ruby","Python","Erlang","Julia","YAML","Perl"].indexOf(top.ICEcoder.caretLocType)>-1) {
|
||||
commentChar = top.ICEcoder.caretLocType == "Erlang" ? "%" : "#";
|
||||
startLine = cM.getCursor(true).line;
|
||||
endLine = cM.getCursor().line;
|
||||
for (var i=startLine; i<=endLine; i++) {
|
||||
cM.replaceRange(cM.getLine(i).slice(0,1)!=commentChar
|
||||
? commentChar + cM.getLine(i)
|
||||
: cM.getLine(i).slice(1,cM.getLine(i).length), {line:i, ch:0}, {line:i, ch:1000000});
|
||||
cM.replaceRange(cM.getLine(i).slice(0,commentCH.length)!=commentCH
|
||||
? commentCH + cM.getLine(i)
|
||||
: cM.getLine(i).slice(commentCH.length,cM.getLine(i).length), {line:i, ch:0}, {line:i, ch:1000000});
|
||||
}
|
||||
} else if (["Lua"].indexOf(top.ICEcoder.caretLocType)>-1) {
|
||||
cM.replaceSelection(cM.getSelection().slice(0,4)!="--[["
|
||||
? "--[[" + cM.getSelection() + "]]"
|
||||
: cM.getSelection().slice(4,cM.getSelection().length-2),"around");
|
||||
// Language has block commenting
|
||||
} else {
|
||||
cM.replaceSelection(cM.getSelection().slice(0,2)!="/*"
|
||||
? "/*" + cM.getSelection() + "*/"
|
||||
: cM.getSelection().slice(2,cM.getSelection().length-2),"around");
|
||||
cM.replaceSelection(cM.getSelection().slice(0,commentBS.length)!=commentBS
|
||||
? commentBS + cM.getSelection() + commentBE
|
||||
: cM.getSelection().slice(commentBS.length,cM.getSelection().length-commentBE.length),"around");
|
||||
}
|
||||
// Single line commenting
|
||||
} else {
|
||||
if (["CoffeeScript","CSS","SQL"].indexOf(top.ICEcoder.caretLocType)>-1) {
|
||||
cM.replaceRange(lineContent.slice(0,2)!="/*"
|
||||
? "/*" + lineContent + "*/"
|
||||
: lineContent.slice(2,lCLen).slice(0,lCLen-4), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
if (lineContent.slice(0,2)=="/*") {adjustCursor = -adjustCursor};
|
||||
} else if (["Ruby","Python","Erlang","Julia","YAML","Perl"].indexOf(top.ICEcoder.caretLocType)>-1) {
|
||||
commentChar = top.ICEcoder.caretLocType == "Erlang" ? "%" : "#";
|
||||
cM.replaceRange(lineContent.slice(0,1)!=commentChar
|
||||
? commentChar + lineContent
|
||||
: lineContent.slice(1,lCLen), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
adjustCursor = 1;
|
||||
if (lineContent.slice(0,1)==commentChar) {adjustCursor = -adjustCursor};
|
||||
} else if (["Lua"].indexOf(top.ICEcoder.caretLocType)>-1) {
|
||||
cM.replaceRange(lineContent.slice(0,2)!="--"
|
||||
? "--" + lineContent
|
||||
: lineContent.slice(2,lCLen), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
if (lineContent.slice(0,2)=="//") {adjustCursor = -adjustCursor};
|
||||
cM.replaceRange(lineContent.slice(0,commentBS.length)!=commentBS
|
||||
? commentBS + lineContent + commentBE
|
||||
: lineContent.slice(commentBS.length,lCLen-commentBE.length), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
adjustCursor = commentBS.length;
|
||||
if (lineContent.slice(0,commentBS.length)==commentBS) {adjustCursor = -adjustCursor};
|
||||
} else {
|
||||
cM.replaceRange(lineContent.slice(0,2)!="//"
|
||||
? "//" + lineContent
|
||||
: lineContent.slice(2,lCLen), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
if (lineContent.slice(0,2)=="//") {adjustCursor = -adjustCursor};
|
||||
cM.replaceRange(lineContent.slice(0,commentCH.length)!=commentCH
|
||||
? commentCH + lineContent
|
||||
: lineContent.slice(commentCH.length,lCLen), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
adjustCursor = commentCH.length;
|
||||
if (lineContent.slice(0,commentCH.length)==commentCH) {adjustCursor = -adjustCursor};
|
||||
}
|
||||
}
|
||||
// HTML style commenting
|
||||
} else {
|
||||
if (cM.somethingSelected()) {
|
||||
cM.replaceSelection(cM.getSelection().slice(0,4)!="<\!--"
|
||||
@@ -102,7 +137,7 @@ top.ICEcoder.lineCommentToggleSub = function(cM, cursorPos, linePos, lineContent
|
||||
} else {
|
||||
cM.replaceRange(lineContent.slice(0,4)!="<\!--"
|
||||
? "<\!--" + lineContent + "//-->"
|
||||
: lineContent.slice(4,lCLen).slice(0,lCLen-9), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
: lineContent.slice(4,lCLen-5), {line: linePos, ch: 0}, {line: linePos, ch: 1000000});
|
||||
adjustCursor = lineContent.slice(0,4)=="<\!--" ? -4 : 4;
|
||||
}
|
||||
}
|
||||
@@ -110,37 +145,21 @@ top.ICEcoder.lineCommentToggleSub = function(cM, cursorPos, linePos, lineContent
|
||||
if (!cM.somethingSelected()) {cM.setCursor(linePos, cursorPos+adjustCursor)};
|
||||
}
|
||||
|
||||
// Work out the nesting depth location on demand and update our display if required
|
||||
top.ICEcoder.getNestLocationSub = function(nestCheck, fileName) {
|
||||
var events;
|
||||
|
||||
if (["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileName.split(".")[1])<0 &&
|
||||
(nestCheck.indexOf("include(")==-1)&&(nestCheck.indexOf("include_once(")==-1)) {
|
||||
|
||||
// Then for all the array items, output as the nest display
|
||||
for (var i=0;i<top.ICEcoder.htmlTagArray.length;i++) {
|
||||
events = 'onMouseover="top.ICEcoder.highlightBlock('+i+')" onMouseout="top.ICEcoder.highlightBlock('+i+',\'hide\')" onClick="top.ICEcoder.setPosition('+i+',top.ICEcoder.startPosLine,\''+top.ICEcoder.htmlTagArray[i]+'\')"';
|
||||
if (i==0) {top.ICEcoder.nestDisplay.innerHTML += '<div '+events+' style="display: inline-block; width: 7px; margin-top: -5px; height: 30px; background-image: url(images/nest-tag-bg.gif)"></div>'};
|
||||
top.ICEcoder.nestDisplay.innerHTML += '<a '+events+' style="display: inline-block; cursor: pointer; background: #333; padding: 7px 2px 7px 7px; margin-top: -5px; height: 30px">'+top.ICEcoder.htmlTagArray[i]+'</a>';
|
||||
top.ICEcoder.nestDisplay.innerHTML += i<top.ICEcoder.htmlTagArray.length-1
|
||||
? '<div '+events+' style="display: inline-block; width: 8px; margin-top: -5px; height: 30px; background-image: url(images/nest-tag-bg.gif); background-position: -7px 0; cursor: pointer"></div>'
|
||||
: '<div '+events+' style="display: inline-block; width: 7px; margin-top: -5px; height: 30px; background-image: url(images/nest-tag-bg.gif); background-position: -15px 0; cursor: pointer"></div>';
|
||||
}
|
||||
if (top.ICEcoder.tagString != "script") {
|
||||
top.ICEcoder.nestDisplay.innerHTML += '<a style="display: inline-block; cursor: default; padding: 7px 2px 7px 7px; margin-top: -5px; height: 30px; color: #666">content</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate if the nesting structure of the code is OK
|
||||
top.ICEcoder.updateNestingIndicator = function() {
|
||||
var cM, testToken, nestOK, fileName;
|
||||
var cM, cMdiff, thisCM, testToken, nestOK, fileName, fileExt;
|
||||
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
cMdiff = top.ICEcoder.getcMdiffInstance();
|
||||
thisCM = top.ICEcoder.editorFocusInstance.indexOf('diff') > -1 ? cMdiff : cM;
|
||||
nestOK = true;
|
||||
fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
if (cM && fileName && ["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileName.split(".")[1])==-1) {
|
||||
testToken = cM.getTokenAt({line:cM.lineCount(),ch:cM.lineInfo(cM.lineCount()-1).text.length});
|
||||
if (fileName) {
|
||||
fileExt = fileName.split(".");
|
||||
fileExt = fileExt[fileExt.length-1];
|
||||
}
|
||||
if (thisCM && fileName && ["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileExt)==-1) {
|
||||
testToken = thisCM.getTokenAt({line:thisCM.lineCount(),ch:thisCM.lineInfo(thisCM.lineCount()-1).text.length});
|
||||
nestOK = testToken.type && testToken.type.indexOf("error") == -1 ? true : false;
|
||||
}
|
||||
top.ICEcoder.nestValid.style.background = nestOK ? "#0b0" : "#f00";
|
||||
@@ -149,41 +168,48 @@ top.ICEcoder.updateNestingIndicator = function() {
|
||||
|
||||
// Determine which area of the document we're in
|
||||
top.ICEcoder.caretLocationType = function() {
|
||||
var cM, caretLocType, caretChunk, fileName;
|
||||
var cM, cMdiff, thisCM, caretLocType, caretChunk, fileName, fileExt;
|
||||
|
||||
cM = top.ICEcoder.getcMInstance();
|
||||
cMdiff = top.ICEcoder.getcMdiffInstance();
|
||||
thisCM = top.ICEcoder.editorFocusInstance.indexOf('diff') > -1 ? cMdiff : cM;
|
||||
caretLocType = "Unknown";
|
||||
caretChunk = cM.getValue().substr(0,top.ICEcoder.caretPos+1);
|
||||
caretChunk = thisCM.getValue().substr(0,top.ICEcoder.caretPos+1);
|
||||
|
||||
if(caretChunk.lastIndexOf("<script")>caretChunk.lastIndexOf("/script>")&&caretLocType=="Unknown") {caretLocType = "JavaScript";}
|
||||
else if (caretChunk.lastIndexOf("<?")>caretChunk.lastIndexOf("?>")&&caretLocType=="Unknown") {caretLocType = "PHP";}
|
||||
else if (caretChunk.lastIndexOf("<%")>caretChunk.lastIndexOf("%>")&&caretLocType=="Unknown") {caretLocType = "Ruby";}
|
||||
else if (caretChunk.lastIndexOf("<style")>caretChunk.lastIndexOf("/style>")&&caretLocType=="Unknown") {caretLocType = "CSS";}
|
||||
else if (caretChunk.lastIndexOf("<")>caretChunk.lastIndexOf(">")&&caretLocType=="Unknown") {caretLocType = "HTML";}
|
||||
else if (caretLocType=="Unknown") {caretLocType = "Content";};
|
||||
|
||||
fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
if (fileName) {
|
||||
if (fileName.indexOf(".js")>0) {caretLocType="JavaScript"}
|
||||
else if (fileName.indexOf(".coffee")>0) {caretLocType="CoffeeScript"}
|
||||
else if (fileName.indexOf(".py")>0) {caretLocType="Python"}
|
||||
else if (fileName.indexOf(".rb")>0) {caretLocType="Ruby"}
|
||||
else if (fileName.indexOf(".css")>0) {caretLocType="CSS"}
|
||||
else if (fileName.indexOf(".less")>0) {caretLocType="LESS"}
|
||||
else if (fileName.indexOf(".md")>0) {caretLocType="Markdown"}
|
||||
else if (fileName.indexOf(".xml")>0) {caretLocType="XML"}
|
||||
else if (fileName.indexOf(".sql")>0) {caretLocType="SQL"}
|
||||
else if (fileName.indexOf(".yaml")>0) {caretLocType="YAML"}
|
||||
else if (fileName.indexOf(".java")>0) {caretLocType="Java"}
|
||||
else if (fileName.indexOf(".erl")>0) {caretLocType="Erlang"}
|
||||
else if (fileName.indexOf(".jl")>0) {caretLocType="Julia"}
|
||||
else if (fileName.indexOf(".c")>0 && fileName.indexOf(".cpp")<0 && fileName.indexOf(".cs")<0) {caretLocType="C"}
|
||||
else if (fileName.indexOf(".cpp")>0) {caretLocType="C++"}
|
||||
else if (fileName.indexOf(".cs")>0) {caretLocType="C#"}
|
||||
else if (fileName.indexOf(".go")>0) {caretLocType="Go"}
|
||||
else if (fileName.indexOf(".lua")>0) {caretLocType="Lua"}
|
||||
else if (fileName.indexOf(".pl")>0) {caretLocType="Perl"}
|
||||
else if (fileName.indexOf(".rs")>0) {caretLocType="Rust"}
|
||||
else if (fileName.indexOf(".scss")>0) {caretLocType="Sass"};
|
||||
if (caretLocType == "Content" && fileName) {
|
||||
fileExt = fileName.split(".");
|
||||
fileExt = fileExt[fileExt.length-1];
|
||||
caretLocType =
|
||||
fileExt == "js" ? "JavaScript"
|
||||
: fileExt == "coffee" ? "CoffeeScript"
|
||||
: fileExt == "py" ? "Python"
|
||||
: fileExt == "rb" ? "Ruby"
|
||||
: fileExt == "css" ? "CSS"
|
||||
: fileExt == "less" ? "LESS"
|
||||
: fileExt == "md" ? "Markdown"
|
||||
: fileExt == "xml" ? "XML"
|
||||
: fileExt == "sql" ? "SQL"
|
||||
: fileExt == "yaml" ? "YAML"
|
||||
: fileExt == "java" ? "Java"
|
||||
: fileExt == "erl" ? "Erlang"
|
||||
: fileExt == "jl" ? "Julia"
|
||||
: fileExt == "c" ? "C"
|
||||
: fileExt == "cpp" ? "C++"
|
||||
: fileExt == "cs" ? "C#"
|
||||
: fileExt == "go" ? "Go"
|
||||
: fileExt == "lua" ? "Lua"
|
||||
: fileExt == "pl" ? "Perl"
|
||||
: fileExt == "rs" ? "Rust"
|
||||
: fileExt == "scss" ? "Sass"
|
||||
: "Content";
|
||||
}
|
||||
|
||||
top.ICEcoder.caretLocType = caretLocType;
|
||||
|
||||
11
processes/on-file-dir-delete.php
Normal file
11
processes/on-file-dir-delete.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
die('Sorry, not logged in.');
|
||||
}
|
||||
// Purpose: This file is run when a file or dir is deleted, has $fileLoc and $fileName strings available to it
|
||||
// Langs: PHP only
|
||||
// Example:
|
||||
// $fh = fopen(dirname(__FILE__)."/../file-dir-access.log", 'a');
|
||||
// fwrite($fh, "DELETED >>> ".date("D dS M Y h:i:sa").": ".$fileLoc."/".$fileName."\n");
|
||||
// fclose($fh);
|
||||
?>
|
||||
11
processes/on-file-dir-move.php
Normal file
11
processes/on-file-dir-move.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
die('Sorry, not logged in.');
|
||||
}
|
||||
// Purpose: This file is run when a file or dir is moved, has $fileLoc and $fileName strings available to it
|
||||
// Langs: PHP only
|
||||
// Example:
|
||||
// $fh = fopen(dirname(__FILE__)."/../file-dir-access.log", 'a');
|
||||
// fwrite($fh, "MOVED >>> ".date("D dS M Y h:i:sa").": ".$fileLoc."/".$fileName."\n");
|
||||
// fclose($fh);
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user