diff --git a/lib/coder.js b/lib/coder.js index 66862c6..0e97a69 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -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]); @@ -1202,6 +1202,10 @@ 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; + } } // Renaming files