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.
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.
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.
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.
No need to set node to nextSibling again, only once is needed
If condition is now else if and calling the get-tree.php script
subsequent times and only if we're opening
This means we fix the open/close dir problem and also reload the dir
each time we open
Change onclick event by setting 2nd param to false so it doesn't reload
Broke setting of node.nextSibling down into 2 new items, may revise this
If we're due to load, pass that through to get-tree.php in the
fileControl iFrame to begin the process
The fileManager function was only being called once onLoad of files.php
This was really only adding onClick events and setting classNames and
style.displays, no need to do this really with JS, merged into files.php
as it's creating the tree
openCloseDir function now available to deal with open & close of dirs
This is less code, less JS to run on boot and paves the way towards
multiple treeTypes
New variable flag for altKeyDown just like ctrlKeyDown
Restructured key tracking system into more modular chunks
If CTRL+Alt+key, check if we need to trigger tagWrapper function.
Currently have 8 common tags setup (for div, span, p, a, b, i, strong,
em)
tagWrapper function receives any tag and wraps selected text with that
tag
If it's an a tag tho, it adds a href="" to the start and sets cursor
between quotes
Run new currentArrayFull array inline with currentArray
This provides a full path and the currentArray then becomes a file array
only
nextValueFull provides the value which we find the index of to insert
into alphaArray
closeButtons now take the parent nodes' ID to know what to close, also
image inside has no ID anymore, targetted via
childNodes[0].childNodes[0] from parent tab
var diffX at top of function
Setting both tabSlide and tabDrag classes on start of tab dragging now
Massively improved and finished tabDragStart, tabDragMove & tabDragEnd
functions
New functions - sortTabs and alphaTabs
No need to get cM on redoTabHightlight, and it also sets the close tab
BG color by targeting the child elems, no need to consider or update an
ID on this anymore.
Now asking to close on all tabs
On start of the drag, all tabs apart from the one we are dragging are
given the additional tabSlide class so they slide in the background.
Better use of swapWith variable and now setting background tabs position
more effectively plus also setting opacity and returning to full opacity
on release of mouse button.
On that event we also add the tabSlide class on our released tab so it
slides into place, set the tab widths/positions again and after 150ms
(after our released tab has finished it's slide transition), reset the
zIndex, classname for everything back to the initial state.
Previously we were using HTML5 dragging, but this is too freerange, we
want to restrict to a region and x-axis only. Replaced with new system,
doesn't actually do anything yet when you release mouse but UI works.
Deleted the removeSnippet function, no longer used.
closeAllTabs now passes 2nd arg to closeTab, setting true if we've got
more tabs to close, false if not. The dontSetPV arg determins if we
should setPreviousFiles or not. This means we only set this once all
tabs have been closed.
Also fixed issue with setting previousFiles, wasn't setting on 'CLEAR',
ie, no tabs open. Now sets a blank to handle this.