Instead of having toggle variables for CTRL, Alt and Shift we are now
establishing if these keys are up/down from the event object passed in.
This means we don't need these flags, it's less code, and more reliable
too as we query if these keys are down from the event hooks.
delKeyDown is also removed though was never really used.
jsRegex has been broken for a few weeks now and Regexplained has caught
my attention as a very good tool to understand regexes you're writing.
Swapped to this alternative.
If magic quotes gpc is still on, the server has this set and the php.ini
file hasn't been able to turn it off. This section will remove the extra
slashes set by it to return the content back to normal.
Font size is now saved to the config file on update from settings screen
and also applied on the fly to currently open docs.
On systems that have magic quotes gpc (get post cookie) turned on,
attempt to turn off with a php.ini file. This works for some users but
is dependent on OS and server security settings as to whether this takes
effect.
To set it to Unix as the default. Opening files with \n line endings in
relatively modern programs will know to use line breaks here if not the
native OS preference
CSS color preview now clickable to show color picker, passing color
value
showColorPicker function shows Farbtastic picker and if we have a color
passed as a param, it sets that
Also new function added to insert color which actually replaces token
value at current cursor position
tabWidth is now indentSize
indentWithTabs is a new setting which can be true/false (false means
spaces)
Applied immediately after updating on settings screen
The 3 x instances where we define closeTabLink needs the
setting/unsetting of a new var flag called overCloseLink. This is so we
can choose not to start or end a drag function.
After processing a closeTab function, set canSwitchTabs back to true in
0.1s
Finally, the newTab left position should be set according to the length
of open files, not 1 less than it and we also need to have a tab width
of 0 but compensate for the padding, so needs to be -18
Only show nest display if we have the cM variable
On close setTabWidths with param to only set newTab position
If we have that param, get values for the last tab by setting i to the
last tab, but if we don't have posOnlyNewTab set, we can set widths &
left pos's of tabs.
Create a new var - cursorTemp and reduce the amount of code used to set
cursor position
The left side of 1st nest tag should have a cursor: pointer styling
Simplify and tweak the CTRL+i code to prefix voke.fm URLs with CSS or
PHP
New array item for nestDisplayText
Clear this to begin with then set with text if we have a nest, clear
otherwise
Only show the cursor position item if we have a nest
Prompt opens asking user to input relative file path, which on hitting
OK will attempt to open. Triggered with CTRL+o shortcut, which is also
added to help screen. Also clarified CTRL+g and noted it's anywhere, not
elsewhere.
Shortcuts added for duplicate line & remove line.
Also moved all file manager and more general shortcuts to the right,
giving editing shortcuts more room. Make all alpha keys lowercase and
clarified a couple of areas such as left click instead of just click.
Made this chunk of code active by removing 1==2 condition.
Now also defining 3 events in a variable and applying to text section
and arrow start ends. Also needed cursor: pointer.
Without this extra code, we would just be finding the previous tag with
the matching name and not consider the depth. This code sets the cursor
inside the potentially correct tag, gets the nest location without
updating the display and if it's not at the correct depth, do i++ so we
end up with another for loop to find the tag previous to that one and so
on. The only way to escape out of this is to find a tag at the right
depth.
Set ch before line in the object, so it's similar to the order of the
endPos object.
Don't ask the user for any confirmation if there is nothing to delete.
This could occur when you select something, delete it, then try to
delete again.
We need to also strip trailing slashes for deleting files when updating
the file manager. This is much like what we needed to do with adding
files to the root of the file manager. Locations should end without a
trailing slash, but a root is a trailing slash as its only char. A regex
here solves the issue.
Test if we have a nextSibling before determining a tagName. This is so
if we have a dir with only subdirs (ie, no files) and the last subdir is
empty, there will be no UL list (which we're looking to maybe remove).
Mainly to cover the root so / becomes nothing so we don't end up with a
double slash. Worth removing anyway incase it's passed elsewhere
somehow/through the API.
Windows may use backslahes as it's dir seperator, but under some PHP
installs it uses the Linux forward slash instead. We could use the
directory seperator PHP var, but I've heard mixed opinions on this and
would rather just detect by looking at what $path, which contains
$docRoot, which is from the $_SERVER variable as this would be more
reliable.
It also wasn't showing the replace button due to a PHP_EOL which ended
the JS string with quote termination.
We weren't getting the new filemtime after saving and using the
$filemtime var value prior to the save. Needs to be reestablished prior
to setting the array value.