copyFile, pasteFile & hideFileMenu functions

copyFile simply sets a var same as the provided selFile var then hides
menu
pasteFile adds a paste file item to the server queue and shows message
hideFileMenu added as the opposite of showFileMenu function
This commit is contained in:
Matt Pass
2012-11-12 09:25:32 +00:00
parent 702c3d069f
commit 99dedb61cb

View File

@@ -591,6 +591,18 @@ var ICEcoder = {
};
},
// Copy a file on demand
copyFile: function(selFile) {
top.ICEcoder.copiedFile = selFile;
top.ICEcoder.hideFileMenu();
},
// 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"));
},
// Show menu on right clicking in file manager
showMenu: function() {
var menuType, folderMenuItems;
@@ -617,6 +629,11 @@ var ICEcoder = {
document.getElementById('fileMenu').style.display='inline-block';
},
// Continue to show the file manager
hideFileMenu: function() {
document.getElementById('fileMenu').style.display='none';
},
// Update the file manager tree list on demand
updateFileManagerList: function(action,location,file,perms,oldName) {
var actionElemType, cssStyle, perms, targetElem, locNest, newText, innerLI, newUL, newLI, elemType, nameLI, shortURL, newMouseOver;