Inform user if there is no file/folder to copy

This commit is contained in:
Matt Pass
2013-02-09 17:18:23 +00:00
parent 000607f8e0
commit 8c85b3098d

View File

@@ -596,8 +596,12 @@ var ICEcoder = {
// Paste a file on demand
pasteFile: function(location) {
top.ICEcoder.serverQueue("add","lib/file-control.php?action=paste&file="+top.ICEcoder.copiedFile+"&location="+location);
top.ICEcoder.serverMessage('<b>Pasting File</b><br>'+top.ICEcoder.copiedFile.toString().replace(/\|/g,"/").replace(/,/g,"\n"));
if (top.ICEcoder.copiedFile) {
top.ICEcoder.serverQueue("add","lib/file-control.php?action=paste&file="+top.ICEcoder.copiedFile+"&location="+location);
top.ICEcoder.serverMessage('<b>Pasting File</b><br>'+top.ICEcoder.copiedFile.toString().replace(/\|/g,"/").replace(/,/g,"\n"));
} else {
top.ICEcoder.message("Nothing to paste, copy a file/folder first!");
}
},
// Upload file(s) - select & submit