mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Copying of multiple items
Celecting copy will now store an array of the selected items and when pasting, add each to the server queue for pasting.
This commit is contained in:
@@ -669,16 +669,21 @@ var ICEcoder = {
|
||||
|
||||
// Copy a file
|
||||
copyFile: function(selFile) {
|
||||
top.ICEcoder.copiedFile = selFile;
|
||||
top.ICEcoder.copiedFiles = [];
|
||||
for (var i=0; i<top.ICEcoder.selectedFiles.length; i++) {
|
||||
top.ICEcoder.copiedFiles[i] = top.ICEcoder.selectedFiles[i];
|
||||
}
|
||||
top.document.getElementById('fmMenuPasteOption').style.display = "block";
|
||||
top.ICEcoder.hideFileMenu();
|
||||
},
|
||||
|
||||
// Paste a file
|
||||
pasteFile: function(location) {
|
||||
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"));
|
||||
if (top.ICEcoder.copiedFiles) {
|
||||
for (var i=0; i<top.ICEcoder.copiedFiles.length; i++) {
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=paste&file="+top.ICEcoder.copiedFiles[i]+"&location="+location);
|
||||
top.ICEcoder.serverMessage('<b>Pasting File</b><br>'+top.ICEcoder.copiedFiles[i].toString().replace(/\|/g,"/").replace(/,/g,"\n"));
|
||||
}
|
||||
} else {
|
||||
top.ICEcoder.message("Nothing to paste, copy a file/folder first!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user