diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 687617d..4ee2f21 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -945,6 +945,7 @@ var ICEcoder = { if (action=="delete") { // Simply get our target and make it dissapear targetElem = document.getElementById('filesFrame').contentWindow.document.getElementById(location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file).parentNode.parentNode; + top.ICEcoder.openCloseDir(targetElem.childNodes[0],false); targetElem.parentNode.removeChild(targetElem); } }, @@ -969,7 +970,7 @@ var ICEcoder = { } if (action=="delete" && ICEcoder.selectedFiles.length>0) { - top.ICEcoder.deleteFile(); + top.ICEcoder.deleteFiles(); } if (action=="view" && ICEcoder.openFiles.length>0) { @@ -2189,7 +2190,7 @@ var ICEcoder = { // DEL (Delete file) if (key==46 && area == "files") { - top.ICEcoder.deleteFile(); + top.ICEcoder.deleteFiles(); return false; }; diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index b0cf5a3..95efd98 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -40,7 +40,7 @@ n=document.createTextNode("\n");p='";if(3>k.childNodes.length)m=document.createElement("ul"),k=h.parentNode.parentNode,k.parentNode.insertBefore(m,k.nextSibling),m=document.createElement("li"),m.className=l,m.innerHTML=p,k.nextSibling.appendChild(m),k.nextSibling.appendChild(n);else for(h=0;h<=k.childNodes.length-1;h++)if(k.childNodes[h].className&&(m=0c||"folder"==g&&"file"==m||h==k.childNodes.length- 1)){m=document.createElement("li");m.className=l;m.innerHTML=p;h==k.childNodes.length-1?(k.appendChild(m),k.appendChild(n)):(k.insertBefore(m,k.childNodes[h]),k.insertBefore(n,k.childNodes[h+1]));break}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(e=e.replace(/\//g,"|"),h=document.getElementById("filesFrame").contentWindow.document.getElementById(e),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=document.getElementById("filesFrame").contentWindow.document.getElementById(e+ "_perms"),targetElemPerms.id=b.replace(/\//g,"|")+"|"+c+"_perms");"chmod"==a&&(e=top.ICEcoder.rightClickedFile.replace(/\|/g,"/"),h=document.getElementById("filesFrame").contentWindow.document.getElementById(e.replace(/\//g,"|")+"_perms"),h.innerHTML=d);"delete"==a&&(h=document.getElementById("filesFrame").contentWindow.document.getElementById(b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c).parentNode.parentNode,h.parentNode.removeChild(h))},fMIcon:function(a){"save"==a&&0=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.changedContent,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];c=[[],[],[],[]];for(var e=0;e