CTRL+o can now get remote URL

You can enter an absolute URL path (ie, anything that has :// in it) and
it will trigger a different function to get the remote URL by sending
that action to the server queue
This commit is contained in:
Matt Pass
2013-05-12 17:13:44 +01:00
parent fc79be3010
commit b8f921dab2

View File

@@ -609,11 +609,19 @@ var ICEcoder = {
openPrompt: function() {
var fileLink;
if(fileLink = top.ICEcoder.getInput('Enter relative file path prefixed with /','')) {
top.ICEcoder.openFile(fileLink);
if(fileLink = top.ICEcoder.getInput('Enter relative file path (prefixed with /) or remote URL','')) {
fileLink.indexOf("://")>-1
? top.ICEcoder.getRemoteFile(fileLink)
: top.ICEcoder.openFile(fileLink);
}
},
// Get remote file contents
getRemoteFile: function(remoteFile) {
top.ICEcoder.serverQueue("add","lib/file-control.php?action=getRemoteFile&file="+remoteFile);
top.ICEcoder.serverMessage('<b>Getting</b><br>'+remoteFile);
},
// Save a file
saveFile: function(saveAs) {
var saveType;