Compare commits

...

37 Commits
v1.2 ... v1.3

Author SHA1 Message Date
Matt Pass
22e6228a08 Version 1.3 2012-12-24 13:16:00 +00:00
Matt Pass
b757e42c88 JS hint icon altered
Now includes word HINT
2012-12-24 12:53:01 +00:00
Matt Pass
fdf1ef1cb7 Now considering indents and better templates
Indents are now considered when completing the snippet
Replaced the mix of various template elements with uppercase
alternatives (VAR, INDENT & CURSOR)
2012-12-21 08:43:25 +00:00
Matt Pass
4797ff84d8 Quick effort at getting snippet notations working
You can now press CTRL+space to have your shorthand notation completed.
2 options for function and if setup so far.
What I've written is a pretty horrible hacky effort to get this working.
It does work but needs a LOT of refining.
2012-12-20 22:12:27 +00:00
Matt Pass
3937d733f0 QS var cleaning, removing test logs and /
strClean on GET var selectedFiles
Remove 2 x console.logs
Remove commented text
2 x areas need first slash removing and ending with a slash
Need to var thisWidth to avoid global
2012-12-20 17:15:26 +00:00
Matt Pass
0328643c7c Now only loads file if it exists
if file_exists needs now wraps load PHP and JS code to allow escaping
and server message when files don't exist
2012-12-18 09:15:13 +00:00
Matt Pass
80c73523e3 No need to globally replace end colon
There will be only one
2012-12-18 08:49:07 +00:00
Matt Pass
8c5747798d Tabs now have closelink fist as it's RTL and clear first slash and end
with one for same reason
Else if conditions to give better perf
newBlock has a z-index of 1000 to show above code
Show titles on tab hovers
New setTabWidths function to reset tab widths on demand
2012-12-17 09:06:46 +00:00
Matt Pass
bdf6dbd096 Meta noindex, nofollow, set & clear gutter marks
Meta robots of noindex, nofollow to stop it being indexed by search
engines
Set & clear gutter with line no etc, need to look at using this for code
folding
2012-12-17 09:04:21 +00:00
Matt Pass
0eaef469f9 Tabs change color hover 2012-12-17 08:59:59 +00:00
Matt Pass
f2d3615e26 Tabs RTL dir, r-align, nowrap, hidden overflow
This is to allow them to be cropped off to the left side if not big
enough
2012-12-17 08:52:28 +00:00
Matt Pass
24f05a1c03 Meta robots noindex, nofollow
Don't allow ICEcoder installations to be indexed by search engines
Remove a couple of console logs from testing.
2012-12-17 08:50:11 +00:00
Matt Pass
570642d820 Meta robots noindex, no follow & dont selectTheme
Don't want ICEcoder installs showing up on search engine results
Also no need to selectTheme onChange of linewrapping select menu
2012-12-17 08:48:41 +00:00
Matt Pass
fd794f99d2 UTF-8 and meta robots noindex, nofollow
Need UTF-8 settings like other pages and don't want ICEcoder
installation showing up on search engine results
2012-12-17 08:47:41 +00:00
Matt Pass
9a95bae6ba Meta robots noindex, nofollow
To stop ICEcoder showing up on search engine results
2012-12-17 08:46:43 +00:00
Matt Pass
1b04504617 Find in selectedFiles & fix to find in filenames
Get an array of selectedFiles if there is one
Fix by resetting foundInSelected on each loop
targetURL is now lowercase as standard
Only provide results if it's a file
Also only provide results if the beginning of the path matches and
either the targetURL is the same or if it forms the beginning
Set $bFile = true if the file which contains our match doesn't match the
selected file
2012-12-17 08:40:37 +00:00
Matt Pass
2a2cd81149 Pass thru list of selected files on find/replace
If we choose selected files when performing a find/replace, build up a
colon seperated list and tack on as a querysting
2012-12-17 08:29:12 +00:00
Matt Pass
2bb961b7a8 Now only loads & runs if JSHint is available
Script only loads if file is available
Processes in function only run if JSHINT is available
2012-12-13 09:16:13 +00:00
Matt Pass
01b035d7af Clear or set JS Hints based on codeAssist
On toggle of codeAssist and being false, clear all JS Hint widgets in
all tabs
If turned on though, set in current tab
Run updateHints on switching tab (helps complete above step)
2012-12-13 08:56:53 +00:00
Matt Pass
8d0de398fd Only if codeAssist is on run JS Hint 2012-12-13 08:54:21 +00:00
Matt Pass
2ebec54476 Line Wrapping and Banned Paths Options
New options available to set in the settings screen
Also passes through to useNewSettings function for in session changes
A couple of other minor changes to style and layout
2012-12-12 17:56:43 +00:00
Matt Pass
b66d5fe8d3 Slight tweaks to CSS and commented code 2012-12-12 09:23:58 +00:00
Matt Pass
0f989f249f Moving function to the info & display section 2012-12-12 09:23:02 +00:00
Matt Pass
6980bdcf7f No need for 3rd arg here 2012-12-11 18:05:11 +00:00
Matt Pass
975a016974 Added width setting twice 2012-12-11 18:04:57 +00:00
Matt Pass
4be1b45896 Upgrading to CM v3 from v3 RC2
Upgrading to official v3 released now it's been released
2012-12-11 17:35:57 +00:00
Matt Pass
8e10824189 Sent argument and returned objected are different
It now takes a {line, ch} object as second argument, instead of an
integer, and will return a {from: {line, ch}, to: {line, ch}} object.
2012-12-11 11:53:06 +00:00
Matt Pass
1a881b4eaf JS Hint available as icon
Takes user to website for now
2012-12-10 17:57:17 +00:00
Matt Pass
2a9e91dd55 JS Hint Icon styles, vars & clear & set timeout
New styles for icon shown in widget
Var waiting used by setTimeout and and widgets array
Set & clear timeouts on change of editor content
2012-12-10 17:56:45 +00:00
Matt Pass
725ea8999a Load the JS Hint plugin JS file 2012-12-10 17:54:59 +00:00
Matt Pass
3427b736ec New updateHints function for JS Hint
Calls on JS Hint and returns with any errors and shows as a widget under
relevant line
This example code taken from CodeMirror's Widgets example
2012-12-10 17:54:43 +00:00
Matt Pass
1dde9d0198 JS Hint plugin added
Added as a plugin, will make optional in the future as a few hooks in
ICEcoder's code by default
2012-12-10 17:52:48 +00:00
Matt Pass
7577c3552d Folding on tag & braces again now
Folds according to the content/lang type at the cursor.
Nest step is to set the cursor to the clicked line, get the type and set
cursor back again, then we know what we can fold on.
2012-12-04 18:07:36 +00:00
Matt Pass
30de655fb2 CSS alts and moving to new on function
No longer setting BG color or color on CodeMirror class
onCursorActivity, onChange, onScroll and onGutterClick now set outside
of main codeMirror object and appended
Using addLineClass now instead of setLineClass
2012-12-03 19:14:20 +00:00
Matt Pass
09cf5589f5 Use addLineClass and removeLineClass
These are used in place of setLineClass now
2012-12-03 19:11:15 +00:00
Matt Pass
b206f8ab78 Remove caretLocType in nest & add/removeLineClass
Don't end the nestDisplay with the caretLocType, this is shown already
near the line/chr counter
For some reason, the array pos of the visible tabs is 4 not 5
Use new removeLineClass and addLineClass methods instead of setLineClass
2012-12-03 19:10:36 +00:00
Matt Pass
f358cdea5b Upgrading to CodeMirror v3 RC2 2012-12-03 19:04:16 +00:00
37 changed files with 8868 additions and 3492 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,174 +0,0 @@
.CodeMirror {
line-height: 1em;
font-family: monospace;
/* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
position: relative;
/* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
overflow: hidden;
}
.CodeMirror-scroll {
overflow: auto;
height: 300px;
/* This is needed to prevent an IE[67] bug where the scrolled content
is visible outside of the scrolling box. */
position: relative;
outline: none;
}
/* Vertical scrollbar */
.CodeMirror-scrollbar {
position: absolute;
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
z-index: 5;
}
.CodeMirror-scrollbar-inner {
/* This needs to have a nonzero width in order for the scrollbar to appear
in Firefox and IE9. */
width: 1px;
}
.CodeMirror-scrollbar.cm-sb-overlap {
/* Ensure that the scrollbar appears in Lion, and that it overlaps the content
rather than sitting to the right of it. */
position: absolute;
z-index: 1;
float: none;
right: 0;
min-width: 12px;
}
.CodeMirror-scrollbar.cm-sb-nonoverlap {
min-width: 12px;
}
.CodeMirror-scrollbar.cm-sb-ie7 {
min-width: 18px;
}
.CodeMirror-gutter {
position: absolute; left: 0; top: 0;
z-index: 10;
background-color: #f7f7f7;
border-right: 1px solid #eee;
min-width: 2em;
height: 100%;
}
.CodeMirror-gutter-text {
color: #aaa;
text-align: right;
padding: .4em .2em .4em .4em;
white-space: pre !important;
cursor: default;
}
.CodeMirror-lines {
padding: .4em;
white-space: pre;
cursor: text;
}
.CodeMirror pre {
-moz-border-radius: 0;
-webkit-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
border-width: 0; margin: 0; padding: 0; background: transparent;
font-family: inherit;
font-size: inherit;
padding: 0; margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
overflow: visible;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden;
}
.CodeMirror textarea {
outline: none !important;
}
.CodeMirror pre.CodeMirror-cursor {
z-index: 10;
position: absolute;
visibility: hidden;
border-left: 1px solid black;
border-right: none;
width: 0;
}
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
width: auto;
border: 0;
background: transparent;
background: rgba(0, 200, 0, .4);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
}
/* Kludge to turn off filter in ie9+, which also accepts rgba */
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
.CodeMirror-focused pre.CodeMirror-cursor {
visibility: visible;
}
div.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* Default theme */
.cm-s-default span.cm-keyword {color: #708;}
.cm-s-default span.cm-atom {color: #219;}
.cm-s-default span.cm-number {color: #164;}
.cm-s-default span.cm-def {color: #00f;}
.cm-s-default span.cm-variable {color: black;}
.cm-s-default span.cm-variable-2 {color: #05a;}
.cm-s-default span.cm-variable-3 {color: #085;}
.cm-s-default span.cm-property {color: black;}
.cm-s-default span.cm-operator {color: black;}
.cm-s-default span.cm-comment {color: #a50;}
.cm-s-default span.cm-string {color: #a11;}
.cm-s-default span.cm-string-2 {color: #f50;}
.cm-s-default span.cm-meta {color: #555;}
.cm-s-default span.cm-error {color: #f00;}
.cm-s-default span.cm-qualifier {color: #555;}
.cm-s-default span.cm-builtin {color: #30a;}
.cm-s-default span.cm-bracket {color: #997;}
.cm-s-default span.cm-tag {color: #170;}
.cm-s-default span.cm-attribute {color: #00c;}
.cm-s-default span.cm-header {color: blue;}
.cm-s-default span.cm-quote {color: #090;}
.cm-s-default span.cm-hr {color: #999;}
.cm-s-default span.cm-link {color: #00c;}
span.cm-header, span.cm-strong {font-weight: bold;}
span.cm-em {font-style: italic;}
span.cm-emstrong {font-style: italic; font-weight: bold;}
span.cm-link {text-decoration: underline;}
span.cm-invalidchar {color: #f00;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
@media print {
/* Hide the cursor when printing */
.CodeMirror pre.CodeMirror-cursor {
visibility: hidden;
}
}

View File

@@ -1,83 +0,0 @@
/* ambiance theme for codemirror */
/* Color scheme */
.cm-s-ambiance .cm-keyword { color: #cda869; }
.cm-s-ambiance .cm-atom { color: #CF7EA9; }
.cm-s-ambiance .cm-number { color: #78CF8A; }
.cm-s-ambiance .cm-def { color: #aac6e3; }
.cm-s-ambiance .cm-variable { color: #ffb795; }
.cm-s-ambiance .cm-variable-2 { color: #eed1b3; }
.cm-s-ambiance .cm-variable-3 { color: #faded3; }
.cm-s-ambiance .cm-property { color: #eed1b3; }
.cm-s-ambiance .cm-operator {color: #fa8d6a;}
.cm-s-ambiance .cm-comment { color: #555; font-style:italic; }
.cm-s-ambiance .cm-string { color: #8f9d6a; }
.cm-s-ambiance .cm-string-2 { color: #9d937c; }
.cm-s-ambiance .cm-meta { color: #D2A8A1; }
.cm-s-ambiance .cm-error { color: #AF2018; }
.cm-s-ambiance .cm-qualifier { color: yellow; }
.cm-s-ambiance .cm-builtin { color: #9999cc; }
.cm-s-ambiance .cm-bracket { color: #24C2C7; }
.cm-s-ambiance .cm-tag { color: #fee4ff }
.cm-s-ambiance .cm-attribute { color: #9B859D; }
.cm-s-ambiance .cm-header {color: blue;}
.cm-s-ambiance .cm-quote { color: #24C2C7; }
.cm-s-ambiance .cm-hr { color: pink; }
.cm-s-ambiance .cm-link { color: #F4C20B; }
.cm-s-ambiance .cm-special { color: #FF9D00; }
.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);
}
.CodeMirror-focused .cm-s-ambiance .CodeMirror-selected {
background: rgba(255, 255, 255, 0.10);
}
/* Editor styling */
.cm-s-ambiance {
line-height: 1.40em;
font-family: Monaco, Menlo,"Andale Mono","lucida console","Courier New",monospace !important;
color: #E6E1DC;
background-color: #202020;
-webkit-box-shadow: inset 0 0 10px black;
-moz-box-shadow: inset 0 0 10px black;
-o-box-shadow: inset 0 0 10px black;
box-shadow: inset 0 0 10px black;
}
.cm-s-ambiance .CodeMirror-gutter {
background: #3D3D3D;
padding: 0 5px;
text-shadow: #333 1px 1px;
border-right: 1px solid #4D4D4D;
box-shadow: 0 10px 20px black;
}
.cm-s-ambiance .CodeMirror-gutter .CodeMirror-gutter-text {
text-shadow: 0px 1px 1px #4d4d4d;
color: #222;
}
.cm-s-ambiance .CodeMirror-lines {
}
.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor {
border-left: 1px solid #7991E8;
}
.cm-s-ambiance .activeline {
background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031);
}
.cm-s-ambiance {
background: #202020;
}
.cm-s-ambiance .CodeMirror-gutter {
background: #3d3d3d;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,239 @@
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
}
.CodeMirror-scroll {
/* Set scrolling behaviour here */
overflow: auto;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
}
/* CURSOR */
.CodeMirror pre.CodeMirror-cursor {
border-left: 1px solid black;
}
/* Shown when moving in bi-directional text */
.CodeMirror pre.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
width: auto;
border: 0;
background: transparent;
background: rgba(0, 200, 0, .4);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
}
/* Kludge to turn off filter in ie9+, which also accepts rgba */
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
/* DEFAULT THEME */
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable {color: black;}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-property {color: black;}
.cm-s-default .cm-operator {color: black;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-error {color: #f00;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-emstrong {font-style: italic; font-weight: bold;}
.cm-link {text-decoration: underline;}
.cm-invalidchar {color: #f00;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
line-height: 1;
position: relative;
overflow: hidden;
}
.CodeMirror-scroll {
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px; padding-right: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actuall scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
z-index: 6;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
height: 100%;
display: inline-block;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-lines {
cursor: text;
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
}
.CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden;
}
.CodeMirror-measure {
position: absolute;
width: 100%; height: 0px;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-measure pre { position: static; }
.CodeMirror pre.CodeMirror-cursor {
position: absolute;
visibility: hidden;
border-right: none;
width: 0;
}
.CodeMirror-focused pre.CodeMirror-cursor {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }
@media print {
/* Hide the cursor when printing */
.CodeMirror pre.CodeMirror-cursor {
visibility: hidden;
}
}

View File

@@ -0,0 +1,6 @@
.cm-s-ambiance.CodeMirror {
-webkit-box-shadow: none;
-moz-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
/* Port of TextMate's Blackboard theme */ /* Port of TextMate's Blackboard theme */
.cm-s-blackboard { background: #0C1021; color: #F8F8F8; } .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; } .cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
.cm-s-blackboard .CodeMirror-gutter { background: #0C1021; border-right: 0; } .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
.cm-s-blackboard .CodeMirror-gutter-text { color: #888; } .cm-s-blackboard .CodeMirror-linenumber { color: #888; }
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } .cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
.cm-s-blackboard .cm-keyword { color: #FBDE2D; } .cm-s-blackboard .cm-keyword { color: #FBDE2D; }

View File

@@ -1,7 +1,7 @@
.cm-s-cobalt { background: #002240; color: white; } .cm-s-cobalt.CodeMirror { background: #002240; color: white; }
.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; } .cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
.cm-s-cobalt .CodeMirror-gutter { background: #002240; border-right: 1px solid #aaa; } .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-cobalt .CodeMirror-gutter-text { color: #d0d0d0; } .cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-cobalt span.cm-comment { color: #08f; } .cm-s-cobalt span.cm-comment { color: #08f; }

View File

@@ -1,7 +1,7 @@
.cm-s-erlang-dark { background: #002240; color: white; } .cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; } .cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
.cm-s-erlang-dark .CodeMirror-gutter { background: #002240; border-right: 1px solid #aaa; } .cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-erlang-dark .CodeMirror-gutter-text { color: #d0d0d0; } .cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-erlang-dark span.cm-atom { color: #845dc4; } .cm-s-erlang-dark span.cm-atom { color: #845dc4; }

View File

@@ -9,15 +9,15 @@ Ported to CodeMirror by Peter Kroon
font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important;
} }
.cm-s-lesser-dark { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } .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 div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-lesser-dark .CodeMirror-lines { margin-left:3px; margin-right:3px; }/*editable code holder*/ .cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
.cm-s-lesser-dark .CodeMirror-gutter { background: #262626; border-right:1px solid #aaa; padding-right:3px; min-width:2.5em; } .cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
.cm-s-lesser-dark .CodeMirror-gutter-text { color: #777; } .cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
.cm-s-lesser-dark span.cm-keyword { color: #599eff; } .cm-s-lesser-dark span.cm-keyword { color: #599eff; }
.cm-s-lesser-dark span.cm-atom { color: #C2B470; } .cm-s-lesser-dark span.cm-atom { color: #C2B470; }

View File

@@ -1,9 +1,9 @@
/* Based on Sublime Text's Monokai theme */ /* Based on Sublime Text's Monokai theme */
.cm-s-monokai {background: #272822; color: #f8f8f2;} .cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} .cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
.cm-s-monokai .CodeMirror-gutter {background: #272822; border-right: 0px;} .cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
.cm-s-monokai .CodeMirror-gutter-text {color: #d0d0d0;} .cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;}
.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} .cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}
.cm-s-monokai span.cm-comment {color: #75715e;} .cm-s-monokai span.cm-comment {color: #75715e;}

View File

@@ -1,9 +1,9 @@
/* Loosely based on the Midnight Textmate theme */ /* Loosely based on the Midnight Textmate theme */
.cm-s-night { background: #0a001f; color: #f8f8f8; } .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
.cm-s-night div.CodeMirror-selected { background: #447 !important; } .cm-s-night div.CodeMirror-selected { background: #447 !important; }
.cm-s-night .CodeMirror-gutter { background: #0a001f; border-right: 1px solid #aaa; } .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-night .CodeMirror-gutter-text { color: #f8f8f8; } .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-night span.cm-comment { color: #6900a1; } .cm-s-night span.cm-comment { color: #6900a1; }

View File

@@ -1,9 +1,9 @@
.cm-s-rubyblue { font:13px/1.4em Trebuchet, Verdana, sans-serif; } /* - customized editor font - */ .cm-s-rubyblue { font:13px/1.4em Trebuchet, Verdana, sans-serif; } /* - customized editor font - */
.cm-s-rubyblue { background: #112435; color: white; } .cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; } .cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
.cm-s-rubyblue .CodeMirror-gutter { background: #1F4661; border-right: 7px solid #3E7087; min-width:2.5em; } .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
.cm-s-rubyblue .CodeMirror-gutter-text { color: white; } .cm-s-rubyblue .CodeMirror-linenumber { color: white; }
.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } .cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
.cm-s-twilight { background: #141414; color: #f7f7f7; } /**/ .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/ .cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
.cm-s-twilight .CodeMirror-gutter { background: #222; border-right: 1px solid #aaa; } .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
.cm-s-twilight .CodeMirror-gutter-text { color: #aaa; } .cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ .cm-s-twilight .cm-keyword { color: #f9ee98; } /**/
@@ -22,5 +22,5 @@
.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ .cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
.cm-s-twilight .cm-header { color: #FF6400; } .cm-s-twilight .cm-header { color: #FF6400; }
.cm-s-twilight .cm-hr { color: #AEAEAE; } .cm-s-twilight .cm-hr { color: #AEAEAE; }
.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; font-underline:none; } /**/ .cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/

View File

@@ -1,10 +1,10 @@
/* Taken from the popular Visual Studio Vibrant Ink Schema */ /* Taken from the popular Visual Studio Vibrant Ink Schema */
.cm-s-vibrant-ink { background: black; color: white; } .cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; } .cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
.cm-s-vibrant-ink .CodeMirror-gutter { background: #002240; border-right: 1px solid #aaa; } .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-vibrant-ink .CodeMirror-gutter-text { color: #d0d0d0; } .cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-vibrant-ink .cm-keyword { color: #CC7832; } .cm-s-vibrant-ink .cm-keyword { color: #CC7832; }

View File

@@ -20,10 +20,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
.cm-s-xq-dark { background: #0a001f; color: #f8f8f8; } .cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
.cm-s-xq-dark span.CodeMirror-selected { background: #a8f !important; } .cm-s-xq-dark span.CodeMirror-selected { background: #a8f !important; }
.cm-s-xq-dark .CodeMirror-gutter { background: #0a001f; border-right: 1px solid #aaa; } .cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-xq-dark .CodeMirror-gutter-text { color: #f8f8f8; } .cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-xq-dark span.cm-keyword {color: #FFBD40;} .cm-s-xq-dark span.cm-keyword {color: #FFBD40;}

View File

@@ -5,6 +5,7 @@
<head> <head>
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> editor</title> <title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> editor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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"]; ?>/lib/codemirror.css">
<!-- <!--
codemirror-compressed.js codemirror-compressed.js
@@ -18,14 +19,17 @@ if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder
$activeLineBG = $ICEcoder["theme"]=="eclipse" || $ICEcoder["theme"]=="elegant" || $ICEcoder["theme"]=="neat" ? "#ccc" : "#000"; $activeLineBG = $ICEcoder["theme"]=="eclipse" || $ICEcoder["theme"]=="elegant" || $ICEcoder["theme"]=="neat" ? "#ccc" : "#000";
?>"> ?>">
<style type="text/css"> <style type="text/css">
.CodeMirror {position: absolute; width: 0; background-color: #fff; color: #000; top: 0px; width: 100%; font-size: 13px; z-index: 1} .CodeMirror {position: absolute; top: 0px; width: 100%; font-size: 13px; z-index: 1}
.CodeMirror-scroll {height: auto; overflow: visible} .CodeMirror-scroll {} // was: height: auto; overflow: visible
/* Make sure this next one remains the 3rd item, updated with JS */ /* Make sure this next one remains the 3rd item, updated with JS */
.cm-s-activeLine {background: <?php echo $activeLineBG;?> !important} .cm-s-activeLine {background: <?php echo $activeLineBG;?> !important}
span.CodeMirror-matchhighlight {background: #555} span.CodeMirror-matchhighlight {background: #555}
.CodeMirror-focused span.CodeMirror-matchhighlight {color: #000; background: #555; !important} .CodeMirror-focused span.CodeMirror-matchhighlight {color: #000; background: #555; !important}
/* Make sure this next one remains the 6th item, updated with JS */ /* Make sure this next one remains the 6th item, updated with JS */
.cm-tab:after {position: relative; display: inline-block; width: 0; left: -1.4em; overflow: visible; color: #aaa; content: "<?php if($ICEcoder["visibleTabs"]) {echo '\\21e5';};?>";} .cm-tab:after {position: relative; display: inline-block; width: 0; left: -1.4em; overflow: visible; color: #aaa; content: "<?php if($ICEcoder["visibleTabs"]) {echo '\\21e5';};?>";}
.lint-error {font-family: arial; font-size: 80%; background: #ccc; color: #b00; padding: 3px 5px}
.lint-error-icon {background-color: #b00; color: #fff; font-weight: bold; border-radius: 50%; padding: 0 3px; margin-right: 5px}
.snippetFrame {border: 1px; width: 100%}
</style> </style>
</head> </head>
@@ -92,44 +96,17 @@ span.CodeMirror-matchhighlight {background: #555}
<script> <script>
function createNewCMInstance(num) { function createNewCMInstance(num) {
var fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]; var fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
top.ICEcoder.foldStyle = '<span style="position: absolute; display: inline-block; width: 13px; height: 13px; left: 0; background-color: #b00; color: #fff; text-align: center; cursor: pointer"><span style="position: relative; left: -1px">+</span></span> %N%'; top.ICEcoder['cM'+num+'waiting'] = "";
var codeFoldTag = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder,top.ICEcoder.foldStyle); top.ICEcoder['cM'+num+'widgets'] = [];
var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder,top.ICEcoder.foldStyle);
window['cM'+num] = CodeMirror(document.body, { window['cM'+num] = CodeMirror(document.body, {
mode: "application/x-httpd-php", mode: "application/x-httpd-php",
lineNumbers: true, lineNumbers: true,
lineWrapping: true, lineWrapping: top.ICEcoder.lineWrapping,
indentUnit: top.ICEcoder.tabWidth, indentUnit: top.ICEcoder.tabWidth,
tabSize: top.ICEcoder.tabWidth, tabSize: top.ICEcoder.tabWidth,
indentWithTabs: true, indentWithTabs: true,
electricChars: false, electricChars: false,
onCursorActivity: function(thisCM) {
top.ICEcoder.getCaretPosition();
top.ICEcoder.updateCharDisplay();
window['cM'+num].setLineClass(top.ICEcoder['cMActiveLine'+num], null);
if(!window['cM'+num].somethingSelected()) {
top.ICEcoder['cMActiveLine'+num] = window['cM'+num].setLineClass(window['cM'+num].getCursor().line, "cm-s-activeLine");
}
thisCM.matchHighlight("CodeMirror-matchhighlight");
top.ICEcoder.cssColorPreview();
},
onChange: function() {
// If we're not loading the file, it's a change, so update tab
if (!top.ICEcoder.loadingFile) {
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 1;
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);
}
top.ICEcoder.getCaretPosition();
top.ICEcoder.dontUpdateNest = false;
top.ICEcoder.updateCharDisplay();
top.ICEcoder.updateNestingIndicator();
if (top.ICEcoder.findMode) {
top.ICEcoder.results.splice(top.ICEcoder.findResult,1);
top.document.getElementById('results').innerHTML = top.ICEcoder.results.length + " results";
top.ICEcoder.findMode = false;
}
},
onKeyEvent: function(thisCM, e) { onKeyEvent: function(thisCM, e) {
top.ICEcoder.redoChangedContent(e); top.ICEcoder.redoChangedContent(e);
top.ICEcoder.findReplace('find',true,false); top.ICEcoder.findReplace('find',true,false);
@@ -173,10 +150,6 @@ function createNewCMInstance(num) {
}; };
lastKeyCode = e.keyCode; lastKeyCode = e.keyCode;
}, },
onScroll: function() {
top.ICEcoder.mouseDown=false;
},
onGutterClick: !fileName || (fileName && fileName.indexOf(".js") == -1 && fileName.indexOf(".coffee") == -1 && fileName.indexOf(".php") && fileName.indexOf(".rb") == -1) ? codeFoldTag : codeFoldBrace,
extraKeys: { extraKeys: {
"Tab": function(cm) {CodeMirror.commands[top.ICEcoder.tabsIndent ? "defaultTab" : "insertTab"](cm);}, "Tab": function(cm) {CodeMirror.commands[top.ICEcoder.tabsIndent ? "defaultTab" : "insertTab"](cm);},
"Shift-Tab": "indentLess", "Shift-Tab": "indentLess",
@@ -185,12 +158,66 @@ function createNewCMInstance(num) {
} }
}); });
window['cM'+num].on("cursorActivity", function(thisCM) {
top.ICEcoder.getCaretPosition();
top.ICEcoder.updateCharDisplay();
window['cM'+num].removeLineClass(top.ICEcoder['cMActiveLine'+num], "background");
if(!window['cM'+num].somethingSelected()) {
top.ICEcoder['cMActiveLine'+num] = window['cM'+num].addLineClass(window['cM'+num].getCursor().line, "background","cm-s-activeLine");
}
thisCM.matchHighlight("CodeMirror-matchhighlight");
top.ICEcoder.cssColorPreview();
}
);
window['cM'+num].on("change", function(thisCM, changeObj) {
// If we're not loading the file, it's a change, so update tab
if (!top.ICEcoder.loadingFile) {
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 1;
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);
}
top.ICEcoder.getCaretPosition();
top.ICEcoder.dontUpdateNest = false;
top.ICEcoder.updateCharDisplay();
top.ICEcoder.updateNestingIndicator();
if (top.ICEcoder.findMode) {
top.ICEcoder.results.splice(top.ICEcoder.findResult,1);
top.document.getElementById('results').innerHTML = top.ICEcoder.results.length + " results";
top.ICEcoder.findMode = false;
}
if (top.ICEcoder.codeAssist) {
clearTimeout(window['cM'+num+'waiting']);
window['cM'+num+'waiting'] = setTimeout(top.ICEcoder.updateHints, 100);
}
}
);
window['cM'+num].on("scroll", function(thisCM) {
top.ICEcoder.mouseDown=false;
}
);
window['cM'+num].on("gutterClick", function(thisCM, line, gutter, clickEvent) {
["JavaScript","CoffeeScript","PHP","Ruby"].indexOf(top.ICEcoder.caretLocType) > -1
? codeFoldBrace(window['cM'+num], line) : codeFoldTag(window['cM'+num], line);
window['cM'+num].setGutterMarker(line, "CodeMirror-linenumbers", document.createTextNode("+ "+(line+1)));
setTimeout(function() {
window['cM'+num].setGutterMarker(line, "CodeMirror-linenumbers", null);
},1000);
}
);
// Now create the active line for this CodeMirror object // Now create the active line for this CodeMirror object
top.ICEcoder['cMActiveLine'+num] = window['cM'+num].setLineClass(0, "cm-s-activeLine"); top.ICEcoder['cMActiveLine'+num] = window['cM'+num].addLineClass(0, "background", "cm-s-activeLine");
}; };
// var top.ICEcoder.foldStyle = '<span style="position: absolute; display: inline-block; width: 13px; height: 13px; left: 0; background-color: #b00; color: #fff; text-align: center; cursor: pointer"><span style="position: relative; left: -1px">+</span></span> %N%';
var codeFoldTag = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder);
var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);
</script> </script>
<iframe name="snippetLoader" src="snippets/snippet-display.php" style="display: none"></iframe>
</body> </body>
</html> </html>

View File

@@ -4,6 +4,7 @@
<html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files');top.ICEcoder.canResizeFilesW()}" onContextMenu="top.ICEcoder.rightClickedFile=top.ICEcoder.thisFileFolderLink; return top.ICEcoder.showMenu()" onClick="top.ICEcoder.selectFileFolder()"> <html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'files');top.ICEcoder.canResizeFilesW()}" onContextMenu="top.ICEcoder.rightClickedFile=top.ICEcoder.thisFileFolderLink; return top.ICEcoder.showMenu()" onClick="top.ICEcoder.selectFileFolder()">
<head> <head>
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager</title> <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/files.css">
<script src="lib/ice-coder.js" type="text/javascript"></script> <script src="lib/ice-coder.js" type="text/javascript"></script>
</head> </head>

View File

@@ -35,6 +35,11 @@ window.onbeforeunload = function() {
</script> </script>
<script language="JavaScript" src="lib/ice-coder.js"></script> <script language="JavaScript" src="lib/ice-coder.js"></script>
<?php
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
echo '<script src="plugins/jshint/jshint.js"></script>';
}
?>
</head> </head>
<body onLoad="<?php <body onLoad="<?php
@@ -50,6 +55,8 @@ window.onbeforeunload = function() {
echo $ICEcoder["tabsIndent"] ? 'true' : 'false'; echo $ICEcoder["tabsIndent"] ? 'true' : 'false';
echo ';top.ICEcoder.openLastFiles = '; echo ';top.ICEcoder.openLastFiles = ';
echo $ICEcoder["openLastFiles"] ? 'true' : 'false'; echo $ICEcoder["openLastFiles"] ? 'true' : 'false';
echo ';top.ICEcoder.lineWrapping = ';
echo $ICEcoder["lineWrapping"] ? 'true' : 'false';
echo ';top.ICEcoder.tabWidth = '; echo ';top.ICEcoder.tabWidth = ';
echo $ICEcoder["tabWidth"]; echo $ICEcoder["tabWidth"];
?>;ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);"> ?>;ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);">
@@ -117,7 +124,7 @@ window.onbeforeunload = function() {
<div id="tabsBar" class="tabsBar" onContextMenu="return false"> <div id="tabsBar" class="tabsBar" onContextMenu="return false">
<?php <?php
for ($i=1;$i<=100;$i++) { for ($i=1;$i<=100;$i++) {
echo '<div id="tab'.$i.'" class="tab" draggable="true" onClick="ICEcoder.canSwitchTabs ? ICEcoder.switchTab('.$i.') : ICEcoder.canSwitchTabs=true"></div>'; echo '<div id="tab'.$i.'" class="tab" draggable="true" onClick="ICEcoder.canSwitchTabs ? ICEcoder.switchTab('.$i.') : ICEcoder.canSwitchTabs=true; thisColor=\'#000\'" onMouseOver="thisColor=this.style.color;this.style.color=\'#000\'" onMouseOut="this.style.color=thisColor"></div>';
} }
?><div class="newTab" onClick="ICEcoder.newTab()"><img src="images/nav-new.png"></div> ?><div class="newTab" onClick="ICEcoder.newTab()"><img src="images/nav-new.png"></div>
</div> </div>

View File

@@ -17,9 +17,11 @@ $ICEcoder = array(
array("Zip It!","plugins/zip-it/icon.png","margin-top: 3px; margin-left: 3px","plugins/zip-it/?zip=|&exclude=*.doc*.gif*.jpg*.jpeg*.pdf*.png*.swf*.xml*.zip","fileControl:<b>Zipping Files</b>","30"), array("Zip It!","plugins/zip-it/icon.png","margin-top: 3px; margin-left: 3px","plugins/zip-it/?zip=|&exclude=*.doc*.gif*.jpg*.jpeg*.pdf*.png*.swf*.xml*.zip","fileControl:<b>Zipping Files</b>","30"),
array("ICErepo","plugins/ice-repo/icon.png","margin-top: 3px","plugins/ice-repo","_blank",""), array("ICErepo","plugins/ice-repo/icon.png","margin-top: 3px","plugins/ice-repo","_blank",""),
array("Dochub","plugins/dochub/icon.png","margin-top: 3px","http://dochub.io","_blank",""), array("Dochub","plugins/dochub/icon.png","margin-top: 3px","http://dochub.io","_blank",""),
array("Terminal","plugins/terminal/icon.gif","margin-top: 3px","plugins/terminal","_blank","") array("Terminal","plugins/terminal/icon.gif","margin-top: 3px","plugins/terminal","_blank",""),
array("JS Hint","plugins/jshint/icon.png","margin-top: 3px","http://www.jshint.com","_blank","")
), ),
"theme" => "default", "theme" => "default",
"lineWrapping" => true,
"tabWidth" => 4, "tabWidth" => 4,
"previousFiles" => "", "previousFiles" => "",
"last10Files" => "" "last10Files" => ""

View File

@@ -20,23 +20,23 @@ $fileName = basename($file);
if ($_GET['action']=="load") { if ($_GET['action']=="load") {
echo '<script>action="load";</script>'; echo '<script>action="load";</script>';
// Determine what to do based on mime type if (file_exists($file)) {
$finfo = finfo_open(FILEINFO_MIME_TYPE); // Determine what to do based on mime type
if (strpos(finfo_file($finfo, $file),"text")===0) { $finfo = finfo_open(FILEINFO_MIME_TYPE);
if (file_exists($file)) { if (strpos(finfo_file($finfo, $file),"text")===0) {
echo '<script>fileType="text";'; echo '<script>fileType="text";';
echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";'; echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
echo '</script>'; echo '</script>';
$loadedFile = file_get_contents($file); $loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>'; echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
} else if (strpos(finfo_file($finfo, $file),"image")===0) {
echo '<script>fileType="image";fileName=\''.$fileLoc."/".$fileName.'\'</script>';
} else { } else {
echo '<script>fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');</script>'; echo '<script>fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');</script>';
} };
} else if (strpos(finfo_file($finfo, $file),"image")===0) {
echo '<script>fileType="image";fileName=\''.$fileLoc."/".$fileName.'\'</script>';
} else { } else {
echo '<script>fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');</script>'; echo '<script>fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');</script>';
}; }
finfo_close($finfo); finfo_close($finfo);
}; };
@@ -219,6 +219,9 @@ if (action=="load") {
if (!top.ICEcoder.content.contentWindow.createNewCMInstance) { if (!top.ICEcoder.content.contentWindow.createNewCMInstance) {
console.log('There was tech hiccup, likely something wasn\'t quite ready. So ICEcoder reloaded it\'s file control again.'); console.log('There was tech hiccup, likely something wasn\'t quite ready. So ICEcoder reloaded it\'s file control again.');
window.location.reload(); window.location.reload();
<?php
if (file_exists($file)) {
?>
} else { } else {
top.ICEcoder.loadingFile = true; top.ICEcoder.loadingFile = true;
// Reset the various states back to their initial setting // Reset the various states back to their initial setting
@@ -240,11 +243,14 @@ if (action=="load") {
// Then clean it up, set the text cursor, update the display and get the character data // Then clean it up, set the text cursor, update the display and get the character data
top.ICEcoder.contentCleanUp(); top.ICEcoder.contentCleanUp();
top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].setLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], null); top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], "background");
top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].setLineClass(0, "cm-s-activeLine"); top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].addLineClass(0, "background", "cm-s-activeLine");
top.ICEcoder.nextcMInstance++; top.ICEcoder.nextcMInstance++;
top.ICEcoder.openFileMDTs.push('<?php echo filemtime($file); ?>'); top.ICEcoder.openFileMDTs.push('<?php echo filemtime($file); ?>');
top.ICEcoder.loadingFile = false; top.ICEcoder.loadingFile = false;
<?php
;};
?>
} }
},4); },4);
} }

View File

@@ -5,6 +5,7 @@
<head> <head>
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</title> <title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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">
</head> </head>

View File

@@ -99,7 +99,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
.editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px} .editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px}
.editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 40px; padding-left: 41px; background-color: #888;} .editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 40px; padding-left: 41px; background-color: #888;}
.tabsBar .tab {display: none; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 5px 8px 2px 8px; font-size: 10px; border-left: solid 1px #fff; border-right: solid 1px #777; color: #fff; cursor: pointer; .tabsBar .tab {display: none; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 5px 8px 2px 8px; font-size: 10px; border-left: solid 1px #fff; border-right: solid 1px #777; color: #fff; direction: rtl; text-align: right; white-space: nowrap; overflow: hidden; cursor: pointer;
-webkit-transition: all 0.15s; -webkit-transition: all 0.15s;
-moz-transition: all 0.15s; -moz-transition: all 0.15s;
transition: all 0.15s; transition: all 0.15s;
@@ -143,4 +143,4 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
.screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb} .screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb}
.screenCenter .accountPassword {border: 0; background-color: #333; color: #fff; height: 20px} .screenCenter .accountPassword {border: 0; background-color: #333; color: #fff; height: 20px}
.screenCenter .button {border: 0; background: #444; color: #eee; height: 22px; cursor: pointer} .screenCenter .button {border: 0; background: #444; color: #eee; height: 22px; cursor: pointer}
.screenCenter .button:hover {background-color: #2187e7; color: #eee} .screenCenter .button:hover {background: #2187e7; color: #eee}

View File

@@ -23,6 +23,7 @@ var ICEcoder = {
lockedNav: true, // Nav is locked or not lockedNav: true, // Nav is locked or not
htmlTagArray: [], // Array storing the nest of tags htmlTagArray: [], // Array storing the nest of tags
codeAssist: true, // Assist user with their coding codeAssist: true, // Assist user with their coding
snippetLine: false, // Line no of snippet, if shown
mouseDown: false, // If the mouse is down or not mouseDown: false, // If the mouse is down or not
draggingFilesW: false, // If we're dragging the file manager width or not draggingFilesW: false, // If we're dragging the file manager width or not
serverQueueItems: [], // Array of URLs to call in order serverQueueItems: [], // Array of URLs to call in order
@@ -95,6 +96,7 @@ var ICEcoder = {
this.account.style.height = this.accountH + "px"; this.account.style.height = this.accountH + "px";
this.fmLock.style.marginLeft = (this.filesW-42) + "px"; this.fmLock.style.marginLeft = (this.filesW-42) + "px";
this.filesFrame.style.height = (winH-headerH-accountH-footerH) + "px"; this.filesFrame.style.height = (winH-headerH-accountH-footerH) + "px";
top.ICEcoder.setTabWidths();
// If we need to set the editor sizes // If we need to set the editor sizes
if (!dontSetEditor) { if (!dontSetEditor) {
@@ -293,7 +295,7 @@ var ICEcoder = {
highlightBlock: function(nestPos,hide) { highlightBlock: function(nestPos,hide) {
var cM, searchPos, cursor, startPos, endPos; var cM, searchPos, cursor, startPos, endPos;
cM = ICEcoder.getcMInstance(); cM = top.ICEcoder.getcMInstance();
// Hiding the block // Hiding the block
if (hide) { if (hide) {
// Set cursor back to orig pos if we haven't clicked, or redo nest display if we have // Set cursor back to orig pos if we haven't clicked, or redo nest display if we have
@@ -306,7 +308,6 @@ var ICEcoder = {
top.ICEcoder.cursorOrigCh = cM.getCursor().ch; top.ICEcoder.cursorOrigCh = cM.getCursor().ch;
top.ICEcoder.cursorOrigLine = cM.getCursor().line; top.ICEcoder.cursorOrigLine = cM.getCursor().line;
top.ICEcoder.dontUpdateNest = true; top.ICEcoder.dontUpdateNest = true;
// Set a cursor position object to begin with // Set a cursor position object to begin with
searchPos = new Object(); searchPos = new Object();
searchPos.ch = cM.getCursor().ch; searchPos.ch = cM.getCursor().ch;
@@ -326,7 +327,8 @@ var ICEcoder = {
top.ICEcoder.startPosLine = startPos.line = cursor.from().line; top.ICEcoder.startPosLine = startPos.line = cursor.from().line;
// Now set an end position object that matches this start tag // Now set an end position object that matches this start tag
endPos = new Object(); endPos = new Object();
endPos.line = top.ICEcoder.content.contentWindow.CodeMirror.tagRangeFinder(cM,startPos.line) || startPos.line; endPos.line = top.ICEcoder.content.contentWindow.CodeMirror.tagRangeFinder(cM,startPos) || startPos.line;
endPos.line = endPos.line.to ? endPos.line.to.line : endPos.line;
endPos.ch = cM.getLine(endPos.line).indexOf("</"+top.ICEcoder.htmlTagArray[nestPos]+">")+top.ICEcoder.htmlTagArray[nestPos].length+3; endPos.ch = cM.getLine(endPos.line).indexOf("</"+top.ICEcoder.htmlTagArray[nestPos]+">")+top.ICEcoder.htmlTagArray[nestPos].length+3;
// Set the selection or escape out of not selecting // Set the selection or escape out of not selecting
!top.ICEcoder.dontSelect ? cM.setSelection(startPos,endPos) : top.ICEcoder.dontSelect = false; !top.ICEcoder.dontSelect ? cM.setSelection(startPos,endPos) : top.ICEcoder.dontSelect = false;
@@ -566,7 +568,7 @@ var ICEcoder = {
// rename array item and the tab // rename array item and the tab
top.ICEcoder.openFiles[i] = newName; top.ICEcoder.openFiles[i] = newName;
closeTabLink = '<a nohref onClick="top.ICEcoder.files.contentWindow.closeTab('+(i+1)+')"><img src="images/nav-close.gif" id="closeTabButton'+(i+1)+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>'; closeTabLink = '<a nohref onClick="top.ICEcoder.files.contentWindow.closeTab('+(i+1)+')"><img src="images/nav-close.gif" id="closeTabButton'+(i+1)+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>';
top.document.getElementById('tab'+(i+1)).innerHTML = top.ICEcoder.openFiles[i] + " " + closeTabLink; top.document.getElementById('tab'+(i+1)).innerHTML = closeTabLink + " " + top.ICEcoder.openFiles[i].replace(/\//,"") + "/";
} }
top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+newName+"&oldFileName="+oldName.replace(/\|/g,"/")); top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+newName+"&oldFileName="+oldName.replace(/\|/g,"/"));
top.ICEcoder.serverMessage('<b>Renaming to</b><br>'+newName); top.ICEcoder.serverMessage('<b>Renaming to</b><br>'+newName);
@@ -749,9 +751,9 @@ var ICEcoder = {
top.ICEcoder.thisFileFolderType='file'; top.ICEcoder.thisFileFolderType='file';
top.ICEcoder.openFile(); top.ICEcoder.openFile();
} }
if (action=="newFile") {top.ICEcoder.newFile();} else if (action=="newFile") {top.ICEcoder.newFile();}
if (action=="newFolder") {top.ICEcoder.newFolder();} else if (action=="newFolder") {top.ICEcoder.newFolder();}
if (action=="rename") {top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile);} else if (action=="rename") {top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile);}
} }
if (action=="delete" && ICEcoder.selectedFiles.length>0) { if (action=="delete" && ICEcoder.selectedFiles.length>0) {
@@ -895,16 +897,24 @@ var ICEcoder = {
if (find != "" && buttonClick) { if (find != "" && buttonClick) {
replaceQS = ""; replaceQS = "";
targetQS = ""; targetQS = "";
filesQS = "";
if (document.findAndReplace.connector.value=="and") { if (document.findAndReplace.connector.value=="and") {
replaceQS = "&replace="+replace; replaceQS = "&replace="+replace;
} }
if (document.findAndReplace.target.value.indexOf("file")>=0) { if (document.findAndReplace.target.value.indexOf("file")>=0) {
targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-"); targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-");
} }
if (document.findAndReplace.target.value=="selected files") {
filesQS = "&selectedFiles=";
for(i=0;i<top.ICEcoder.selectedFiles.length;i++) {
filesQS += top.ICEcoder.selectedFiles[i]+":";
}
filesQS = filesQS.replace(/\:$/,"");
}
find = find.replace(/\'/g, '&#39;'); find = find.replace(/\'/g, '&#39;');
find != encodeURIComponent(find) ? find = 'ICEcoder:'+encodeURIComponent(find) : find; find != encodeURIComponent(find) ? find = 'ICEcoder:'+encodeURIComponent(find) : find;
top.ICEcoder.showHide('show',top.document.getElementById('loadingMask')); top.ICEcoder.showHide('show',top.document.getElementById('loadingMask'));
top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/multiple-results.php?find='+find+replaceQS+targetQS+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'; top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/multiple-results.php?find='+find+replaceQS+targetQS+filesQS+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>';
} }
} }
}, },
@@ -1009,25 +1019,20 @@ var ICEcoder = {
cM = ICEcoder.getcMInstance(); cM = ICEcoder.getcMInstance();
caretLocType = "Unknown"; caretLocType = "Unknown";
caretChunk = cM.getValue().substr(0,ICEcoder.caretPos+1); caretChunk = cM.getValue().substr(0,ICEcoder.caretPos+1);
if (caretChunk.lastIndexOf("<script")>caretChunk.lastIndexOf("</script>")&&caretLocType=="Unknown") {caretLocType = "JavaScript"}; if (caretChunk.lastIndexOf("<script")>caretChunk.lastIndexOf("</script>")&&caretLocType=="Unknown") {caretLocType = "JavaScript"}
if (caretChunk.lastIndexOf("<?")>caretChunk.lastIndexOf("?>")&&caretLocType=="Unknown") {caretLocType = "PHP"}; else if (caretChunk.lastIndexOf("<?")>caretChunk.lastIndexOf("?>")&&caretLocType=="Unknown") {caretLocType = "PHP"}
if (caretChunk.lastIndexOf("<%")>caretChunk.lastIndexOf("%>")&&caretLocType=="Unknown") {caretLocType = "Ruby"}; else if (caretChunk.lastIndexOf("<%")>caretChunk.lastIndexOf("%>")&&caretLocType=="Unknown") {caretLocType = "Ruby"}
if (caretChunk.lastIndexOf("<")>caretChunk.lastIndexOf(">")&&caretLocType=="Unknown") {caretLocType = "HTML"}; else if (caretChunk.lastIndexOf("<")>caretChunk.lastIndexOf(">")&&caretLocType=="Unknown") {caretLocType = "HTML"}
if (caretLocType=="Unknown") {caretLocType = "Content"}; else if (caretLocType=="Unknown") {caretLocType = "Content"};
fileName = ICEcoder.openFiles[ICEcoder.selectedTab-1]; fileName = ICEcoder.openFiles[ICEcoder.selectedTab-1];
if (fileName.indexOf(".js")>0) {caretLocType="JavaScript"}; if (fileName.indexOf(".js")>0) {caretLocType="JavaScript"}
if (fileName.indexOf(".coffee")>0) {caretLocType="CoffeeScript"}; else if (fileName.indexOf(".coffee")>0) {caretLocType="CoffeeScript"}
if (fileName.indexOf(".rb")>0) {caretLocType="Ruby"}; else if (fileName.indexOf(".rb")>0) {caretLocType="Ruby"}
if (fileName.indexOf(".css")>0) {caretLocType="CSS"}; else if (fileName.indexOf(".css")>0) {caretLocType="CSS"}
if (fileName.indexOf(".less")>0) {caretLocType="LESS"}; else if (fileName.indexOf(".less")>0) {caretLocType="LESS"};
ICEcoder.caretLocType = caretLocType; ICEcoder.caretLocType = caretLocType;
// If we're in a JS, CoffeeScript PHP or Ruby code block, add that to the nest display
if (["JavaScript","CoffeeScript","PHP","Ruby"].indexOf(caretLocType)>-1) {
ICEcoder.nestDisplay.innerHTML += " &gt; " + caretLocType;
}
}, },
// Alter array indicating which files have changed // Alter array indicating which files have changed
@@ -1127,6 +1132,7 @@ var ICEcoder = {
newBlock.style.position = "absolute"; newBlock.style.position = "absolute";
newBlock.style.display = "block"; newBlock.style.display = "block";
newBlock.style.width = newBlock.style.height = "20px"; newBlock.style.width = newBlock.style.height = "20px";
newBlock.style.zIndex = "1000";
newBlock.style.background = match ? match[0] : ''; newBlock.style.background = match ? match[0] : '';
if (newBlock.style.backgroundColor=="") {newBlock.style.display = "none"}; if (newBlock.style.backgroundColor=="") {newBlock.style.display = "none"};
top.document.getElementById('header').appendChild(newBlock); top.document.getElementById('header').appendChild(newBlock);
@@ -1152,6 +1158,40 @@ var ICEcoder = {
return i!=-1 ? i : false; return i!=-1 ? i : false;
}, },
// Show JS Hint errors
updateHints: function() {
var cM;
if ("undefined" != typeof JSHINT && top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1].indexOf('.js')>-1) {
cM = ICEcoder.getcMInstance();
cM.operation(function(){
var widgets = top.ICEcoder['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]+'widgets'];
for (var i=0; i<widgets.length; ++i) {
cM.removeLineWidget(widgets[i]);
}
widgets.length = 0;
JSHINT(cM.getValue());
for (var i=0; i<JSHINT.errors.length; ++i) {
var err = JSHINT.errors[i];
if (!err) continue;
var msg = document.createElement("div");
var icon = msg.appendChild(document.createElement("span"));
icon.innerHTML = "!!";
icon.className = "lint-error-icon";
msg.appendChild(document.createTextNode(err.reason));
msg.className = "lint-error";
widgets.push(cM.addLineWidget(err.line-1, msg, {coverGutter: false, noHScroll: true}));
}
});
var info = cM.getScrollInfo();
var after = cM.charCoords({line: cM.getCursor().line+1, ch: 0}, "local").top;
if (info.top + info.clientHeight < after) {
cM.scrollTo(null, after - info.clientHeight+3);
}
}
},
// ============== // ==============
// SYSTEM // SYSTEM
// ============== // ==============
@@ -1182,6 +1222,21 @@ var ICEcoder = {
top.ICEcoder.codeAssist = !top.ICEcoder.codeAssist; top.ICEcoder.codeAssist = !top.ICEcoder.codeAssist;
top.ICEcoder.cssColorPreview(); top.ICEcoder.cssColorPreview();
cM.focus(); cM.focus();
if (!top.ICEcoder.codeAssist) {
for (i=0;i<top.ICEcoder.cMInstances.length;i++) {
cM = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[i]];
cM.operation(function(){
var widgets = top.ICEcoder['cM'+top.ICEcoder.cMInstances[i]+'widgets'];
for (var j=0; j<widgets.length; ++j) {
cM.removeLineWidget(widgets[j]);
}
widgets.length = 0;
});
}
} else {
top.ICEcoder.updateHints();
}
}, },
// Queue items up for processing in turn // Queue items up for processing in turn
@@ -1207,8 +1262,7 @@ var ICEcoder = {
document.body.appendChild(txtArea); document.body.appendChild(txtArea);
document.getElementById('saveTemp'+nextSaveID).value = cM.getValue(); document.getElementById('saveTemp'+nextSaveID).value = cM.getValue();
} }
} } else if (action=="del") {
if (action=="del") {
if (ICEcoder.serverQueueItems[0] && ICEcoder.serverQueueItems[0].indexOf('action=save')>0) { if (ICEcoder.serverQueueItems[0] && ICEcoder.serverQueueItems[0].indexOf('action=save')>0) {
topSaveID = nextSaveID-1; topSaveID = nextSaveID-1;
for (var i=1;i<topSaveID;i++) { for (var i=1;i<topSaveID;i++) {
@@ -1279,7 +1333,7 @@ var ICEcoder = {
}, },
// Update the settings used when we make a change to them // Update the settings used when we make a change to them
useNewSettings: function(themeURL,tabsIndent,codeAssist,lockedNav,visibleTabs,tabWidth,refreshFM) { useNewSettings: function(themeURL,tabsIndent,codeAssist,lockedNav,visibleTabs,lineWrapping,tabWidth,refreshFM) {
var styleNode, strCSS, cMCSS, activeLineBG; var styleNode, strCSS, cMCSS, activeLineBG;
// Add new stylesheet for selected theme // Add new stylesheet for selected theme
@@ -1308,11 +1362,13 @@ var ICEcoder = {
cMCSS = ICEcoder.content.contentWindow.document.styleSheets[2]; cMCSS = ICEcoder.content.contentWindow.document.styleSheets[2];
strCSS = cMCSS.rules ? 'rules' : 'cssRules'; strCSS = cMCSS.rules ? 'rules' : 'cssRules';
cMCSS[strCSS][5].style['content'] = visibleTabs ? '"\\21e5"' : '" "'; cMCSS[strCSS][4].style['content'] = visibleTabs ? '"\\21e5"' : '" "';
cMCSS[strCSS][2].style.cssText = "background: " + activeLineBG + " !important"; cMCSS[strCSS][2].style.cssText = "background: " + activeLineBG + " !important";
top.ICEcoder.lineWrapping = lineWrapping;
top.ICEcoder.tabWidth = tabWidth; top.ICEcoder.tabWidth = tabWidth;
for (var i=0;i<ICEcoder.cMInstances.length;i++) { for (var i=0;i<ICEcoder.cMInstances.length;i++) {
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("lineWrapping", top.ICEcoder.lineWrapping);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("indentUnit", top.ICEcoder.tabWidth); ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("indentUnit", top.ICEcoder.tabWidth);
ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("tabSize", top.ICEcoder.tabWidth); ICEcoder.content.contentWindow['cM'+ICEcoder.cMInstances[i]].setOption("tabSize", top.ICEcoder.tabWidth);
} }
@@ -1469,6 +1525,9 @@ var ICEcoder = {
top.ICEcoder.findMode = false; top.ICEcoder.findMode = false;
ICEcoder.findReplace('find',true,false); ICEcoder.findReplace('find',true,false);
// Rerun JS Hint
if (top.ICEcoder.codeAssist) {top.ICEcoder.updateHints()};
// Finally, update the cursor display // Finally, update the cursor display
top.ICEcoder.getCaretPosition(); top.ICEcoder.getCaretPosition();
top.ICEcoder.updateCharDisplay(); top.ICEcoder.updateCharDisplay();
@@ -1492,8 +1551,8 @@ var ICEcoder = {
cM = ICEcoder.getcMInstance('new'); cM = ICEcoder.getcMInstance('new');
ICEcoder.switchTab(ICEcoder.openFiles.length); ICEcoder.switchTab(ICEcoder.openFiles.length);
cM.setLineClass(ICEcoder['cMActiveLine'+ICEcoder.selectedTab], null); cM.removeLineClass(ICEcoder['cMActiveLine'+ICEcoder.selectedTab], "background");
ICEcoder['cMActiveLine'+ICEcoder.selectedTab] = cM.setLineClass(0, "cm-s-activeLine"); ICEcoder['cMActiveLine'+ICEcoder.selectedTab] = cM.addLineClass(0, "background", "cm-s-activeLine");
ICEcoder.nextcMInstance++; ICEcoder.nextcMInstance++;
}, },
@@ -1507,7 +1566,11 @@ var ICEcoder = {
// Setup a new tab // Setup a new tab
closeTabLink = '<a nohref onClick="top.ICEcoder.closeTab('+(top.ICEcoder.openFiles.length)+')"><img src="images/nav-close.gif" id="closeTabButton'+(top.ICEcoder.openFiles.length)+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>'; closeTabLink = '<a nohref onClick="top.ICEcoder.closeTab('+(top.ICEcoder.openFiles.length)+')"><img src="images/nav-close.gif" id="closeTabButton'+(top.ICEcoder.openFiles.length)+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>';
top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).style.display = "inline-block"; top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).style.display = "inline-block";
top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).innerHTML = top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1] + " " + closeTabLink; top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).innerHTML = closeTabLink + " " + top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,"") + "/";
top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).title = top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,"") + "/";
// Set the widths
top.ICEcoder.setTabWidths();
// Highlight it and state it's selected // Highlight it and state it's selected
top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length); top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);
@@ -1544,7 +1607,8 @@ var ICEcoder = {
// Setup a new tab // Setup a new tab
closeTabLink = '<a nohref onClick="parent.ICEcoder.closeTab('+tabNum+')"><img src="images/nav-close.gif" id="closeTabButton'+tabNum+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>'; closeTabLink = '<a nohref onClick="parent.ICEcoder.closeTab('+tabNum+')"><img src="images/nav-close.gif" id="closeTabButton'+tabNum+'" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'" onMouseOut="this.style.backgroundColor=prevBG"></a>';
top.document.getElementById('tab'+tabNum).innerHTML = top.ICEcoder.openFiles[tabNum-1] + " " + closeTabLink; top.document.getElementById('tab'+tabNum).innerHTML = closeTabLink + " " + top.ICEcoder.openFiles[tabNum-1].replace(/\//,"") + "/";
top.document.getElementById('tab'+tabNum).title = top.ICEcoder.openFiles[tabNum-1].replace(/\//,"") + "/";
}, },
// Reset all tabs to be without a highlight and then highlight the selected // Reset all tabs to be without a highlight and then highlight the selected
@@ -1585,6 +1649,7 @@ var ICEcoder = {
// recursively copy over all tabs & data from the tab to the right, if there is one // recursively copy over all tabs & data from the tab to the right, if there is one
for (var i=closeTabNum;i<ICEcoder.openFiles.length;i++) { for (var i=closeTabNum;i<ICEcoder.openFiles.length;i++) {
top.document.getElementById('tab'+i).innerHTML = top.document.getElementById('tab'+(i+1)).innerHTML; top.document.getElementById('tab'+i).innerHTML = top.document.getElementById('tab'+(i+1)).innerHTML;
top.document.getElementById('tab'+i).title = top.document.getElementById('tab'+(i+1)).title;
ICEcoder.openFiles[i-1] = ICEcoder.openFiles[i]; ICEcoder.openFiles[i-1] = ICEcoder.openFiles[i];
ICEcoder.openFileMDTs[i-1] = ICEcoder.openFileMDTs[i]; ICEcoder.openFileMDTs[i-1] = ICEcoder.openFileMDTs[i];
@@ -1597,6 +1662,7 @@ var ICEcoder = {
// clear the rightmost tab (or only one left in a 1 tab scenario) & remove from the array // clear the rightmost tab (or only one left in a 1 tab scenario) & remove from the array
top.document.getElementById('tab'+ICEcoder.openFiles.length).style.display = "none"; top.document.getElementById('tab'+ICEcoder.openFiles.length).style.display = "none";
top.document.getElementById('tab'+ICEcoder.openFiles.length).innerHTML = ""; top.document.getElementById('tab'+ICEcoder.openFiles.length).innerHTML = "";
top.document.getElementById('tab'+ICEcoder.openFiles.length).title = "";
ICEcoder.openFiles.pop(); ICEcoder.openFiles.pop();
ICEcoder.openFileMDTs.pop(); ICEcoder.openFileMDTs.pop();
// If we're closing the selected tab, determin the new selectedTab number, reduced by 1 if we have some tabs, 0 for a reset state // If we're closing the selected tab, determin the new selectedTab number, reduced by 1 if we have some tabs, 0 for a reset state
@@ -1624,6 +1690,22 @@ var ICEcoder = {
} }
// Lastly, stop it from trying to also switch tab // Lastly, stop it from trying to also switch tab
top.ICEcoder.canSwitchTabs=false; top.ICEcoder.canSwitchTabs=false;
// and set the widths
top.ICEcoder.setTabWidths();
},
// Set the tabs width
setTabWidths: function() {
var availWidth, tabWidth, thisWidth;
availWidth = parseInt(top.ICEcoder.content.style.width,10)-41-24-10; // - left margin - new tab - right margin
avgWidth = (availWidth/top.ICEcoder.openFiles.length)-18;
for (var i=0;i<top.ICEcoder.openFiles.length;i++) {
thisWidth = parseInt(avgWidth*i,10) - parseInt(avgWidth*(i-1),10);
tabWidth = top.ICEcoder.openFiles.length*(150+18) > availWidth ? thisWidth : 150;
top.document.getElementById('tab'+(i+1)).style.width = tabWidth + "px";
}
}, },
// ============== // ==============
@@ -1725,6 +1807,11 @@ var ICEcoder = {
top.ICEcoder.ctrlKeyDown = false; top.ICEcoder.ctrlKeyDown = false;
return false; return false;
// CTRL+Space (Show snippet)
} else if(key==32 && top.ICEcoder.ctrlKeyDown==true && area=="content") {
top.ICEcoder.addSnippet();
return false;
// ESC in content area (Comment/Uncomment line) // ESC in content area (Comment/Uncomment line)
} else if(key==27 && area == "content") { } else if(key==27 && area == "content") {
top.ICEcoder.lineCommentToggle(); top.ICEcoder.lineCommentToggle();
@@ -1748,7 +1835,74 @@ var ICEcoder = {
key = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evt.charCode; key = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evt.charCode;
if (key==17) {top.ICEcoder.ctrlKeyDown = false; top.ICEcoder.stickyTabMaybe = false} if (key==17) {top.ICEcoder.ctrlKeyDown = false; top.ICEcoder.stickyTabMaybe = false}
if (key==16) {top.ICEcoder.shiftKeyDown = false} else if (key==16) {top.ICEcoder.shiftKeyDown = false}
if (key==46) {top.ICEcoder.delKeyDown = false} else if (key==46) {top.ICEcoder.delKeyDown = false}
},
addSnippet: function() {
var cM;
if (top.ICEcoder.snippetLine!==false) {
top.ICEcoder.removeSnippet();
}
cM = ICEcoder.getcMInstance();
lineNo = cM.getCursor().line;
whiteSpace = cM.getLine(lineNo).length - cM.getLine(lineNo).replace(/^\s\s*/, '').length;
content = cM.getLine(lineNo).slice(whiteSpace);
if (content.slice(0,2)=="f ") {
top.ICEcoder.doSnippet('f ','function VAR() {\nINDENT\tCURSOR\nINDENT}');
} else if (content.slice(0,2)=="if") {
top.ICEcoder.doSnippet('if','if (CURSOR) {\nINDENT\t\nINDENT}');
} else {
cM.operation(function(){
var msg = document.createElement("iframe");
msg.src = "snippets/snippet-display.php";
msg.className = "snippetFrame";
top.ICEcoder.snippetLine = cM.addLineWidget(cM.getCursor().line, msg, {coverGutter: false, noHScroll: true});
});
}
},
doSnippet: function(tgtString,replaceString) {
var cM, lineNo, lineContents, replacedLine;
cM = top.ICEcoder.getcMInstance();
lineNo = cM.getCursor().line;
lineContents = cM.getLine(lineNo);
if (lineContents.indexOf(tgtString)>-1) {
remainder = cM.getLine(lineNo);
strPos = remainder.indexOf(tgtString);
remainder = remainder.slice(remainder.indexOf(tgtString)+tgtString.length);
replaceString = replaceString.replace(/VAR/g,remainder);
replacedLine = cM.getLine(lineNo).slice(0,strPos);
whiteSpace = cM.getLine(lineNo).length - cM.getLine(lineNo).replace(/^\s\s*/, '').length;
whiteSpace = cM.getLine(lineNo).slice(0,whiteSpace);
replaceString = replaceString.replace(/INDENT/g,whiteSpace);
replacedLine += replaceString;
curPos = replacedLine.indexOf("CURSOR");
sPos = 0;
lineNo2 = lineNo;
for (i=0;i<replacedLine.length;i++) {
if (replacedLine.indexOf("\n",sPos)<replacedLine.indexOf("CURSOR")) {
sPos = replacedLine.indexOf("\n",sPos)+1;
lineNo2 = lineNo2+1;
}
}
cM.setLine(lineNo, replacedLine.replace("CURSOR",""));
cM.setCursor(lineNo2,curPos);
cM.focus();
top.ICEcoder.removeSnippet();
}
},
removeSnippet: function() {
var cM;
cM = ICEcoder.getcMInstance();
if (top.ICEcoder.snippetLine!==false) {
cM.removeLineWidget(top.ICEcoder.snippetLine);
}
top.ICEcoder.snippetLine = false;
} }
}; };

View File

@@ -1,10 +1,17 @@
<?php include("settings.php");?> <?php include("settings.php");?>
<?php
if(isset($_GET['selectedFiles'])) {
$selectedFiles=explode(":",strClean($_GET['selectedFiles']));
echo $selectedFiles[0].".....".$selectedFiles[1];
}
?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</title> <title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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">
</head> </head>
@@ -67,23 +74,30 @@ if (startTab!=top.ICEcoder.selectedTab) {
?> ?>
var spansArray = top.ICEcoder.filesFrame.contentWindow.document.getElementsByTagName('span'); var spansArray = top.ICEcoder.filesFrame.contentWindow.document.getElementsByTagName('span');
for (var i=0;i<spansArray.length;i++) { for (var i=0;i<spansArray.length;i++) {
targetURL = spansArray[i].id.replace(/\|/g,"/"); foundInSelected = false;
if (targetURL.toLowerCase().indexOf(findText.toLowerCase())>-1 && targetURL.indexOf('_perms')>-1) { targetURL = spansArray[i].id.replace(/\|/g,"/").toLowerCase();
if ( targetURL.lastIndexOf(findText.toLowerCase()) > targetURL.lastIndexOf("/")
&& targetURL.indexOf(findText.toLowerCase())>-1 && targetURL.indexOf('_perms')>-1) {
if (userTarget.indexOf("selected")>-1) { if (userTarget.indexOf("selected")>-1) {
for (var j=0;j<top.ICEcoder.selectedFiles.length;j++) { for (var j=0;j<top.ICEcoder.selectedFiles.length;j++) {
if (top.ICEcoder.selectedFiles[j].indexOf(targetURL.replace(/\//g,"|").replace(/_perms/g,""))>-1) { if (
targetURL.replace(/\//g,"|").indexOf(top.ICEcoder.selectedFiles[j].replace(/\//g,"|").replace(/_perms/g,""))==0
&& (
targetURL.replace(/\|/g,"/").replace(/_perms/g,"")==top.ICEcoder.selectedFiles[j].replace(/\|/g,"/").replace(/_perms/g,"")
||
(targetURL.replace(/\|/g,"/").split("/").length > top.ICEcoder.selectedFiles[j].replace(/\|/g,"/").split("/").length && targetURL.charAt(top.ICEcoder.selectedFiles[j].length)=="/"))) {
foundInSelected = true; foundInSelected = true;
} }
} }
} }
if (userTarget.indexOf("all")>-1 || (userTarget.indexOf("selected")>-1 && foundInSelected)) { if (userTarget.indexOf("all")>-1 || (userTarget.indexOf("selected")>-1 && foundInSelected)) {
resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.showHide(\'hide\',top.document.getElementById(\'blackMask\'))">'; resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.showHide(\'hide\',top.document.getElementById(\'blackMask\'))">';
resultsDisplay += targetURL.toLowerCase().replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b>"+findText.toLowerCase()+"</b>"); resultsDisplay += targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b>"+findText.toLowerCase()+"</b>");
resultsDisplay += '</a><br>'; resultsDisplay += '</a><br>';
<?php if (!isset($_GET['replace'])) { ?> <?php if (!isset($_GET['replace'])) { ?>
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+'</div>'; resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+'</div>';
<?php ;} else { ?> <?php ;} else { ?>
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+', rename to '+targetURL.toLowerCase().replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b><?php if(isset($_GET['replace'])) {echo strtolower(strClean($_GET['replace']));};?></b>")+'</div>'; resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+', rename to '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b><?php if(isset($_GET['replace'])) {echo strtolower(strClean($_GET['replace']));};?></b>")+'</div>';
<?php <?php
;}; ;};
if (isset($_GET['replace'])) { ?> if (isset($_GET['replace'])) { ?>
@@ -100,9 +114,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
$r = 0; $r = 0;
function phpGrep($q, $path, $base) { function phpGrep($q, $path, $base) {
$fp = opendir($path); $fp = opendir($path);
global $r; global $r, $ICEcoder, $serverType, $selectedFiles;
global $ICEcoder;
global $serverType;
if (!isset($ret)) {$ret="";}; if (!isset($ret)) {$ret="";};
$slash = $serverType == "Windows" ? "\\" : "/"; $slash = $serverType == "Windows" ? "\\" : "/";
while($f = readdir($fp)) { while($f = readdir($fp)) {
@@ -115,6 +127,12 @@ if (startTab!=top.ICEcoder.selectedTab) {
for ($i=0;$i<count($ICEcoder['bannedFiles']);$i++) { for ($i=0;$i<count($ICEcoder['bannedFiles']);$i++) {
if (strpos($f,$ICEcoder['bannedFiles'][$i])>0) {$bFile = true;}; if (strpos($f,$ICEcoder['bannedFiles'][$i])>0) {$bFile = true;};
} }
$findPath = str_replace($base,"",$fullPath);
for ($i=0;$i<count($selectedFiles);$i++) {
if (strpos($findPath,str_replace("|","/",$selectedFiles[$i]))!==0) {
$bFile = true;
}
}
if (!$bFile) { if (!$bFile) {
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">"; $ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">";
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>"; $ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>";

View File

@@ -5,6 +5,7 @@
<head> <head>
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties</title> <title>ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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">
</head> </head>

View File

@@ -5,6 +5,7 @@
<head> <head>
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> settings screen</title> <title>ICEcoder <?php echo $ICEcoder["versionNo"];?> settings screen</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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" type="text/css" href="settings-screen.css">
<link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css"> <link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
<script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script> <script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
@@ -102,8 +103,9 @@ confirm password<br>
<br> <br>
banned files/folders<br> banned files/folders<br>
<input type="text" onkeydown="document.settings.changedFileSettings.value='true';showButton()" name="bannedFiles" value="<?php for($i=0;$i<=count($ICEcoder["bannedFiles"])-1;$i++) {echo $ICEcoder["bannedFiles"][$i]; if ($i<count($ICEcoder["bannedFiles"])-1) {echo ', ';};}; ?>"><br> <input type="text" onkeydown="document.settings.changedFileSettings.value='true';showButton()" name="bannedFiles" value="<?php for($i=0;$i<=count($ICEcoder["bannedFiles"])-1;$i++) {echo $ICEcoder["bannedFiles"][$i]; if ($i<count($ICEcoder["bannedFiles"])-1) {echo ', ';};}; ?>"><br>
banned paths<br>
<input type="text" onkeydown="document.settings.changedFileSettings.value='true';showButton()" name="bannedPaths" value="<?php for($i=0;$i<=count($ICEcoder["bannedPaths"])-1;$i++) {echo $ICEcoder["bannedPaths"][$i]; if ($i<count($ICEcoder["bannedPaths"])-1) {echo ', ';};}; ?>"><br>
<input type="hidden" name="changedFileSettings" value="false"> <input type="hidden" name="changedFileSettings" value="false">
<br>
ip addresses<br> ip addresses<br>
<input type="text" onkeydown="showButton()" name="allowedIPs" value="<?php for($i=0;$i<=count($ICEcoder["allowedIPs"])-1;$i++) {echo $ICEcoder["allowedIPs"][$i]; if ($i<count($ICEcoder["allowedIPs"])-1) {echo ', ';};}; ?>"><br> <input type="text" onkeydown="showButton()" name="allowedIPs" value="<?php for($i=0;$i<=count($ICEcoder["allowedIPs"])-1;$i++) {echo $ICEcoder["allowedIPs"][$i]; if ($i<count($ICEcoder["allowedIPs"])-1) {echo ', ';};}; ?>"><br>
</div> </div>
@@ -133,7 +135,15 @@ for ($i=0;$i<count($themeArray);$i++) {
?> ?>
</select> </select>
<span style="position: absolute; margin: -18px 0 0 30px"> <span style="position: absolute; margin: -15px 0 0 20px">
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 120px">
tab width <span style="font-size: 10px; color: #888">chars</span><br> tab width <span style="font-size: 10px; color: #888">chars</span><br>
<input type="text" name="tabWidth" id="tabWidth" style="width: 30px" onkeydown="showButton()" onkeyup="changeTabWidth()" value="<?php echo $ICEcoder["tabWidth"];?>"> <input type="text" name="tabWidth" id="tabWidth" style="width: 30px" onkeydown="showButton()" onkeyup="changeTabWidth()" value="<?php echo $ICEcoder["tabWidth"];?>">
</span> </span>

View File

@@ -38,8 +38,8 @@ include($settingsFile);
// Add ICEcoder settings to beginning of $ICEcoder array // Add ICEcoder settings to beginning of $ICEcoder array
$ICEcoder = array( $ICEcoder = array(
"versionNo" => "1.2", "versionNo" => "1.3",
"codeMirrorDir" => "CodeMirror-2.36", "codeMirrorDir" => "CodeMirror-3.0",
"demoMode" => false "demoMode" => false
)+$ICEcoder; )+$ICEcoder;
@@ -67,12 +67,14 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
$ICEcoder["lockedNav"] = isset($_POST['lockedNav']) && $_POST['lockedNav'] ? "true" : "false"; $ICEcoder["lockedNav"] = isset($_POST['lockedNav']) && $_POST['lockedNav'] ? "true" : "false";
if ($_POST['accountPassword']!="") {$ICEcoder["accountPassword"] = generateHash(strClean($_POST['accountPassword']));}; if ($_POST['accountPassword']!="") {$ICEcoder["accountPassword"] = generateHash(strClean($_POST['accountPassword']));};
$ICEcoder["bannedFiles"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['bannedFiles']))).'")'; $ICEcoder["bannedFiles"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['bannedFiles']))).'")';
$ICEcoder["bannedPaths"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['bannedPaths']))).'")';
$ICEcoder["allowedIPs"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['allowedIPs']))).'")'; $ICEcoder["allowedIPs"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['allowedIPs']))).'")';
$ICEcoder["plugins"] = 'array('.PHP_EOL.' array('.PHP_EOL.' '.str_replace('====================','),'.PHP_EOL.' array(',$_POST['plugins']).'))'; $ICEcoder["plugins"] = 'array('.PHP_EOL.' array('.PHP_EOL.' '.str_replace('====================','),'.PHP_EOL.' array(',$_POST['plugins']).'))';
$ICEcoder["theme"] = strClean($_POST['theme']); $ICEcoder["theme"] = strClean($_POST['theme']);
$ICEcoder["lineWrapping"] = strClean($_POST['lineWrapping']);
$ICEcoder["tabWidth"] = numClean($_POST['tabWidth']); $ICEcoder["tabWidth"] = numClean($_POST['tabWidth']);
$settingsArray = array("root","tabsIndent","checkUpdates","openLastFiles","findFilesExclude","codeAssist","visibleTabs","lockedNav","accountPassword","bannedFiles","allowedIPs","plugins","theme","tabWidth"); $settingsArray = array("root","tabsIndent","checkUpdates","openLastFiles","findFilesExclude","codeAssist","visibleTabs","lockedNav","accountPassword","bannedFiles","bannedPaths","allowedIPs","plugins","theme","lineWrapping","tabWidth");
$settingsNew = ""; $settingsNew = "";
for ($i=0;$i<count($settingsArray);$i++) { for ($i=0;$i<count($settingsArray);$i++) {
$settingsNew .= '"'.$settingsArray[$i].'"'.PHP_EOL.' => '; $settingsNew .= '"'.$settingsArray[$i].'"'.PHP_EOL.' => ';
@@ -97,7 +99,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Do we need a file manager refresh? // Do we need a file manager refresh?
$refreshFM = $_POST['changedFileSettings']=="true" ? "true" : "false"; $refreshFM = $_POST['changedFileSettings']=="true" ? "true" : "false";
// With all that worked out, we can now hide the settings screen and apply the new settings // With all that worked out, we can now hide the settings screen and apply the new settings
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["tabsIndent"].",".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",".$ICEcoder["visibleTabs"].",".$ICEcoder["tabWidth"].",".$refreshFM.");</script>"; echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["tabsIndent"].",".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",".$ICEcoder["visibleTabs"].",".$ICEcoder["lineWrapping"].",".$ICEcoder["tabWidth"].",".$refreshFM.");</script>";
} }
// Establish our user level // Establish our user level
@@ -245,6 +247,8 @@ if (!$_SESSION['loggedIn']) {
echo $ICEcoder["versionNo"]." : "; echo $ICEcoder["versionNo"]." : ";
echo $ICEcoder["accountPassword"] == "" ? "Setup" : "Login"; echo $ICEcoder["accountPassword"] == "" ? "Setup" : "Login";
?></title> ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" type="text/css" href="ice-coder.css"> <link rel="stylesheet" type="text/css" href="ice-coder.css">
<link rel="icon" type="image/png" href="../favicon.png"> <link rel="icon" type="image/png" href="../favicon.png">
</head> </head>
@@ -257,7 +261,7 @@ echo $ICEcoder["accountPassword"] == "" ? "Setup" : "Login";
<img src="../images/ice-coder.png"> <img src="../images/ice-coder.png">
<div class="version">v <?php echo $ICEcoder["versionNo"];?></div> <div class="version">v <?php echo $ICEcoder["versionNo"];?></div>
<form name="settingsUpdate" action="settings.php" method="POST"> <form name="settingsUpdate" action="settings.php" method="POST">
<input type="password" name="<?php echo $ICEcoder["accountPassword"] == "" ? "account" : "login"; ?>Password" class="accountPassword"> <input type="password" name="<?php echo $ICEcoder["accountPassword"] == "" ? "account" : "login"; ?>Password" class="accountPassword"><br><br>
<input type="submit" name="submit" value="<?php echo $ICEcoder["accountPassword"] == "" ? "Set Password" : "Login"; ?>" class="button"> <input type="submit" name="submit" value="<?php echo $ICEcoder["accountPassword"] == "" ? "Set Password" : "Login"; ?>" class="button">
</form> </form>
</div> </div>

BIN
plugins/jshint/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

4832
plugins/jshint/jshint.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
<?php include("lib/settings.php");?>
<!DOCTYPE html>
<html style="margin: 0">
<head>
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> snippet display</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<style type="text/css">
body {background: #fff}
</style>
</head>
<body>
<?php
$snippets = array(
array(
"name" => "Function",
"replace" => "f ",
"with" => "function ::var::() {\\n\\t::|::\\n}"
),
array(
"name" => "If",
"replace" => "if",
"with" => "if (::|::) {\\n\\t\\n}"
)
);
?>
<?php
for ($i=0;$i<count($snippets);$i++) {
echo '<div style="cursor: pointer" onClick="top.ICEcoder.doSnippet(\''.$snippets[$i]['replace'].'\',\''.$snippets[$i]['with'].'\')">'.$snippets[$i]['name'].'</div>';
}
;?>
</script>
</body>
</html>