Commit Graph

43 Commits

Author SHA1 Message Date
Matt Pass
5e04e79354 New function and system to handle saving via update
stitchContents added to stitch content changes together into version the
user is seeing in the browser.
Can action save on having changes or full content now
2016-03-11 18:36:51 +00:00
Matt Pass
0bcf7a1d72 Replace + in filename with %2B to avoid converts 2016-02-05 09:32:47 +00:00
Matt Pass
815578eb34 Now getting count info & as 2nd part use arrray val 2015-10-08 09:26:09 +01:00
Matt Pass
7f8e052a26 Handle newly saved files to avoid NaN 2015-10-03 18:31:53 +01:00
Matt Pass
6ccf0fb135 Working with file versions now
Establish and use version URL part
Add 1 to count on saving local or FTP and update version display after
doing this
All backed up files now have incremental numbers in parens postfixed on
filename
.versions-index file written to with new file line or if line exists
update count on it
On re-getting file due to save conflict, get the count and set in JS
array
2015-09-18 11:04:42 +01:00
Matt Pass
0592459666 Backup system working with params now
Only run backup process if user has this turned on. Some code
simplification added. Removes old backups past X days as per user
setting.
2015-09-08 08:03:53 +01:00
Matt Pass
4f7ea84754 Use yyyy-mm-dd structure instead 2015-09-07 10:27:41 +01:00
Matt Pass
b46e2f324a Redone backup dir struc for subdirs & efficiency
Now establishes path from base and if full path doesn't exist, it fills
in the blanks, including sub-dir structure to file from base.
2015-09-07 09:49:18 +01:00
Matt Pass
0c3390929b Store a backup of our file each time we save
Saves into a host > year > month-day dir, with in incremental backup
names, number in parens
2015-09-05 19:02:45 +01:00
Matt Pass
40e699828b FTP check file/dir & use string, FTP delete added 2015-09-05 16:28:17 +01:00
Matt Pass
e1a2a8da71 FTP enhancements
FTP items: ongoing connection, save finished, improved/multiple doNext
messages, check dir/file, JSON details output
2015-09-01 20:05:47 +01:00
Matt Pass
fa5b549081 Tweaks to save and move
Only use docRoot if not FTP (ie, local)
srcDir and tgtDir need prefixed slashes removed
Use JS isFileFolder function to establish dir/file type as short term
measure, to be replaced with FTP call to establish type so can all be
handled server side
2015-08-20 10:30:33 +01:00
Matt Pass
491edf256e Can now move a file/dir over FTP 2015-08-20 09:21:00 +01:00
Matt Pass
f38e984b31 Rename now working for FTP 2015-08-19 07:07:31 +01:00
Matt Pass
b1df1e8403 Use ftpStart and ftpEnd functions 2015-08-19 06:36:04 +01:00
Matt Pass
78ddfe61ba FTP processes added to handle mkdir and chmod 2015-08-18 07:06:04 +01:00
Matt Pass
0606025a46 Can now save content over FTP
Include FTP control lib and include/exclude items if we have ftpSite
If ftpSite, establish connection and if no errors, write the content to
the filepath before closing connection
2015-08-13 09:12:41 +01:00
Matt Pass
9d661e454e Responsive helper plugin ready plus 500x500px PW 2015-07-09 12:08:19 +01:00
Matt Pass
0f29baf504 Tweaks and comments
Need a semi colon for inline JS, improved and added comments
2015-06-30 17:17:55 +01:00
Matt Pass
f39093c78f Better way of handling file existence checking
Vars to determine if we have overwrite OK permission from user or
there's no conflict with filenames, so it's a new one and we can save
Don't check for DOM node to decide if we can save or not anymore,
instead run an XHR that ends up setting lastFileDirCheckStatusObj from
false to something
On spotting that, clear the interval and continue by asking user if they
want to overwrite, or if there's no conflict, set that value instead
If we have no newFileName or we have one but no permission to overwrite
yet, set the content for use in a moment under saveAsContent and we loop
back around
2015-06-30 16:45:51 +01:00
Matt Pass
05996618d7 Use a value of 0 if timeStart not available 2015-05-22 19:41:13 +01:00
Matt Pass
48c42f0523 Set error info on bad filename
Also only do the next parts with a filename if no error by that point
2015-05-22 18:29:53 +01:00
Matt Pass
2521dafde1 Break into more if/elseif/else so can handle error 2015-05-09 09:42:21 +01:00
Matt Pass
0c86f5718e Now establishing line number and goto on open 2015-05-03 18:30:22 +01:00
Matt Pass
85a9cfaecd Set $filemtime if not set, need to use in JSON 2015-04-27 16:12:44 +01:00
Matt Pass
04fa37a358 Retain existing perms on upload or set newFilePerms 2015-04-25 13:31:07 +01:00
Matt Pass
c7c984f66a Use top.ICEcoder.filesFrame in instances
IE has trouble selecting DOM node otherwise
2015-04-25 11:52:26 +01:00
Andrey Grinenko
ae37460e92 Preserve line endings when editing existing file. 2015-02-16 13:18:32 +03:00
Matt Pass
b5566c8382 Perms now handled by XHR 2015-02-08 14:19:49 +00:00
Matt Pass
385d4e0efd Escaping added 2015-01-30 20:56:34 +00:00
Matt Pass
c087283e46 Unescape new linesuse $file now not fileRef
Also no old skool textarea replacement with custom string
2015-01-30 08:05:14 +00:00
Matt Pass
55f8b9adc2 Fix to path with | to / replacement 2015-01-30 07:22:12 +00:00
Matt Pass
ef98e4f5ab More funcs moved to XHR setup, only load remains
New folder
Move file/folder
Rename file/folder
Paste file/folder
Upload file(s)
Delete file(s)/folders(s)
Replace text in a file
Get contents of remote URL
...all moved to XHR setup now!
2015-01-23 08:29:45 +00:00
Matt Pass
de4c63c37e Change file type from UTF8 to ANSI
Contained BOM at start which caused issues with languages containing
extra chars (everything but English, Dutch and Norweigian).
2014-12-24 16:58:40 +00:00
Matt Pass
f75bd9fe53 doNext is starting and replace Win line endings too 2014-11-26 09:35:51 +00:00
Matt Pass
cab12fd73c More escaping needed to output to JS fine 2014-11-21 16:38:11 +00:00
Matt Pass
d43278fbf7 Request, decode
REQUEST used as param may be over GET or POST (under XHR setup now) and
html_entity_decode it
fileURLPart is now fileURL and POST'd in XHR send, not part of URL to
get
2014-11-14 11:41:15 +00:00
Matt Pass
df685b308e updateDiffOnSave available in JS
Used in if statement to determine if we should do this or not
2014-11-14 09:50:44 +00:00
Matt Pass
b5550d4ba8 New file path set/fix and diffs work with XHR now
newFileName needs docRoot also in path
statusArray is now statusObj
Recoding of diff handling code to work with new XHR setup and
improvements at same time re reducing use of textareas
2014-11-13 17:31:37 +00:00
Matt Pass
0651eedf1e Set the timeEnd and timeTaken values also here 2014-11-13 14:23:07 +00:00
Matt Pass
f7089ec6ca Pass through timeStart also in new file XHR data 2014-11-13 14:11:58 +00:00
Matt Pass
2f66afa4e4 Time params on the action and URI encode content 2014-11-13 13:59:44 +00:00
Matt Pass
6e12da596c New XHR file started for file-control
Will eventually replace file-control.php. Carries out same file checks
etc, plus defines error info, form looparound system gone in place of
2nd XHR call on save as/new file save. All JS moved into a doNext string
to be run on success (no errors).

The only output here is the JSON response once we have carried out our
processes.

Note: Diff loading/MDT mismatch system not done yet.
2014-11-12 17:47:43 +00:00