Commit Graph

108 Commits

Author SHA1 Message Date
Matt Pass
a1574af5e0 Working with previewWindow, plus new sys tools
stickyTab now previewWindow in all places
nestDisplay text now gone, was just clutter
nestValid and nestDisplay now move to be under editor when resizing file
manager
Now setting nesting OK/broken on title on new look nesting indicator
new functions for openPreviewWindow and openTerminal, tidied up code a
little
stickyTabMaybe now removed as a flag
2013-05-06 17:40:02 +01:00
Matt Pass
cafa9d521a Making JS Google Compiler compatible
Needed to alter a few things to make it Compiler compatible. These
include stop using </textarea> even if it's in a comment, escape it when
using it as a string, comment tag openings need to be escaped too, plus
we cannot use char as a var, so renamed many references to ch instead.
Finally, needed to escape the &#39; apos ref to avoid issues there.
2013-05-06 15:59:59 +01:00
mattpass
a5b395d888 3rd param should be false
The 3rd param is to define buttonClick, which isn't true in this case.
2013-05-05 19:52:25 +02:00
Matt Pass
c214640bb1 Jump to Definition variations setup
If something is selected and we have an orig cursor pos, set it back to
that. If not, we set the orig cursor pos, define an array of possible
definition matches and attempt to find them one after another in a for
loop, escaping when we do. Altered findReplace function to provide a
return of true or false depending on if anything is found.
2013-05-05 13:35:38 +01:00
Matt Pass
d7a8b35ded Jump to Definition, opening up findReplace func
New function jumptToDefinition. This takes token at the current cursor
position and then looks for that function definition as a set piece of
text 'function '+tokenString. This is triggered from CTRL+J so you can
hit this whenever you're on a function call and it will jump to it's
declaration.
In doing this I have repurposed the 1st param in findReplace function to
now accept a string to find. Previously we had this set to action, but
this variable was never used, must have just been a placeholder. In the
couple of places we call this function now we are passing the find input
box value.
2013-05-04 15:19:31 +01:00
Matt Pass
e58f9cae28 overPopup flag, canvas display & hex/RGB convert
New flag to determin if we are over a popup or not, won't hide popup on
click if we are
drawCanvasImage function added, takes img node, creates a new canvas and
on load of a JS img object, puts the same image into the canvas, scaled
to same size. This then has 2 functions applied to update RGB and Hex
values and BG colors as the mouse moves and also on click sets another
set
rgbToHex and toHex functions added to help return hex values on demand
2013-05-04 13:48:33 +01:00
Matt Pass
d43a758a37 Markdown mode added, fix to tag display
Markdown added as a mode
CodeMirror changed their object structure to include another child -
htmlState
If it's a markdown file we're editing, after loading our file into the
stickyTab, onload of this parse our content through mmd to this window
2013-04-30 17:54:19 +01:00
Matt Pass
444695a908 CTRL, Alt & Shift keys now established natively
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.
2013-04-21 15:42:55 +01:00
Matt Pass
b5050acba0 Set font size on updating settings
New font size passed thru to this function to apply to the class
property on demand
2013-04-20 16:13:24 +01:00
Matt Pass
2c6bcacb25 New functions to show color picker & insert value
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
2013-04-15 16:18:59 +01:00
Matt Pass
3c4872c231 indentSize and indentWithTabs
tabWidth is now indentSize
indentWithTabs is a new setting which can be true/false (false means
spaces)
Applied immediately after updating on settings screen
2013-04-14 14:12:18 +01:00
Matt Pass
cc82304996 overCloseLink flag and position new tab on close
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
2013-03-22 16:52:43 +00:00
Matt Pass
2938014b33 Set tabs on mouse y over 62px not mouseout 2013-03-20 18:41:16 +00:00
Matt Pass
591ec57c49 nest display err catching and tab sliding
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.
2013-03-20 18:27:38 +00:00
Matt Pass
9197d24fff Check for file/folder at location before adding 2013-03-19 17:11:37 +00:00
Matt Pass
9fa87c5141 Get rid of global, CSS & Voke URL tweak
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
2013-03-18 17:10:12 +00:00
Matt Pass
33ea31f1fa Show/hide text next to nest display
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
2013-03-17 19:23:49 +00:00
Matt Pass
e2adcabc5b Open file promp function added & help updated
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.
2013-03-16 12:54:04 +00:00
Matt Pass
6161518d8b duplicateLine & removeLine functions
Functions added to duplicate line and remove line. Triggered from CTRL+
+ and CTRL+ - shortcuts whilst in editor area.
2013-03-16 12:28:52 +00:00
Matt Pass
bf40cb2009 Use voke.fm for PHP and CSS searches
Continue to use Google for other searches
2013-03-16 12:06:35 +00:00
Matt Pass
0f460483f3 Show tagName or content after nest display 2013-03-16 11:03:11 +00:00
Matt Pass
bf22cd1638 Now considering depth on highlight nest
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.
2013-03-16 10:42:26 +00:00
Matt Pass
1e09ccbc0c Extra code to find target tag
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.
2013-03-14 17:21:02 +00:00
Matt Pass
33308688aa Ignore deleting nothing & strip trailing slashes
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.
2013-03-11 17:40:42 +00:00
Matt Pass
82190b330b Remove console.log and taller help screen
Help screen needs to accomodate 2 new shortcuts
2013-03-11 09:02:18 +00:00
Matt Pass
30b6120582 h1-h7 added as tag wrappers, plus line breaker
Can now use the CTRL+Alt+ num 1-7 shortcuts to wrap in h1-h7 tags
Can now also CTRL+Alt+Enter to add a br tag at end of line
2013-03-08 17:38:14 +00:00
Matt Pass
68a51af239 Remove trailing slashes on 4 instances
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.
2013-03-08 14:17:21 +00:00
Matt Pass
e05f276b6a Condensing & removing code & tweaks
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
2013-03-02 20:59:08 +00:00
Matt Pass
5898ebb5f0 Remove file & folder count
Remove build up of vars, data, functions and triggering the update of
this on load
2013-03-02 18:14:04 +00:00
Matt Pass
d122c83535 No longer dealing with opening thru display
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.
2013-03-02 17:17:05 +00:00
Matt Pass
1f1635ede3 Don't look to nextSibling again 2013-03-02 13:30:54 +00:00
Matt Pass
47a9bde70b Indent tabs removed as a setting 2013-03-02 11:24:59 +00:00
Matt Pass
ae18a10fd8 Update nesting indicator on close tab
Particularly crucial when you close the last tab, so it removes the nest
items of the last doc
2013-02-27 16:27:55 +00:00
Matt Pass
29981dfd52 rename get-tree to get-branch 2013-02-26 16:48:56 +00:00
Matt Pass
e5a1a10101 Help screen wider, not as tall
Due to adding extra shortcuts to Help screen, it needs to be bigger to
accomodate this info
2013-02-26 16:30:56 +00:00
Matt Pass
92e7603aa5 Don't look to nextSibling & open/close fix
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
2013-02-26 13:14:06 +00:00
Matt Pass
a7a5ada4d9 openCloseDir changes onClick & gets dir branch
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
2013-02-24 17:19:51 +00:00
Matt Pass
25fd009be3 Focus on editor in 4ms
Wasn't focusing after switch, this solves the issue
2013-02-24 11:07:02 +00:00
Matt Pass
9ffab47f83 fileManager() gone, new openCloseDir() function
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
2013-02-20 18:09:00 +00:00
Matt Pass
a774f9052d Tag wrap on a tag cursor pos & other Esc = cancel
Need to set cursor position to start line, not end
Accidentally removed cancel shortcut
2013-02-18 09:58:27 +00:00
Matt Pass
2d79b5a988 Reset fileInput and only act if we have file
Reset fileInput back to an empty value after upload (success or fail)
Only if value isn't empty action the upload
2013-02-17 18:04:32 +00:00
Matt Pass
86ae5e14b4 Remove the child on delete
Instead of just hiding. So we can delete an item and create a new one of
the name name at that dir location without issues.
2013-02-17 17:47:06 +00:00
Matt Pass
5697625a7d Line breaks and indents for DIV tag wrapping
If the user is wrapping the selected with a DIV tag, add line breaks
were needed and indentation as appropriate.
2013-02-17 16:26:10 +00:00
Matt Pass
a5894dfae8 Alt key down flag & tag wrapper
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
2013-02-15 10:28:17 +00:00
Matt Pass
9fe38ad649 Taller help screen and dataMessage function
Help screen is now taller to accomodate 4 new FM actions
dataMessage function available to display DIV and then add message into
it on demand
2013-02-12 19:57:40 +00:00
Matt Pass
e4599e3076 Hide paste option until we have copied something
Changes display from none to block when we copy a file/folder ref.
2013-02-11 17:12:59 +00:00
Matt Pass
1a0d8933dc Adjust style values
Now we have an extra stylesheet, this should be [3] not [2]
The class ref for the tabs class is actually [5] not [4]
2013-02-11 17:08:21 +00:00
Matt Pass
8c85b3098d Inform user if there is no file/folder to copy 2013-02-09 17:18:23 +00:00
Matt Pass
000607f8e0 Considering empty folder should be opposite arg
Should be if the childNodes.length < 3, was doing the opposite. Oops!
2013-02-09 15:43:47 +00:00
Matt Pass
088b3f60ea tagNestExceptions array removed
No longer used (was only used by the ropey close tag system, now
removed)
2013-02-09 14:50:02 +00:00