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.
If the dir exists, run thru from 2 to 1billion looking for next
available number and set the $dest name as that. All exactly the same as
how it works for pasting files.
Tweaking comments to be more accurate
Removed snippetLine, no longer used
Handling openClose dir in a more simplistic way, only need to define
iframe.src once
Replaced text is no longer lowercase
Setting the cursor by setting zone as a variable and then using that
Removed 2 x calls to removeSnippet, no longer a function
Correcting unnecessary .parent
We are no longer setting display block here, this is now done once we
have injected the DOM elems into the tree at that dir. Once that is
done, we set the display to block. We still set none here when
collapsing. This avoids a flash of possibly unsorted files.
Logo is now clickable to ICEcoder site and link also added
If we have no root, show as a /
Add Emmet in people list
Also add extra thanks at end to Github contributors
No longer need to consider depths as we are getting folder/file listings
for 1 branch at a time. For this reason, the opening UL will always be
block and the closing one shown when it's the last item and $GET
location is available (ie, not the root).
Ternary expression to get same saveType results
Create a new $filemtime var and set to 1000000 for non Linux systems
We now have something to compare with
(Tho will always be this on Windows etc)
We don't want to have the DIV tag as part of the nest, so tuck the start
& end tags into the if $_GET location statements, so they only appear
with get-branch and never get injected into the tree
Instead of not showing perms span tags, show them with blank content
Due to format changes, we need to change the slice range to 28 and -7
Possibly because index.php is calling lib/settings.php and this in turn
is calling config.php from it's location. Most web servers know you're
calling from the same dir but maybe XAMPP is thinking config.php should
be included from the index.php location? Anyway, fixed with a more
specific path.
Detect if the finfo_open function is available and if not, grab the file
extension and compare against an array to work out accepted text based
and image based file types to know wether to open in editor or pop open
as an image