Commit Graph

256 Commits

Author SHA1 Message Date
Matt Pass
5f948d9c56 Fix and improvements to saving and new tabs
newFile now just calls newTab but with 'alsoSave' param, which is picked
up and runs saveFile, giving more power to the API
When opening a file, if it's a new tab, call createNewTab with a 'new'
param, which is picked up and if set, we don't call setPreviousFiles. We
don't want to set them on adding a new tab anyway, plus it creates an
extra process, which means the server queue gets jammed and new tabs
don't get a save action processed.
2014-12-12 18:34:49 +00:00
Matt Pass
4ef49f0172 Message is now thanking user, click to continue 2014-11-27 18:09:48 +00:00
Matt Pass
453850a891 Add source, shiftSim, boxSelect, del adjustCursor
Remote menu option is now Source
Don't hard code or pass through the adjustCursor value
shiftSim param added so we can simulate a shift key just as we do with
ctrlSim
boxSelect function added so we can draw a box on drag in the file
manager and select files. Math.abs used to always return a positive
number
2014-11-18 13:50:21 +00:00
Matt Pass
39541f4c81 Esc falls through to ICEcoder control now
If we have multiple selections, deselect to the primary selection only.
If we only have a single selection, then we comment/uncomment.

(Avoids having multiple selections, pressing Esc to clear to a single
and also unwantedly commenting/uncommenting).
2014-11-17 16:00:23 +00:00
Matt Pass
1a2a921753 No need to decode here really
Is decoded in file-control.php (and XHR version).
Min JS file updated to match current JS
2014-11-14 11:49:27 +00:00
Matt Pass
b650b64455 file now POST'd and can be sent to serverqueue 2014-11-14 11:43:37 +00:00
Matt Pass
2d45e6e297 Apply new JS value to updateDiffOnSave flag 2014-11-14 09:52:17 +00:00
Matt Pass
add96dc9d2 Tidy up of XHR call on save
Var extra vars
saveURL value now just used in situ
statusArray is now statusObj
2014-11-13 17:25:21 +00:00
Matt Pass
2f66afa4e4 Time params on the action and URI encode content 2014-11-13 13:59:44 +00:00
Matt Pass
cf26b5b4e2 XHR and JSON now used when saving
First step towards replacing the old HTTP & form posting looparound
method, with a much more efficient XHR and JSON response system. For
now, only save uses this, load, delete, perms etc use old system until
save is stablised and fully tested.
Starts XHR call and when we have a response, if there's an error, show
that, otherwise, do the items listed in the doNext value.
2014-11-12 17:45:13 +00:00
Matt Pass
1d69fabce2 ondrag over, if dir not expand or this, expand
Mean you can drag items to folders and they expand so you may drop to a
sub dir inside
2014-11-10 08:27:24 +00:00
Matt Pass
ce38b126dc Set user defined perms on new file/dir 2014-11-10 07:23:09 +00:00
Matt Pass
27b2953d9d Also not draggable by default
Set on mouse over/out to avoid unexpected drags
2014-11-07 22:44:54 +00:00
Matt Pass
3d0625231f Fix to cursor height for wrapped lines
Avoids issue caused by for non diff height styled lines
2014-11-07 22:00:12 +00:00
Matt Pass
56d1f60675 Update perms BG color etc on change 2014-11-07 21:02:11 +00:00
Matt Pass
51661a41dd Files/dirs with 777 shown in red
The 777 perm is now shown with a red background (and white text) so it
stands out as a bad practise. May look to add a setting to turn this
on/off in future.
2014-11-07 20:28:16 +00:00
Matt Pass
de1704a617 Slashed paths on message & start point for FM keys
Piped paths converted to slashes on chmod server message display
On up/down/left/right/Enter, if we have no file selected, select root as
a start point
2014-10-31 14:49:17 +00:00
Matt Pass
15bce56967 updated function added
Displays message ontop of black BG asking user to donate if they find
useful
2014-10-31 09:53:19 +00:00
Matt Pass
cea9a4e299 fmAction added & code tweaked, alts & improvements
On init, select root dir
fmAction added to allow movement around file manager with
up,down,left,right and enter
load param in openCloseDir is now always the opposite of what it was
before. Function also removes node if it was UL, so we don't have hidden
elems still there
Refactored tag wrapper section
Added conditions to move between file and content areas
(CTRL+Alt+left/right)
Space is no longer the key to refocuson content area
2014-10-30 17:42:40 +00:00
Matt Pass
ec14772abd Shortcuts added to allow working with FM
Up/down = traverse up/down in current dir
Left = back up to parent dir
Right = open dir/select 1st item in dir/open file
Enter = expand/refresh dir or open file
2014-10-30 11:55:10 +00:00
Matt Pass
5ec63bb973 Move resultsBar according to scroll pos & panes
scrollbarVisible now part of top.ICEcoder namespace
Placement of resultsBar done in setLayout now and takes splitpane into
account
On change we set scrollbarVisible and set layout again
2014-10-29 17:30:52 +00:00
Matt Pass
e05fc594b7 Nest display functions gone & code assist on diff
Lots of items removed as part of dropping this:

dontUpdateNest
dontSelect
htmlTagArray
startPosLine
startPosCh
cursorOrigCh
cursorOrigLine
nestDisplay
tagString

highlightBlock()
getNestLocation()
getNestLocationSub()
setPosition()

images/nest-tag-bg.gif

codeAssistToggle now working on diff pane also
2014-10-29 16:22:38 +00:00
Matt Pass
3258c45eb9 Action correct pane - file/dir drag & fold/unfold
Focus on last instance on file/dir drag - used by pasteURL to drop URL
in correct pane
Shortcut for fold/unfold line also needed to consider pane
2014-10-29 14:54:58 +00:00
Matt Pass
b797acea90 Set cursor height (is a % of line height)
cursorHeight is a number from 0 to 1, based on % of line height. As we
set line heights in diff mode and the default cursorHeight is 1, it
fills 100% of the height. this tweak ensures the cursor height is the
same as the text height.
2014-10-29 14:07:09 +00:00
Matt Pass
91f47a4e20 Inner line diff highlighting on replaced lines
Loops through all changed lines and marks 3 ranges for pre, on and post
change on those lines
Applies to both main and diff panes
2014-10-29 12:43:03 +00:00
Matt Pass
bc552d2d2f true param added to always get from server
This param forces it to get content from server, without this could
potentially get cached content
2014-10-29 10:23:17 +00:00
Matt Pass
30025333dd Set previewWindowLoading flag according to state 2014-10-29 10:16:26 +00:00
Matt Pass
a08586252a New flag added for previewWindowLoading 2014-10-29 10:10:30 +00:00
Matt Pass
b235b40715 doStatsJS plugin runs after open and update events 2014-10-28 09:20:59 +00:00
Matt Pass
6579378e19 Reworked render line and diff functions
renderLineStyle is now an array of style arrays
cMonScroll function added to move scroll position of other pane to match
The on('renderLine') event now covers all lines, a change since earlier
versions of CodeMirror
This means a reworking of code was needed here to firstly identify a
matching pane and then if we have a match, add the style. Done in a for
loop and considers array items in renderLineStyle
Reworked much of the updateDiffs functin to reset array & value to begin
with and push to renderLineStyle array now. Also only doing this if we
have a height higher than normal to set, for perf reasons
No need to set renderLineStyle to false anymore
Finally, sorted the order things happen into 2 logical sections - main
pane changes first then diff pane changes after
2014-10-26 07:10:46 +00:00
Matt Pass
ed08585867 Last 2 params need to be applied to function 2014-10-18 20:54:47 +01:00
Matt Pass
0b7120633d Text in 2 panes now lines up via renderLine event
renderLineStyle and renderPaneShiftAmount added to store info for
renderLine event
Function added for renderLine event, applies styles to line if we're
rendering that one
When updating diffs, run a loop to mark text according to it's status of
replace, delete or insert
Here we are also setting styles ready for the renderLine function and
clearing when done
This last part sets the height of the other pane, so lines of text line
up and make sense visually
Update on switching tab and using new settings
2014-10-14 17:53:34 +01:00
Matt Pass
4c27e23d80 Split pane, new functions and diff mode set up
New vars for splitPane, debounce and editorFocusInstance added
Split pane controls added and center themselves and can now trigger
single and split pane views
Editor functions added here for focus, blur, onkeyup, oncursoractivity,
onchange and oninputread, can handle requests from either main or diff
pane
updateDiffs function added which will show differences between 2 panes
using jsdifflib and markText
updatePreviewWindow now it's own function too
Many functions redone so they can also take requests from either main or
diff panes, by using thisCM instead of cM
getcMdiffInstance function also added
Diff pane also updated on changing settings and switching tab
2014-10-11 13:12:57 +01:00
Matt Pass
4314ca2917 Path fixes for add and delete actions
When adding files, location should be a slash if not set
Remove any initial double slashes
When removing files, location should be blank if not set. Then replace
iceRoot with a slash, before reducing double slashes at start, slashes
for pipes and tack together with file to make the targetElem, which is
what we end up looking for
2014-09-17 12:10:18 +01:00
Matt Pass
296eeff33d Translations added for find/replace area in English 2014-09-05 22:21:31 +01:00
Matt Pass
d24a2745ce Case change on function namee 2014-09-03 06:14:50 +01:00
Matt Pass
28881db771 Path reference fixes
Replace iceRoot with nothing on location
If we have no location, it should be a nothing to start with, not a
slash
Use this.childNodes[1].id instead of made up hardcoded ref
onClick event added also, wasn't there previously?!
2014-08-29 19:22:39 +01:00
Matt Pass
9499e98066 Adjusted size of commit screen shown 2014-08-27 09:20:26 +01:00
Matt Pass
6857dadec5 ctrlSim added, GitHub nav and actions
ctrlSim param available to simiulate a CTRL key
In githubDiff mode, show the number of selected files and update button
and text colours
gitHubAction function added to call the github.php file with that action
in the URL in the centre of screen
Function also added to show/hide GitHub nav
Removed old alert message as we're much closer to being finished now
2014-08-27 09:20:18 +01:00
Matt Pass
f4894fa838 LI shortcut added
CTRL+Alt+8 shortcut for <li>
Remove old, unused h4-h6 shortcuts from array
Help screen is a little higher to allow for the new shortcut
Minified JS file brought up to date
2014-08-21 15:31:33 +01:00
Matt Pass
195ba788bb JS lang items used and print pre wrap fix 2014-08-21 14:25:57 +01:00
Matt Pass
6a81152b05 GH token set flag, new functions and tweaks
githubAuthTokenSet flag added, false to begin with
Refreshing file manager now just reloads, not loads hardcoded URL
New function added to ask for GitHub auth token
If set, it auth's with that token and also passes through the place to
go next. Clears token value too for security.
On attempting to show the GitHub manager pane, if we have a token set,
great, show it, if not ask for the token
On toggling the GitHub diff mode, if we don't have the token set, ask
for it
githubAuthTokenSet param passed in to update flasg
2014-07-27 12:54:04 +01:00
Matt Pass
3bf0e2e4db Return false after function 2014-06-27 09:54:39 +01:00
Matt Pass
047a33a604 Snowflake char for unsaved state, not asterisk 2014-06-25 11:35:26 +01:00
Matt Pass
85e8d93190 GitHub diff toggle var & function added 2014-06-23 08:48:25 +01:00
Matt Pass
52b29423d0 Shortcuts for insert line before/after added
Taller help screen needed as a result
2014-06-19 08:46:31 +01:00
Matt Pass
4707e15c12 Insert line before and after functions added
Triggered with shortcut keys (Shift+Enter) and (Alt+Enter) respectively
2014-06-19 08:41:06 +01:00
Matt Pass
5d4e22d363 Cursor set to end on replaceSelection calls
It's the default, but good to be specific
2014-06-18 16:50:03 +01:00
Matt Pass
b344d1e91e indicateChanges function addded
Shows a * at the end of the title to indicate changes
Called on closing tabs and closing all tabs
2014-06-18 07:36:11 +01:00
Matt Pass
38c7885718 Do pesticide plugin on preview window open 2014-06-12 16:57:17 +01:00