diff --git a/lib/coder.js b/lib/coder.js index 0e97a69..7253ea3 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -811,7 +811,7 @@ var ICEcoder = { top.document.getElementById('tab'+(i+1)).innerHTML = top.ICEcoder.openFiles[i] + " " + closeTabLink; } } - top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+newName+"&oldFileName="+oldName); + top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+newName+"&oldFileName="+oldName.replace(/\|/g,"/")); top.ICEcoder.serverMessage('Renaming to
'+newName); top.ICEcoder.setPreviousFiles(); @@ -1172,7 +1172,7 @@ var ICEcoder = { // Finally we can add the first list item for this file/folder we're adding newLI = document.createElement("li"); newLI.className = cssStyle; - newLI.innerHTML = '        '+file+' '+perms+''; + newLI.innerHTML = '        '+file+' '+perms+''; locNest.nextSibling.appendChild(newLI); locNest.nextSibling.appendChild(newText); @@ -1191,7 +1191,7 @@ var ICEcoder = { if ((elemType==actionElemType && nameLI > file) || (actionElemType=="folder" && elemType=="file") || i==locNest.childNodes.length-1) { newLI = document.createElement("li"); newLI.className = cssStyle; - newLI.innerHTML = '        '+file+' '+perms+''; + newLI.innerHTML = '        '+file+' '+perms+''; // Append or insert depending on which of the above if statements is true i==locNest.childNodes.length-1 ? locNest.appendChild(newLI) : locNest.insertBefore(newLI,locNest.childNodes[i]); i==locNest.childNodes.length-1 ? locNest.appendChild(newText) : locNest.insertBefore(newLI,locNest.childNodes[i+1]); @@ -1204,7 +1204,7 @@ var ICEcoder = { } // If we added a new file, we've saved it under a new filename, so set that if (actionElemType=="file") { - top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]="/"+file; + top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=location+"/"+file; } } @@ -1217,8 +1217,10 @@ var ICEcoder = { targetElem.innerHTML = file; // Finally, update the ID of the target & set a new mouseover function for the parent too targetElem.id = location.replace(/\//g,"|") + "|" + file; - newMouseOver = targetElem.parentNode.onmouseover.toString().replace(shortURL.substring(shortURL.lastIndexOf("/")+1,shortURL.length),file).split('\''); + newMouseOver = targetElem.parentNode.onmouseover.toString().replace(shortURL.substring(shortURL.lastIndexOf("|")+1,shortURL.length),file).split('\''); eval("targetElem.parentNode.onmouseover = function() { top.ICEcoder.overFileFolder('"+newMouseOver[1]+"','"+newMouseOver[3]+"');}"); + targetElemPerms = document.getElementById('filesFrame').contentWindow.document.getElementById(shortURL.replace(/\//g,"|")+"_perms"); + targetElemPerms.id = location.replace(/\//g,"|") + "|" + file + "_perms"; } // Chmod on files