Commit Graph

1649 Commits

Author SHA1 Message Date
Matt Pass
bfc1babb64 Fix to path used here, needs pipes? 2014-10-18 22:17:39 +01:00
Matt Pass
4edbf8d79d Now running custom processes for all actions 2014-10-18 22:17:17 +01:00
Matt Pass
f411370e32 New processes added
To cover all actions in file-control now
2014-10-18 22:16:43 +01:00
Matt Pass
2ea0ae8793 Die if not logged in to protect files
Avoids risk of them being run by visiting URL when not logged in
2014-10-18 21:09:32 +01:00
Matt Pass
ed08585867 Last 2 params need to be applied to function 2014-10-18 20:54:47 +01:00
Matt Pass
15eba478ac Slice 4 chars from end (for less and scss)
The char position used by $fileNameExtPos is actually from the
beginning, not end, so is useless here
However, we know that 'less' and 'scss' are 4 chars, so we can just
slice off those 4 chars always
2014-10-18 20:38:31 +01:00
Matt Pass
16da2d6a88 Update to match main JS file 2014-10-14 18:04: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
14ab734c96 diffNone class and renderLine event added
diffNone added as an empty class to allow a line re-render as it's added
renderLine event added, passing vars onto function in JS file
2014-10-14 17:47:42 +01:00
Matt Pass
414e814de2 Establish paths & call github.php with read action 2014-10-11 15:20:15 +01:00
Matt Pass
d14fae9dd4 Read action to get contents & add to diff pane 2014-10-11 15:19:36 +01:00
Matt Pass
114b7e5d10 Set mode on both main & diff panes 2014-10-11 15:17:41 +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
fbd8475b6e Handling split panes on file control
If GitHub diff mode, load the 2 JS files needed
Ask message shown needed escaped slashes so they appear OK in dialog
No longer open a new file for older version, we display now in diff pane
Temp code added in comment block re getting content from GitHub for file
to show in diff pane. This isn't working at present and probably just
needs a tweak to make work
Slightly renamed vars for active lines to handle 2 panes
2014-10-11 13:01:44 +01:00
Matt Pass
d348191a37 Handling split panes
Establish panes and which one we are looking at when running these
functions
Note: May need to not do this for switchMode, as the diff pane should
fall in line with the main pane
2014-10-11 12:58:03 +01:00
Matt Pass
3958742c12 Implementing split pane
Tab lines now 0.15 opacity as a tweak
diff pane set to 50% width and add, remove and change diff classes added
cMOptions established as object to pass through when initialising editor
instances
Code related to initialising and adding actions to editor instance now
moved to main JS file and we are just about doubling everything up for
the diff pane
New events added for focus and blur also, with functions in main JS file
Active lines also created for diff pane
2014-10-11 12:55:10 +01:00
Matt Pass
0e11386448 On setting GitHub diff to true, go split pane also 2014-10-11 12:46:19 +01:00
Matt Pass
ee1d3cfcc0 Diff and split updates
If the diff instance doesn't have focus either then we can go next/prev
tab
Load difflib.js file also
Split pane controls added, with split view being opacity 0.5
2014-10-11 12:45:54 +01:00
Matt Pass
491191ebde results text moved, now used by JS file
Also reworded text re reloading so it relates to the diff pane
2014-10-11 12:44:08 +01:00
Matt Pass
bf44a2515e Split pane control classes added 2014-10-11 12:41:28 +01:00
Matt Pass
869d184939 Pull actions to be added in v4.4 now 2014-10-11 12:40:44 +01:00
Matt Pass
401568677e Lib added to establish text diffs 2014-10-11 12:40:18 +01:00
Matt Pass
ea7a697e7d Icon added for split pane controls 2014-10-11 12:40:01 +01:00
Matt Pass
a029eceb9d Set session_save_path & fix logout URL
Some hosts have a loop around issue with no session being available
after a header location redirect
After much research, I've found this is due to some hosts not having a
session save path and it needs to be set using PHP
Setting this means ICEcoder works on those few hosts
Fix to bad URL on logout
2014-09-29 10:55:46 +01:00
Matt Pass
7ef86360d8 Version 4.3 v4.3 2014-09-26 15:32:28 +01:00
Matt Pass
746b133a9a Filetype identification fixes & improvements
Look to fileExt to determine the file type by extension rather than
string in fileName which is the path. This means .c isn't mistakenly
picked up in paths such as /httpdocs/mydomain.com/file.rb
Simplified code with 2 improved ternary statements
2014-09-26 14:38:59 +01:00
Matt Pass
c141fc2864 Selected text + tab = indent auto
Instead of single tabs
2014-09-26 12:44:06 +01:00
Matt Pass
cc5cd166be Only if no headers sent, set the 3 headers 2014-09-26 11:59:03 +01:00
Matt Pass
2409bc19c2 Compile Sass and LESS on save if plugins available 2014-09-24 12:28:59 +01:00
Matt Pass
297e482b11 Recursive only if githubDiff, no anim if > 50
Only include github.js if in githubDiff mode
Only do recursive dir loading if in gitHub diff mode
Move folderItems splitting out of loop to avoid unnecessary processing
showFiles now begins the process of displaying files - animated into
view (using setInterval) if less than 50 items, or shows immediately (by
setting showContent and skipping recursion) if more
showNextFile() is a function to actually display a file or if the end,
kick off the process of adding deleted files/dirs
2014-09-23 18:40:49 +01:00
Matt Pass
46c1bdce02 Fixes to allow new items to be created
Store original $file value in $fileOrig
rtrim [NEW] from the $file path as that is messing with realpath
checking
Move debugging alert and console.log line into the for loop and use
allFiles[$i]
If a local path and not the doc root or parent dir starts with the doc
root
Check on $fileOrig when saving as
2014-09-23 16:49:47 +01:00
Matt Pass
be74745318 Links added for info on 2 types of auth token 2014-09-18 18:08:05 +01:00
Matt Pass
cd2e2747c5 Max length of 50 chars added to title 2014-09-18 18:02:03 +01:00
Matt Pass
3a7e728871 No autocomplete on the GitHub auth input field 2014-09-18 17:51:14 +01:00
Matt Pass
3db00273dd Version 4.2 v4.2 2014-09-18 16:09:10 +01:00
Matt Pass
e47b21ce80 Don't check paths if we're uploading 2014-09-18 16:07:39 +01:00
Matt Pass
7adefd1ff0 die() after header to stop going any further 2014-09-18 15:43:48 +01:00
Matt Pass
1276e894b5 File/folder message instead and go back 2014-09-18 15:40:03 +01:00
Matt Pass
9c90ffea43 Replace \ with / when comparing with $docRoot
Windows uses backslashes in realpath
2014-09-18 14:33:15 +01:00
Matt Pass
1ace4e4ed9 Need a greater timeout here
40ms wasn't enough to begin filling the list and so would report back
that there are no changes, when in fact, there are, just not shown yet
2014-09-18 14:16:00 +01:00
Matt Pass
cf8a214a24 Make all paths abs and check realpath on each 2014-09-18 13:02:40 +01:00
Matt Pass
24ea1b108f Establish realpath test begins with $docRoot or die
No need to str_replace ../, as that isn't real protection, use realpath
instead
Always turn into a real path (we'll only pass relative paths here
anyway), and change \ to / on Windows setups
Only if file exists and begins with the root path do anything, die
otherwise
2014-09-18 10:57:41 +01:00
Matt Pass
3b0a00af02 Need to establish full $file path first
Otherwise we won't have a valid fullpath to find $docRoot in
2014-09-18 10:47:57 +01:00
Matt Pass
2ad6f7fbc8 base64.js not needed
Only needed for basic auth and we are using oauth tokens
2014-09-18 09:27:24 +01:00
Matt Pass
54dd10b3bd Font family needed for textarea 2014-09-18 09:15:46 +01:00
Matt Pass
cc62871815 Add section for pulls, display message re v4.3 2014-09-18 09:01:11 +01:00
Matt Pass
72da926a4d Display ICEcoder at a 1.0 scale
Displays without scaling on tablets and phones then. Not that it's
tablet friendly, but maybe one day.
2014-09-17 15:03:25 +01:00
Matt Pass
d2f34c50df Merge pull request #455 from xoofoo-project/master
Update french language
2014-09-17 14:58:57 +01:00
Matt Pass
8454d918e8 Warn if using over non https connection 2014-09-17 14:18:28 +01:00
Matt Pass
048577270b die() so we go no further
Clients can ignore this and continue. All headers should be followed up
by a die().
2014-09-17 13:38:00 +01:00