50 Commits

Author SHA1 Message Date
Matt Pass
1c99f127be Replace alert with message 2015-09-05 16:24:29 +01:00
Matt Pass
b1df1e8403 Use ftpStart and ftpEnd functions 2015-08-19 06:36:04 +01:00
Matt Pass
2ef1637d0b Clarify var by calling it ftpRoot 2015-08-13 09:23:11 +01:00
Matt Pass
4d1b4e2237 Can now get branch over FTP
Include new FTP lib and if we have FTP site params available connect
over FTP as the list to show
2015-08-13 08:57:38 +01:00
Matt Pass
af86a93993 app/XML files are OK here also 2015-04-29 08:55:48 +01:00
Matt Pass
c21d57e36e Don't include $iceRoot in comparison 2015-04-25 12:24:57 +01:00
Matt Pass
de5e759ac9 Be more specific about dir being excluded
Only exclude actual dir ICEcoder is running from
2015-04-25 12:20:24 +01:00
Andrey Grinenko
2e601a4ccc do not add openCloseDir onclick handler (which loads folder contents) for files. Files are not folders and this handler only causes problems overlapping with doubleClick handler sometimes. 2015-02-16 13:15:16 +03:00
Matt Pass
ab39f9f51b Microtime this URL also to help stop caching 2015-01-23 08:25:25 +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
b90dbda803 Not draggable by default, toggled on mouse over/out
Avoids unexpected drags outside of icon & filename
2014-11-07 22:44:15 +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
5ae9e0b92e Focus on correct pane on drag
Used by pasteURL function to drop URL in correct pane
2014-10-29 14:56:12 +00: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
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
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
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
Matt Pass
d887eca03c Chaneg path scope & check excludedArray first
treePaths, diffPaths and deletedPaths now all namespaced to top level so
we can access from elsewhere
Check we have excludedArray first before looking at it's index. This is
to avoid issues when switching in and out of GitHub Diff mode.
2014-09-17 12:02:13 +01:00
Matt Pass
4cb2ac98d3 Deleted files show up now
Excluded array paths have slashes not pipes
Don't add deleted files to diffPaths array also, keep them seperate
Can't use a for loop to add deleted files, only adds last reference as
happens before a tickover
Instead use a setInterval as a loop, with k as the counter instead of j
to avoid confusion
Check if it's not excluded dir/file as an outer if statement, with path
fix for root
3 cases set up for adding deleted dirs/files in a sub-dir, plus folder
or file in the root
Clear the interval when finished looping
2014-08-29 19:28:42 +01:00
Matt Pass
73148eabed Removed unneeded setting of thatNode 2014-08-29 07:23:21 +01:00
Matt Pass
4612e5036d Exclude .git dir 2014-08-27 09:20:10 +01:00
Matt Pass
21ab41e677 Placeholder vars added for more lang pieces 2014-08-10 21:07:42 +01:00
Matt Pass
a0bc6e8c31 Undo 2 changes that shouldn't be committed 2014-08-06 09:30:13 +01:00
Matt Pass
5de4cd657e Language system setup and English translations
Covering top level and login so far only
2014-08-06 09:26:50 +01:00
Matt Pass
3d66db04ae Working with GitHub diff mode
Now an HTML type file, had no doctype, header etc previously. Now does
and also loads in 2 x JS files for GitHub API control
Gets full list of files, considers .gitignore files and gets an excluded
list
Always has a GET location now, so no need to consider
If in GitHub diff mode, for each file in our list get file contents and
put the name, SHA and type into 3 arrays
Work out GitHub repo path and set up JS arrays the same as PHP arrays
Then start a github object and begin examining tree for differences
recursively, adding to arrays and removing DOM elems from branch DIV as
needed
With that done, we need to cover the dirs not yet opened and if they
contain no changes, remove them
Finally, remove .gitignore excluded filrs
showFile function set up mostly as per previous code, but now also adds
files that are deleted (ie, to make them show up in the tree)
Error catching and helpful messages and redirections added such as when
you have no diffs or used up your GitHub API rate limit
2014-07-28 07:00:56 +01:00
Matt Pass
f5cd2b46b9 Else & if conds added to get GitHub repo
Added an else condition to work with empty folders, establishes local
and remote paths and works out of the $iceRoot is one of our local paths
If so, inform the user their folder is empty and ask the user if they'd
like to clone the repo
If so, show the loading mask and call our GitHub script to begin the
process
2014-06-03 08:40:48 +01:00
Matt Pass
ec44407e25 xssClean the displayed file/folder name
Using html filter
2014-04-26 12:23:29 +01:00
Matt Pass
a3c0243772 Include headers lib & csrf hidden form field
To help protect against CSRF and clickjacking
Also include hidden form field containing this for postback
top.ICEcoder.csrf also set
2014-04-18 17:57:54 +01:00
Matt Pass
210c92b52c Only look on strpos if we have bannedFiles
Causes empty delimiter warning otherwise
2014-03-05 08:13:19 +00:00
Matt Pass
080aaea4f7 Exclude from FM if its the ICEcoder dir 2014-01-11 17:44:22 +00:00
Matt Pass
43cc344b8b Check if we have a CM instance before focus 2013-12-08 16:06:55 +00:00
Matt Pass
57d96b0bf9 Files/folders now draggable
LI tags now draggable
On drag, test if we are dragging with a key down. Also focuses CM editor
to show the cursor incase we want to drop into code and we'll then know
position
On drag end, perform a dropfile function
2013-09-26 18:18:05 +01:00
Matt Pass
b39fdaca95 cmdKey added as alternative to ctrlKey 2013-07-24 08:24:33 +01:00
Matt Pass
98514ac46f Set highlights once folder anim done
Was previously attempting highlights on folder open, needs to be when
anim is done
2013-07-21 19:00:01 +01:00
Matt Pass
26f3265299 Hide branch DIV, set fmReady to true once
The branch DIV is now a temp DIV only and not seen. Previously it was
seen onload of ICEcoder as the display of the root. However, there were
inconsistencies in line returns etc and so now even the root has a
branch built for it on load. ie, the init load and branch generating use
the same system.
Set fmReady to true if not when finished animating the folder. This only
happens on load of course and means we run init afterwards
2013-07-17 13:32:24 +01:00
Matt Pass
2dc702efc6 Animate folders & files into view
Shows a new folder/file every 4ms to give the impression of animating
into view
2013-07-11 09:50:41 +01:00
Matt Pass
ca22316ae4 Set root to blank to avoid double slash in path 2013-06-29 23:29:21 +01:00
Matt Pass
5bd99480f1 Redo highlights on opening branch
When we open a new branch, redo the tab highlights which also redoes the
file manager highlights
2013-05-21 16:44:21 +01:00
Matt Pass
614ee50262 Open file on clicking on a mobile 2013-05-16 08:31:18 +01:00
Matt Pass
2dfff50031 Set 2nd param to this.childNodes[1].id
Rather than a hardcoded string which we need to update later, make it
relate to the inner node items ID
2013-05-12 13:53:28 +01:00
Matt Pass
736d3c8744 If ctrlKey, don't openCloseDir
We are selecting files/folders if the control key is down, so no need to
open or close dirs
2013-04-21 15:48:04 +01:00
Matt Pass
b7aa8bd56c Check if we have a nextSibling first
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).
2013-03-08 14:28:18 +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
0569a4b633 Remove redundant full tree code
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).
2013-03-02 16:28:46 +00:00
Matt Pass
f2f2e780b0 Condense onto 1 line and remove extra line break 2013-03-02 13:30:31 +00:00
Matt Pass
f32e7df86a Only do DIV if location, tweak perms & slice fix
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
2013-03-02 12:49:30 +00:00
Matt Pass
1fe5e6ad8e Set $fileAtts to nothing as a fallback
Strict PHP modes will complain this isn't set otherwise
2013-03-01 16:21:28 +00:00
Matt Pass
6ecc435b85 Boot users if not logged in 2013-02-26 17:35:09 +00:00
Matt Pass
a0a70495f0 Always set the scanDir to $docRoot.$iceRoot 2013-02-26 16:57:17 +00:00
Matt Pass
29981dfd52 rename get-tree to get-branch 2013-02-26 16:48:56 +00:00