Declare all vars at the top of function
If the R, G or B values have less than 50% saturation or we have a high
yellow like color, use a white text color, otherwise black
Set that on both the X&Y preview and the clicked color preview
Don't display errors, just silently log them
Don't produce warnings if we can't session_start due to headers already
being sent
Test if the mb_detect_encoding function exists before using
We can only set the CaretLocType if we have a fileName to inspect, an
edge case brought up by unit testing
Extra param added to closeTab to allow us to not ask the user for close
permission on unsaved files
tabBGopen now a lighter color, plus tabFGcurrent and tabFGopenFile
colors added
Removed bgVPos and no longer setting BG position as we're not using an
image anymore
(Instead we set either the current or open tabBG color
We also set the FG color of the filename to current or openFile
Progress bar removed as it's not accurate or indicative of amount
loaded/progress
Call hideFileMenu instead of manually setting display, so now we have
fade effect
Add opacity transition of 0.15s
No longer manually set display to none on fileMenu on actions, should be
calling hideFileMenu
On showing the menu, set the opacity to 1 4ms after setting the display
to inline-block
Simply set opacity to 0 on hiding so it's more an instant hide
Get rid of progress bar reset
Will only now begin to select a range of files if we have selected files
already.
If not, it will add this first file as a start point.
Will also only range select if we are range selecting in the same
folder, otherwise will add this file. This enables you to select ranges
of files in different folders.
Lastly, the root has a very slightly different node structure, as we
can't start at 0 and step in increments of 2, it needs to be 1, 3, 5
etc. So as a failsafe, if the node we're looking at is not a LI,
increase the i counter by 1.
$configSettings is a seperate file now, containing the array of settings
we have buried in this file
Renamed user template, so change of filename here
Also using $configUsersTemplate to be clearer about things
To make things simpler, everything is now just called password rather
than accountPassword etc
settings.php also now gone back to checking for the existance of the
$_POST password rather than looking for a submit button named 'set
password'. This obviously wouldn't work as that's not the name of the
button on the settings screen, it's 'update'
New vars added for the new event of shift-clicking to select ranges of
files in the file manager
Get the last file clicked and work out if the file we've just clicked is
alphabetically greater than it or not, so we end up with a startFile <
endFile and are therefore selecting from startFile downwards
In a for loop, run until we find our startFile and begin selecting.
If we're selecting and the file we're looking at isn't in our
selectedFiles array, select that file and add it to the array
Finally, when we reach our endFile, break out of the loop
On logout event, include that process
Settings template file is now config___template.php
Create new if statement for login success and fail, plus run processes
for each event
On new user setup, run that process
If multiUser, always show the checkUpdates box as we don't know if we're
setting up a new user or logging in, so have to assume it's a new user
and allow this setting to show
Can only resize the file manager if ICEcoder is ready
Need a selectedFiles[0] in order to prefix to filePath
If we add a new file to the root, we end up with a ||[NEW], so replace
|| with | to fix this
Can only set tab widths if ICEcoder is ready
Session accountUsername is now just username
Settings filename now may contain the username if available from a post
or session var
setPWorLogin is now login by default, set password if we create a new
config file
Instead of the posted accountPassword value, we now look to the value of
the submit button and if it contains 'set password' or not
Set session username to the posted value on login or set password and
set to itself on every load
accountPassword form field now just password
Focus on the username or password field, depending on the 1st one shown
on page
Set the value of the submit button to 'set password / login' if
multiUser
New global function added called 'get'
This is because top.document.getElementById is used so often, we
actually save 2kb by having a function to return the object, plus it's
much more readable to have:
get('serverMessage').style.opacity = '1';
rather than
document.getElementById('#serverMessage').style.opacity = '1';
newTab now has a z-index of 0 so that it slides behind other tabs when
new tabs are opened
serverMessage is now display: inline-block and hiding and showing is
done on moving the left position to 0 or 2000px to show or hide (doing
the show/hide on changing the display type was causing reflow issues
which seemed to mean occassionally the newTab wasn't moving to the
correct position)
On both load and change we need to use braceRangeFinder or
tagRangeFinder depending on filetype
Also get rid of old, commented foldStyle marker CSS historical reference
as we're now using that
fold is now the classname for the guttermarkers, foldOn for the on
variant, foldOff for off
We have a seperate gutter now for folds, called folds and no longer
dropping markers into the linenumbers gutter
initMarks was used for the intial setup of a doc with (-) marks but this
idea can be extended to cover not wanting to collapse and only mark
lines
If a line isn't collapsable now it clears the markers for it (used when
we delete text, replace with something else etc)
Takes new params for markOn, markOff and initMarks
Creates new span DOM elems for markOn and markOff
Determin if a line is foldable by there being a range with chars in
between (ie, start & end line's & ch's not the same)
If it's foldable and we're clearing or setting up the initMarks, show
markOff marker, otherwise markOn marker (as cloned nodes)
Also set to the markOff marker when clicking the inline widget
Original foldcode.js from CodeMirror addon lib added
This is because I want to make changes to this to show guttermarks too
Added as a start point, so we can see changes in a diff view
Look to openFiles.length on if statements within openPreviewWindow,
closeAllTabs and alphaTabs functions so we only do these processes if we
have 1 or more tabs open
Add a context array to all instances of file_get_contents(). This is so
we don't end up with a timeout too early if the system is set to
something short (ie, 15 secs) and we try to open a large file that takes
longer than this short limit.
If we have a new filename and our file is not [NEW], we must be
peforming a Save As.
In this case, establish the old filename and if it's visible, change its
BG & FG colors to the default
Also now set previousFiles when any save happens to avoid previousFiles
still having old filenames
The dialog now wants only a filename in both Save As and New File cases
Condensed code a little here
Config filename now also includes server name (domain and subdomains).
This means you can end up with different config files depending on where
ICEcoder is being used, such as config-localhost.php,
config-mydomain_com.php, config-dev_mydomain_com.php etc.
Also now using CodeMirror 3.13