Reducing bytes in a number of places, plus also:
Switching back to previous match highlighter without image data URI, as
is it more visible
Only setting line class for current line if we haven't selected multiple
lines
When in demoMode, there is an arrow now pointing to the logo as a quick
guide to using ICEcoder. Will likely be only used by the ICEcoder
website.
dataMessage DIV available to display on demand and insert content into
Slight adjust to subsequent data/info content.
The comment after .CodeMirror-scroll should be inside /* */
Merge matchhighlight and the focused version, add pseudo styles to
override main selected style. May look at changing this in future.
As we removed a class, the tab class is no longer the 6th, but now 5th
class
Old and quite ropey close tag system removed in favour of the
CodeMirrror closetag addon
2 x classes to define highlighted text now forced to be white on blue
everywhere
CSS class changed needed for matchhilight and removed color setting
snippetFrame now unused, removed
2 new options set to autoCloseTags and highlightSelectionMatches
No longer setting thisCM.matchHighlight anymore
Set a if 1==2 condition on the previous (and quite ropey) code that did
autoclosing to stop it happening, will remove next.
Simple hint .css, .js and the javascript hinter added
No need to have Ctrl-Up or Down to do nothing, handled in icecoder.js
Ctrl-Space triggers the autocomplete command
This is setup as a function which runs if the cursor is in a JS block
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.
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
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
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
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.
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
theme, tabsIndent, openLastFiles, tabWidth, previousFiles, showFileMenu
& foldStyle all now contained within ICEcoder object
showFileMenu is a function to ensure file manager menu continues to show
The few instances of i now have scope
Initing the var fileName
This is to reduce the number of global vars
The only global vars should now be ICEcoder, docRoot & iceRoot
Version number now in title tag text
Tidied up some comment text re whats included in
codemirror-compressed.js
No longer relying on PHP to echo HTML as much
Code folding vars renamed to codeFoldTag and codeFoldBrace
A new var also set up to define the style of the + that appears in the
gutter
Also some fixes to the + symbol which was overlapping numbers & wrapping
badly
This var is used by both codeFoldTag and codeFoldBrace to set + styling
Formatting of code in creating CM instances
Pulling thisCM through on onCursorActivity and onKeyEvent
This is so we have an object which we can use instead of much more code,
doing it the easier way
Moving away from the idea of multiple user levels, users will either
have full access or no access
Swapped all userLevel session vars to a loggedIn var, which is a bool
Makes things simpler and paves the way towards the new login screen
(before you see any files, code etc)
activeLineBG color is #ccc for Eclipse, Elegant and Neat themes #000 for
all others
Set the default text color as #000 so Eclipse, Elegant and Neat themes
display fine
Now loading settings.php rather than config.php so we can use vars such
as docRoot
Using docRoot rather than the $_SERVER version
ICEcoder root now shows full path rather than just root portion
fullPath no longer needed in JS clickable link
As full paths are passed through, remove this from displaying to user
(So they get a doc root relative version)
Clearer wording in a few areas
Width and height now 100% rather then 100px
This is to avoid occasional issues with non resizing on login
No longer setting the width, no need
(Could also leave the height to 100% but it's only as high as the no of
lines in the document, looks a bit weird)
3 x util libs (foldcode, searchcursor & match-highlighter) now in
codemirror-compressed.js
(this means less files and saves around 7k of data)
Ternary statement now used to specify theme CSS file
ICEcoder root shown which is the file manager tree root
All server variables such as codeMirrorDir, visibleTabs etc now in
$ICEcoder array
This is so we have a single object to contain all settings, just like
the JS equivalent
Setting up mouseDown value as bool on down & up events
Mouse move now gets X & Y pos along with determining area event
triggered in
Also then determins if we can resize file manager width & show w-resize
icon
All of this applied to HTML tag so at hightest DOM level
Used // instead of /* */ in CSS, caused .cm-tab:after to be a missing
class
Simplified conditional inserting of tab arrow in PHP
Only checking indexOf .js, .css and .less if there is a fileName
Using a single JS for main CodeMirror JS file and 7 x mode JS files
This is from their compression page where all files are stored in 1 file
and also uglify compressed
Result is around 105k less bytes and will load quicker too as just 1
file
Previously identified objects by selectTab, but this doesn't work with
dragged tabs
Now identifying using init 'num' value, which is much better & also
means less code