From fac5bf86621ff96fc02135c0b74a3b18c852979e Mon Sep 17 00:00:00 2001 From: Andrey Grinenko Date: Sat, 21 Feb 2015 02:58:44 +0300 Subject: [PATCH 01/10] session fixation fix - previous version did not let me in, because it regenerated session before even trying to start old one and check whether it is valid or not. I've also added session regeneration on login, which is good practice to prevent session fixation. --- lib/settings-common.php | 4 +++- lib/settings.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/settings-common.php b/lib/settings-common.php index d38422c..5f59217 100644 --- a/lib/settings-common.php +++ b/lib/settings-common.php @@ -32,8 +32,10 @@ if(!isset($_SESSION)) { if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { ini_set('session.cookie_secure','1'); // Only allows access to session ID when protocol is HTTPS, switched on under 'if https' condition } + @session_start(); // Finally, start the session! + if (!isset($_SESSION['csrf'])){ session_regenerate_id(true); // Create a new ID to help prevent fixation - @session_start(); // Finally, start the session! + } } // Set the language file, if now possible diff --git a/lib/settings.php b/lib/settings.php index 495457a..9c206a2 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -106,6 +106,7 @@ if (!isset($_SESSION['username'])) {$_SESSION['username'] = false;}; if(isset($_POST['submit']) && $setPWorLogin=="login") { // On success, set username if multiUser, loggedIn to true and redirect if (generateHash(strClean($_POST['password']),$ICEcoder["password"])==$ICEcoder["password"]) { + session_regenerate_id(); if ($ICEcoder["multiUser"]) { $_SESSION['username'] = $_POST['username']; } From 4d7ac54e6b9ed4ccbc1cec8f2c2d58b236381fc0 Mon Sep 17 00:00:00 2001 From: Andrey Grinenko Date: Sun, 22 Feb 2015 00:44:37 +0300 Subject: [PATCH 02/10] detect whether an item in folder list is file or folder depending on its item class, rather then the fact, that it has a dot in its name (I have lots of folders named like example.com which were treated as files) --- lib/ice-coder.js | 18 +++++++++++++- lib/ice-coder.min.js | 56 ++++++++++++++++++++++---------------------- 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index e392bc1..17b81e7 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1396,6 +1396,22 @@ var ICEcoder = { get('fileOptions').style.opacity = 1; } }, + /** + * returns true if path is a folder + * @param path string encoded path with / replaced with | + * @return boolean true if path is a folder, false if path is file + */ + isPathFolder: function(path){ + // let's enumerate all folders to find whether clicked file is a folder or not + var dir = top.filesFrame.contentDocument.getElementsByClassName("pft-directory"); + var thisFileId = top.ICEcoder.selectedFiles[0]; + for (var i = 0 ; i < dir.length; i++){ + if (thisFileId === dir[i].childNodes[0].childNodes[1].getAttribute('id')){ + return true; + } + } + return false; + }, // Show menu on right clicking in file manager showMenu: function(evt) { @@ -1409,7 +1425,7 @@ var ICEcoder = { menuHeight = 124+5; // general options height in px plus 5px space winH = window.innerHeight; if ("undefined" != typeof top.ICEcoder.thisFileFolderLink && top.ICEcoder.thisFileFolderLink!="") { - menuType = top.ICEcoder.selectedFiles[0].indexOf(".")>-1 ? "file" : "folder"; + menuType = this.isPathFolder(top.ICEcoder.selectedFiles[0]) ? "folder" : "file"; top.get('folderMenuItems').style.display = menuType == "folder" && top.ICEcoder.selectedFiles.length == 1 ? "block" : "none"; if (menuType == "folder" && top.ICEcoder.selectedFiles.length == 1) { menuHeight += 20+20+1+23+1+2; // new file, new folder, hr, upload files(s), hr, padding diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 942bffe..c514b07 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -60,34 +60,34 @@ c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.sl 0;b"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){var b; top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a, b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;ac&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,p,n,m,t;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot, -"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//","/");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));l=h.parentNode.parentNode.nextSibling;p=document.createTextNode("\n");n=777==d?"background: #800; color: #eee":"color: #888";n='
        '+c+' '+d+"";if(3>l.childNodes.length)m=document.createElement("ul"),l=h.parentNode.parentNode,l.parentNode.insertBefore(m,l.nextSibling),m=document.createElement("li"),m.className=k,m.draggable=!1,m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")? -top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())},m.ondragend=function(){top.ICEcoder.dropFile(this)},m.innerHTML=n,l.nextSibling.appendChild(m),l.nextSibling.appendChild(p);else for(h=0;hc||"folder"==g&&"file"==m||h==l.childNodes.length-1)){m=document.createElement("li");m.className= -k;m.draggable=!1;m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())};m.ondragend=function(){top.ICEcoder.dropFile(this)};m.innerHTML=n;h==l.childNodes.length-1?(l.appendChild(m),l.appendChild(p)):(l.insertBefore(m,l.childNodes[h]),l.insertBefore(p,l.childNodes[h+1]));break}"file"!=g||e||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab- -1]=b+c)}"rename"==a&&(e=f.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(e),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(e+"_perms"),targetElemPerms.id=b.replace(/\//g,"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",f.substr(0,f.lastIndexOf("/")),c));"chmod"==a&& -(e=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(e.replace(/\//g,"|")+"_perms"),h.style.background=777==d?"#800":"none",h.style.color=777==d?"#eee":"#888",h.innerHTML=d);"delete"==a&&(b||(b=""),b=b.replace(top.iceRoot,"/"),b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).parentNode.parentNode, -top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.contentWindow.location.reload(!0);top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=function(){top.ICEcoder.filesFrame.style.opacity="1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b;b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;if(224==b||91==b|| -93==b)top.ICEcoder.cmdKey=!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},dropFile:function(a){var b,c;b=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=b.substr(b.lastIndexOf("/")+1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(b);"files"==top.ICEcoder.area&&setTimeout(function(){c="folder"==ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==top.ICEcoder.draggingWithKey? -(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(c)):top.ICEcoder.moveFile(b,c.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1},findReplaceOptions:function(){top.get("rText").style.display=top.get("replace").style.display=top.get("rTarget").style.display=document.findAndReplace.connector.value==top.t.and?"inline-block":"none"},findReplace:function(a,b,c){var d,f,e,g;a=a.toLowerCase();d=top.get("replace").value;f=top.get("results");e=ICEcoder.getcMInstance(); -g=ICEcoder.getcMdiffInstance();if((e=-1ICEcoder.results.length-1&&(ICEcoder.findResult=0);f.innerHTML="Highlighted result "+(ICEcoder.findResult+1)+" of "+ICEcoder.results.length+" results";b=e.getSearchCursor(a,e.getCursor(),!0);b.findNext();b.from()||(b=e.getSearchCursor(a,{line:0,ch:0},!0),b.findNext());e.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/e.lineCount(): -e.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?0:e.heightAtLine(0);f="";for(d=1;d<=e.lineCount();d++)c=-1';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=f;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display= -"inline-block";return!0}f.innerHTML="No results";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none";return!1}""!=a&&c?(f=b=e="",document.findAndReplace.connector.value==top.t.and&&(e="&replace="+d),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&& -(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),a=a.replace(/\'/g,"'"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML=''):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display= -"none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|"));top.ICEcoder.serverMessage(""+top.t["Replacing text in"]+"
"+a)},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown|| -(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX").replace(/\<\/b\>/g,"").replace(/\<br\>/g,"
"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();if(a=-1d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&& -(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='



'; +"#fff",get("fileOptions").style.opacity=1)},isPathFolder:function(a){a=top.filesFrame.contentDocument.getElementsByClassName("pft-directory");for(var b=top.ICEcoder.selectedFiles[0],c=0;cc&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"}, +4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,p,n,m,t;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//", +"/");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));l=h.parentNode.parentNode.nextSibling;p=document.createTextNode("\n");n=777==d?"background: #800; color: #eee":"color: #888";n='        '+c+' '+d+"";if(3>l.childNodes.length)m=document.createElement("ul"),l=h.parentNode.parentNode,l.parentNode.insertBefore(m, +l.nextSibling),m=document.createElement("li"),m.className=k,m.draggable=!1,m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())},m.ondragend=function(){top.ICEcoder.dropFile(this)},m.innerHTML=n,l.nextSibling.appendChild(m),l.nextSibling.appendChild(p);else for(h=0;hc||"folder"==g&&"file"==m||h==l.childNodes.length-1)){m=document.createElement("li");m.className=k;m.draggable=!1;m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())};m.ondragend=function(){top.ICEcoder.dropFile(this)};m.innerHTML=n;h==l.childNodes.length- +1?(l.appendChild(m),l.appendChild(p)):(l.insertBefore(m,l.childNodes[h]),l.insertBefore(p,l.childNodes[h+1]));break}"file"!=g||e||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(e=f.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(e),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(e+"_perms"),targetElemPerms.id=b.replace(/\//g, +"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",f.substr(0,f.lastIndexOf("/")),c));"chmod"==a&&(e=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(e.replace(/\//g,"|")+"_perms"),h.style.background=777==d?"#800":"none",h.style.color=777==d?"#eee":"#888",h.innerHTML=d);"delete"==a&&(b||(b=""),b=b.replace(top.iceRoot,"/"), +b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).parentNode.parentNode,top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.contentWindow.location.reload(!0);top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=function(){top.ICEcoder.filesFrame.style.opacity= +"1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b;b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;if(224==b||91==b||93==b)top.ICEcoder.cmdKey=!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},dropFile:function(a){var b,c;b=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=b.substr(b.lastIndexOf("/")+1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(b);"files"==top.ICEcoder.area&&setTimeout(function(){c="folder"== +ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==top.ICEcoder.draggingWithKey?(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(c)):top.ICEcoder.moveFile(b,c.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1},findReplaceOptions:function(){top.get("rText").style.display=top.get("replace").style.display=top.get("rTarget").style.display=document.findAndReplace.connector.value== +top.t.and?"inline-block":"none"},findReplace:function(a,b,c){var d,f,e,g;a=a.toLowerCase();d=top.get("replace").value;f=top.get("results");e=ICEcoder.getcMInstance();g=ICEcoder.getcMdiffInstance();if((e=-1ICEcoder.results.length-1&&(ICEcoder.findResult=0);f.innerHTML="Highlighted result "+(ICEcoder.findResult+1)+" of "+ICEcoder.results.length+" results";b=e.getSearchCursor(a,e.getCursor(),!0);b.findNext();b.from()||(b=e.getSearchCursor(a, +{line:0,ch:0},!0),b.findNext());e.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/e.lineCount():e.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?0:e.heightAtLine(0);f="";for(d=1;d<=e.lineCount();d++)c=-1';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=f;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="inline-block";return!0}f.innerHTML="No results";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none";return!1}""!=a&&c?(f=b=e="",document.findAndReplace.connector.value== +top.t.and&&(e="&replace="+d),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),a=a.replace(/\'/g,"'"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML=''):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|"));top.ICEcoder.serverMessage(""+ +top.t["Replacing text in"]+"
"+a)},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX").replace(/\<\/b\>/g,"").replace(/\<br\>/g,"
"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1: +0},cssColorPreview:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();if(a=-1d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"), +b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='



'; farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,f,e,g,k,h,l,p,n;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;f=a.pageY-this.offsetTop;e=b.getImageData(d,f,1,1).data;g=e[0];k=e[1];h=e[2];l=g+","+k+","+h;p=top.ICEcoder.rgbToHex(g, k,h);top.get("rgbMouseXY").value=l;top.get("hexMouseXY").value="#"+p;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+p;n=128>g||128>k||128>h&&200>g&&200>k&&50 Date: Sun, 22 Feb 2015 19:23:16 +0300 Subject: [PATCH 03/10] ask for confirmation before moving files by drag-drop - it is too easy to move files by an accident --- lib/ice-coder.js | 6 ++++-- lib/ice-coder.min.js | 18 +++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 17b81e7..c5e6c96 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1289,8 +1289,10 @@ var ICEcoder = { top.get('tab'+(i+1)).innerHTML = closeTabLink + " " + fileName.slice(fileName.lastIndexOf("/")).replace(/\//,""); top.get('tab'+(i+1)).title = newName; } - top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+oldName.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,newName.replace(/\//g,"|")); - top.ICEcoder.serverMessage(''+top.t['Moving to']+'
'+newName); + if (confirm("Are you sure you want to move file " + oldName + " to " + newName + " ?")){ + top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+oldName.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,newName.replace(/\//g,"|")); + top.ICEcoder.serverMessage(''+top.t['Moving to']+'
'+newName); + } top.ICEcoder.setPreviousFiles(); } diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index c514b07..5418def 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -55,15 +55,15 @@ top.t.Getting+"
"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b= b);top.ICEcoder.serverMessage(""+top.t.Saving+"
"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){var c,d;a?c=a.replace(/\|/g,"/"):(c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"));b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));b&&(d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,"/")),-1',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title= b),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf,b),top.ICEcoder.serverMessage(""+top.t["Renaming to"]+"
"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1', -c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage(""+top.t["Moving to"]+"
"+b),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a=a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g, -"\n");0"+top.t["Deleting File"]+"
"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){var b; -top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a, -b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;ac&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"}, -4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,p,n,m,t;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//", +c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),confirm("Are you sure you want to move file "+a+" to "+b+" ?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage(""+top.t["Moving to"]+"
"+b)),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a= +a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0"+top.t["Deleting File"]+"
"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])}, +duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(), +event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;ac&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity= +"1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,p,n,m,t;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//", "/");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));l=h.parentNode.parentNode.nextSibling;p=document.createTextNode("\n");n=777==d?"background: #800; color: #eee":"color: #888";n='        '+c+' '+d+"";if(3>l.childNodes.length)m=document.createElement("ul"),l=h.parentNode.parentNode,l.parentNode.insertBefore(m, l.nextSibling),m=document.createElement("li"),m.className=k,m.draggable=!1,m.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())},m.ondragend=function(){top.ICEcoder.dropFile(this)},m.innerHTML=n,l.nextSibling.appendChild(m),l.nextSibling.appendChild(p);else for(h=0;h Date: Mon, 23 Feb 2015 01:26:45 +0300 Subject: [PATCH 04/10] use font from settings in both fileManager and Tabs - otherwise on high-density screens it is getting hard to work --- files.php | 3 +++ index.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/files.php b/files.php index 488eb04..ee93033 100644 --- a/files.php +++ b/files.php @@ -16,6 +16,9 @@ $isGitHubRepoDir = in_array($ICEcoder["root"],$ICEcoder['githubLocalPaths']); + diff --git a/index.php b/index.php index 1eeb6b9..7206d19 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,9 @@ $isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false; ICEcoder v <?php echo $ICEcoder["versionNo"];?> + From a488c19d61137250c54c1ed52d71f505e674ac43 Mon Sep 17 00:00:00 2001 From: Andrey Grinenko Date: Mon, 23 Feb 2015 01:29:28 +0300 Subject: [PATCH 05/10] Prompt when F5 (Ctrl-R) is pressed. It is common thing to refresh page after you have made some tweaks, and it is common thing to refresh wrong page and even although everything is saved and tabs will reopen - you will loose opened folders in fileManager and cursor positions in open files. So it's better to prompt anyway. --- index.php | 1 + lang/chinese-simplified.php | 1 + lang/chinese-traditional.php | 1 + lang/dutch.php | 1 + lang/english.php | 17 +++++++++++++++-- lang/french.php | 1 + lang/german.php | 1 + lang/italian.php | 1 + lang/norwegian.php | 1 + lang/persian.php | 1 + lang/portuguese_brazilian.php | 1 + lang/spanish.php | 1 + 12 files changed, 26 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 7206d19..f7fc4f6 100644 --- a/index.php +++ b/index.php @@ -57,6 +57,7 @@ window.onbeforeunload = function() { return "."; } } + return ""; } t = { diff --git a/lang/chinese-simplified.php b/lang/chinese-simplified.php index 2797a5a..22b46e6 100644 --- a/lang/chinese-simplified.php +++ b/lang/chinese-simplified.php @@ -49,6 +49,7 @@ $text = array( "Your version is" => "你的版本是", "Update now" => "现在更新", "You have some..." => "你有一些未保存的更改", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "载入中", "Color picker" => "颜色选择器", "New File" => "新建文件", diff --git a/lang/chinese-traditional.php b/lang/chinese-traditional.php index 231ea46..da39aa7 100644 --- a/lang/chinese-traditional.php +++ b/lang/chinese-traditional.php @@ -49,6 +49,7 @@ $text = array( "Your version is" => "你的版本是", "Update now" => "現在更新", "You have some..." => "你有一些未保存的更改", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "裝載中", "Color picker" => "顔色選擇器", "New File" => "新建文件", diff --git a/lang/dutch.php b/lang/dutch.php index 0b140bb..dfa441e 100644 --- a/lang/dutch.php +++ b/lang/dutch.php @@ -51,6 +51,7 @@ in lib/config__settings.php", "Your version is" => "Uw versie is", "Update now" => "Nu updaten", "You have some..." => "Er zijn wijzigingen die niet opgeslagen zijn", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "bezig", "Color picker" => "Kleuren kiezer", "New File" => "Nieuw bestand", diff --git a/lang/english.php b/lang/english.php index 0dd058c..5c30e52 100644 --- a/lang/english.php +++ b/lang/english.php @@ -48,6 +48,7 @@ $text = array( "Your version is" => "Your version is", "Update now" => "Update now", "You have some..." => "You have some unsaved changes", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "working", "Color picker" => "Color picker", "New File" => "New File", @@ -431,7 +432,19 @@ $text = array( "updater" => array( "Update appears to..." => "Update appears to be successful" - ) - + ), + + "find-in-files" => + array( + "Enter path to search in" => "Enter path to search in", + "Enter semicolon-separated masks of files to look at (e.g. *.php;*.html;*.js)" => "Enter semicolon-separated masks of files to look at (e.g. *.php;*.html;*.js)", + "Type of text" => "Type of text", + "Fixed text" => "Fixed text", + "Regular expression" => "Regular expression", + "Case sensitive" => "Case sensitive", + "Yes" => "Yes", + "No" => "No", + "Search" => "Search", + ), ); ?> \ No newline at end of file diff --git a/lang/french.php b/lang/french.php index 44b75b1..63a576c 100644 --- a/lang/french.php +++ b/lang/french.php @@ -48,6 +48,7 @@ dans lib/config__settings.php", "Your version is" => "Votre version est la", "Update now" => "Mettre à jour maintenant", "You have some..." => "Vous avez quelques changements non sauvegardés", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "en progression", "Color picker" => "Sélecteur de couleur", "New File" => "Nouveau fichier", diff --git a/lang/german.php b/lang/german.php index 7e67223..940b450 100644 --- a/lang/german.php +++ b/lang/german.php @@ -49,6 +49,7 @@ $text = array( "Your version is" => "Deine Version ist", "Update now" => "Jetzt aktualisieren", "You have some..." => "Du hast einige nicht gespeicherete Dateien", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "arbeite", "Color picker" => "Farbauswahl", "New File" => "Neue Datei", diff --git a/lang/italian.php b/lang/italian.php index 05215d1..8dd7681 100644 --- a/lang/italian.php +++ b/lang/italian.php @@ -48,6 +48,7 @@ $text = array( "Your version is" => "La tua versione Egrave;", "Update now" => "Aggiorna ora", "You have some..." => "Ci sono modifiche non salvate", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "working", "Color picker" => "Selettore di colore", "New File" => "Nuovo file", diff --git a/lang/norwegian.php b/lang/norwegian.php index 66069c5..8da2293 100644 --- a/lang/norwegian.php +++ b/lang/norwegian.php @@ -49,6 +49,7 @@ $text = array( "Your version is" => "Din versjon er", "Update now" => "Oppdater n", "You have some..." => "Du har noe ulagrede endringer", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "arbeider", "Color picker" => "Fargevelger", "New File" => "Ny Fil", diff --git a/lang/persian.php b/lang/persian.php index 6712d73..e369f08 100644 --- a/lang/persian.php +++ b/lang/persian.php @@ -49,6 +49,7 @@ $text = array( "Your version is" => "نسخه مورد استفاده شما", "Update now" => "به روز کنید", "You have some..." => "شما چند تغییر ذخیره نشده دارید", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "در حال کار", "Color picker" => "اشاره گر رنگ", "New File" => "فایل جدید", diff --git a/lang/portuguese_brazilian.php b/lang/portuguese_brazilian.php index 69a5697..5b5889f 100644 --- a/lang/portuguese_brazilian.php +++ b/lang/portuguese_brazilian.php @@ -48,6 +48,7 @@ $text = array( "Your version is" => "Sua verso ", "Update now" => "Atualizar j", "You have some..." => "Voce possui alteraes no salvas", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "trabalhando", "Color picker" => "Color picker", "New File" => "Novo Arquivo", diff --git a/lang/spanish.php b/lang/spanish.php index 4c8ac80..467dc6e 100644 --- a/lang/spanish.php +++ b/lang/spanish.php @@ -47,6 +47,7 @@ $text = array( "Your version is" => "Su versión es", "Update now" => "Actualizar ahora", "You have some..." => "Usted tiene cambios sin guardar", + "Are you sure you want to close?" => "Are you sure you want to close?", "working" => "trabajando", "Color picker" => "Selector de color", "New File" => "Nuevo archivo", From ba634bbeeddeaeda54774a0957ad868ae2341503 Mon Sep 17 00:00:00 2001 From: Andrey Grinenko Date: Mon, 23 Feb 2015 01:51:20 +0300 Subject: [PATCH 06/10] fix to isPathFolder function --- lib/ice-coder.js | 14 ++++++++++++-- lib/ice-coder.min.js | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index c5e6c96..1135783 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1407,9 +1407,19 @@ var ICEcoder = { // let's enumerate all folders to find whether clicked file is a folder or not var dir = top.filesFrame.contentDocument.getElementsByClassName("pft-directory"); var thisFileId = top.ICEcoder.selectedFiles[0]; + var liNode, aNode, spanNode; for (var i = 0 ; i < dir.length; i++){ - if (thisFileId === dir[i].childNodes[0].childNodes[1].getAttribute('id')){ - return true; + liNode = dir[i]; + if ("underfined" != typeof liNode){ + aNode = liNode.childNodes[0]; + if ("undefined" != typeof aNode){ + spanNode = aNode.childNodes[1]; + if ("undefined" != typeof spanNode){ + if (thisFileId === spanNode.getAttribute('id')){ + return true; + } + } + } } } return false; diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 5418def..bc95b89 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -60,9 +60,9 @@ a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\ pasteFiles:function(a){if(top.ICEcoder.copiedFiles)for(var b=0;b"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])}, duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(), event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;ac&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity= +top.get(b)),top.get(b+"Nav").style.color="#fff",get("fileOptions").style.opacity=1)},isPathFolder:function(a){a=top.filesFrame.contentDocument.getElementsByClassName("pft-directory");for(var b=top.ICEcoder.selectedFiles[0],c,d=0;dc&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity= "1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,p,n,m,t;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//", "/");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));l=h.parentNode.parentNode.nextSibling;p=document.createTextNode("\n");n=777==d?"background: #800; color: #eee":"color: #888";n='        '+c+' '+d+"";if(3>l.childNodes.length)m=document.createElement("ul"),l=h.parentNode.parentNode,l.parentNode.insertBefore(m, From f278394346e253493e8de17508fbde9241a8f0bb Mon Sep 17 00:00:00 2001 From: Andrey Grinenko Date: Tue, 24 Feb 2015 18:12:02 +0300 Subject: [PATCH 07/10] When Esc is used within Find window - return to text editor --- index.php | 2 +- lib/ice-coder.js | 6 ++- lib/ice-coder.min.js | 114 +++++++++++++++++++++---------------------- 3 files changed, 63 insertions(+), 59 deletions(-) diff --git a/index.php b/index.php index f7fc4f6..62413a5 100644 --- a/index.php +++ b/index.php @@ -266,7 +266,7 @@ $t = $text['index'];
- +

'; -farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,f,e,g,k,h,l,p,n;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;f=a.pageY-this.offsetTop;e=b.getImageData(d,f,1,1).data;g=e[0];k=e[1];h=e[2];l=g+","+k+","+h;p=top.ICEcoder.rgbToHex(g, +farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,e,f,g,k,h,l,p,n;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;e=a.pageY-this.offsetTop;f=b.getImageData(d,e,1,1).data;g=f[0];k=f[1];h=f[2];l=g+","+k+","+h;p=top.ICEcoder.rgbToHex(g, k,h);top.get("rgbMouseXY").value=l;top.get("hexMouseXY").value="#"+p;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+p;n=128>g||128>k||128>h&&200>g&&200>k&&50'+top.t["Cancelled tasks"]+"");setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g, "").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a+"&csrf="+top.ICEcoder.csrf)},autoOpenFiles:function(){if(0';top.ICEcoder.showHide("show", top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet? (top.get("mediaContainer").innerHTML='',top.ICEcoder.showHide("show",top.get("blackMask"))):top.ICEcoder.githubTokenAsk("showManager")},githubDiffToggle:function(){var a;if(!top.ICEcoder.githubAuthTokenSet)top.ICEcoder.githubTokenAsk("loadFiles");else if(top.ICEcoder.githubDiff||top.ICEcoder.ask(top.t["This will compare..."]))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff? -"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,f,e,g,k,h,l,p,n,m,t,u,v,w,x){var q,r=a.slice(0,a.lastIndexOf("?")),r=r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."));top.ICEcoder.theme!==r&&(top.ICEcoder.theme=r,"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder"),q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("href",a),top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q), +"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,e,f,g,k,h,l,p,n,m,t,u,v,w,x){var q,r=a.slice(0,a.lastIndexOf("?")),r=r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."));top.ICEcoder.theme!==r&&(top.ICEcoder.theme=r,"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder"),q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("href",a),top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q), q=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000",top.ICEcoder.switchTab(top.ICEcoder.selectedTab));b!=top.ICEcoder.codeAssist&&(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());b=ICEcoder.content.contentWindow.document.styleSheets[4];a=b.rules?"rules":"cssRules";b[a][0].style.fontSize= -g;b[a][4].style["border-left-width"]=e?"1px":"0";b[a][4].style["margin-left"]=e?"-1px":"0";b[a][2].style.cssText="background-color: "+q+" !important";top.ICEcoder.lineWrapping=k;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=p;top.ICEcoder.indentAuto=l;for(e=0;echMod "+b+" on
"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0chMod "+b+" on
"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0

Click anywhere to continue using ICEcoder...

'},xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(f){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null},openBugReport:function(){var a; +top.ICEcoder.versionNo+'!

Click anywhere to continue using ICEcoder...

'},xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}return null},openBugReport:function(){var a; "off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["You can start..."]);"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["Error cannot find..."]);"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["No new errors..."]);"bugs"==top.ICEcoder.bugReportStatus&&(a=top.ICEcoder.openFiles.indexOf(top.ICEcoder.bugReportPath.replace(/\|/g,"/")),-1/g,">").replace(/"/g,""").replace(/'/g,"'")},printCode:function(){var a, b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1ICEcoder code output
'+top.ICEcoder.xssClean(a.getValue())+"
";b.focus();b.print();a.focus()},indicateChanges:function(){var a;if(!top.ICEcoder.loadingFile){a="ICEcoder v "+top.ICEcoder.versionNo; -for(var b=1;b<=top.ICEcoder.savedPoints.length;b++)if(top.ICEcoder.savedPoints[b-1]!=top.ICEcoder.getcMInstance(b).changeGeneration()){a+=" \u2744";break}top.document.title=a}},switchTab:function(a,b){var c,d;ICEcoder.selectedTab=a;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();if(-1 '+b.slice(b.lastIndexOf("/")).replace(/\//,"");top.get("tab"+top.ICEcoder.openFiles.length).title="/"+top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//, @@ -133,22 +133,22 @@ top.get("tab"+a).title="/"+top.ICEcoder.openFiles[a-1].replace(/\//,"")},redoTab d=!0;c||ICEcoder.savedPoints[a-1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask(top.t["You have made..."]));if(d){c=top.ICEcoder.openFiles[a-1];for(d=a;db?parseInt(c*g,10)-parseInt(c*(g-1),10):150,f=0==g?53:parseInt(top.get("tab"+g).style.left,10),e=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=f+e+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(f+e);top.get("newTab").style.left=f+e+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX=top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart= +setTimeout(function(){top.ICEcoder.canSwitchTabs=!0},100)},closeAllTabs:function(){if(0b?parseInt(c*g,10)-parseInt(c*(g-1),10):150,e=0==g?53:parseInt(top.get("tab"+g).style.left,10),f=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=e+f+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(e+f);top.get("newTab").style.left=e+f+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX=top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart= (top.ICEcoder.mouseX-(parseInt(top.ICEcoder.files.style.width,10)+53+18))%150;top.get("tab"+a).style.zIndex=2;for(var b=1;b<=top.ICEcoder.openFiles.length;b++)top.get("tab"+b).className=b!==a?"tab tabSlide":"tab tabDrag"},tabDragMove:function(){var a,b;a=parseInt(top.get("tab"+top.ICEcoder.openFiles.length).style.width,10)+18;top.ICEcoder.thisLeft=a=53<=top.ICEcoder.tabDragMouseX?top.ICEcoder.tabDragMouseX<=parseInt(top.get("newTab").style.left,10)-a?top.ICEcoder.tabDragMouseX:parseInt(top.get("newTab").style.left, 10)-a:53;top.get("tab"+top.ICEcoder.draggingTab).style.left=a+"px";top.ICEcoder.dragTabNo=top.ICEcoder.draggingTab;for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.get("tab"+c).style.opacity=c==top.ICEcoder.draggingTab?1:.5,b=top.ICEcoder.tabLeftPos[c]?top.ICEcoder.tabLeftPos[c]-top.ICEcoder.tabLeftPos[c-1]:b,c!=top.ICEcoder.draggingTab&&(c=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top.ICEcoder.tabLeftPos[c-1])},tabDragEnd:function(){var a,b;top.ICEcoder.setTabWidths();for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.ICEcoder.thisLeft>=top.ICEcoder.tabLeftPos[c-1]&&(a=top.ICEcoder.thisLeft==top.ICEcoder.tabLeftPos[0]?1:top.ICEcoder.dragTabNo>c?c+1:c),top.get("tab"+c).className="tab",top.get("tab"+c).style.opacity=1,c!=top.ICEcoder.dragTabNo?top.get("tab"+c).style.zIndex=1:setTimeout(function(){top.get("tab"+ -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.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];c=[[],[],[],[]];for(var f=0;f Date: Wed, 25 Feb 2015 02:59:50 +0300 Subject: [PATCH 08/10] make goToLine if filename contains line number and file is already opened --- lib/ice-coder.js | 3 +++ lib/ice-coder.min.js | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index dd9e8df..89669fc 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1174,6 +1174,9 @@ var ICEcoder = { } if (top.ICEcoder.thisFileFolderLink != "/[NEW]" && top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)!==false) { top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1); + if (line > 1){ + top.ICEcoder.goToLine(line); + } } else if (top.ICEcoder.thisFileFolderLink!="" && top.ICEcoder.thisFileFolderType=="file") { // work out a shortened URL for the file diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 197583f..46a1812 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -48,13 +48,13 @@ b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.styl d=0"+top.t["Creating Folder"]+"
"+b)},openFile:function(a){var b,c=1;"undefined"!=typeof a&&(b=/^(.*)\s+line\s+(\d+)/.exec(a),null!==b?(c= -b[2],a=b[1]):0"+top.t["Opening File"]+"
"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView", -1)))},openFilesFromList:function(a){for(var b=0;b"+ -top.t.Getting+"
"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0"+top.t.Saving+"
"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){var c,d;a?c=a.replace(/\|/g,"/"):(c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"));b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));b&&(d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,"/")),-1',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title= -b),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf,b),top.ICEcoder.serverMessage(""+top.t["Renaming to"]+"
"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1', +b[2],a=b[1]):0"+top.t["Opening File"]+"
"+top.ICEcoder.shortURL)): +top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b"+top.t.Getting+"
"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0"+top.t.Saving+"
"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){var c,d;a?c=a.replace(/\|/g,"/"):(c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"));b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));b&&(d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g, +"/")),-1',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//, +""),top.get("tab"+(d+1)).title=b),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf,b),top.ICEcoder.serverMessage(""+top.t["Renaming to"]+"
"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1', c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),confirm("Are you sure you want to move file "+a+" to "+b+" ?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage(""+top.t["Moving to"]+"
"+b)),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a= a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0"+top.t["Deleting File"]+"
"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])}, @@ -151,4 +151,4 @@ top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.jumpToDefinition(),!1):223==c&& "content"==a?(d=ICEcoder.getcMInstance(),e=ICEcoder.getcMdiffInstance(),d=-1 Date: Sun, 1 Mar 2015 18:29:30 +0300 Subject: [PATCH 09/10] allow opening files with name (... on line \d+) - open + goto line --- lib/ice-coder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 89669fc..42d5104 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1153,11 +1153,11 @@ var ICEcoder = { var shortURL, canOpenFile; var line = 1; if ("undefined" != typeof fileLink) { - var re = /^(.*)\s+line\s+(\d+)/; + var re = /^([^ ]*)\s+(on\s+)?line\s+(\d+)/; var reMatch = re.exec(fileLink); if (null !== reMatch) { - line = reMatch[2]; + line = reMatch[3]; fileLink = reMatch[1]; } else if (fileLink.indexOf(':') > 0){ line = fileLink.split(':')[1]; From b3acb6120124fae5532a4cfefb895e0025439669 Mon Sep 17 00:00:00 2001 From: Andrey Grinenko Date: Sun, 1 Mar 2015 18:34:39 +0300 Subject: [PATCH 10/10] ice-coder.min.js updated to get changes of previous commit 7d66f32e5bca53537a3cbcfcc551f7198ee90eda --- lib/ice-coder.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 46a1812..e465220 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -47,8 +47,8 @@ top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selec b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile)},boxSelect:function(a,b){var c,d;c=top.filesFrame.contentWindow.document.getElementById("fmDragBox");"down"==b&&(top.ICEcoder.fmDragBoxStartX=top.ICEcoder.mouseX,top.ICEcoder.fmDragBoxStartY=top.ICEcoder.mouseY,top.ICEcoder.fmDragSelectFirst="",top.ICEcoder.fmDragSelectLast="");top.ICEcoder.mouseDown&&"drag"==b&&(top.ICEcoder.fmDraggedBox=!0, d=0"+top.t["Creating Folder"]+"
"+b)},openFile:function(a){var b,c=1;"undefined"!=typeof a&&(b=/^(.*)\s+line\s+(\d+)/.exec(a),null!==b?(c= -b[2],a=b[1]):0"+top.t["Creating Folder"]+"
"+b)},openFile:function(a){var b,c=1;"undefined"!=typeof a&&(b=/^([^ ]*)\s+(on\s+)?line\s+(\d+)/.exec(a),null!== +b?(c=b[3],a=b[1]):0"+top.t["Opening File"]+"
"+top.ICEcoder.shortURL)): top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b"+top.t.Getting+"
"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0