Merge pull request #7 from mattpass/master

update 06-09-2014
This commit is contained in:
kris
2014-09-06 02:43:26 +02:00
15 changed files with 109 additions and 100 deletions

View File

@@ -176,9 +176,9 @@ $t = $text['index'];
</ul>
</div>
<div id="githubNav" class="githubNav">
<div class="commit" id="githubNavCommit" onclick="top.ICEcoder.gitHubAction('commit')">Commit</div>
<div class="commit" id="githubNavCommit" onclick="top.ICEcoder.githubAction('commit')">Commit</div>
<div class="selected" id="githubNavSelectedCount">Selected: 0</div>
<div class="pull" id="githubNavPull" onclick="top.ICEcoder.gitHubAction('pull')">Pull</div>
<div class="pull" id="githubNavPull" onclick="top.ICEcoder.githubAction('pull')">Pull</div>
</div>
<div class="options" id="fileOptions">
<div id="optionsFile" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">

View File

@@ -89,15 +89,15 @@ $text = array(
"website" => "网站",
"Close all tabs" => "关闭所有选项卡",
"Alphabetize tabs" => "按字母顺序排列的选项卡",
"Find" => "搜索",
"in" => "in",
"and" => "and",
"replace" => "替换",
"replace all" => "替换所有",
"this document" => "当前文件",
"open documents" => "打开的文件",
"all files" => "所有文件",
"all filenames" => "所有文件名",
// "Find" => "搜索",
// "in" => "in",
// "and" => "and",
// "replace" => "替换",
// "replace all" => "替换所有",
// "this document" => "当前文件",
// "open documents" => "打开的文件",
// "all files" => "所有文件",
// "all filenames" => "所有文件名",
"Turn on/off..." => "开启/关闭代码辅助",
"Code Assist" => "代码辅助",
"Go to Line" => "转到行",

View File

@@ -1,4 +1,4 @@
<?php
<?php
// Traditional Chinese language translation
// by: @lzh370 (GitHub)
// lzh370@qq.com
@@ -89,15 +89,15 @@ $text = array(
"website" => "網站",
"Close all tabs" => "關閉所有選項卡",
"Alphabetize tabs" => "按字母順序排序選項卡",
"Find" => "檢索",
"in" => "in",
"and" => "and",
"replace" => "替換",
"replace all" => "替換所有",
"this document" => "當前文件",
"open documents" => "打開的文件",
"all files" => "所有文件",
"all filenames" => "所有文件名",
// "Find" => "檢索",
// "in" => "in",
// "and" => "and",
// "replace" => "替換",
// "replace all" => "替換所有",
// "this document" => "當前文件",
// "open documents" => "打開的文件",
// "all files" => "所有文件",
// "all filenames" => "所有文件名",
"Turn on/off..." => "開啓/關閉代碼輔助",
"Code Assist" => "代碼輔助",
"Go to Line" => "轉到行",

View File

@@ -91,15 +91,15 @@ in lib/config__settings.php",
"website" => "website",
"Close all tabs" => "Sluit alle tabbladen",
"Alphabetize tabs" => "Sorteer tabbladen",
"Find" => "Zoek",
"in" => "in",
"and" => "en",
"replace" => "vervangen",
"replace all" => "alles vervangen",
"this document" => "dit document",
"open documents" => "open documenten",
"all files" => "alle bestanden",
"all filenames" => "alle bestandsnamen",
// "Find" => "Zoek",
// "in" => "in",
// "and" => "en",
// "replace" => "vervangen",
// "replace all" => "alles vervangen",
// "this document" => "dit document",
// "open documents" => "open documenten",
// "all files" => "alle bestanden",
// "all filenames" => "alle bestandsnamen",
"Turn on/off..." => "Schakel codehulp aan/uit",
"Code Assist" => "Codehulp",
"Go to Line" => "Ga naar regel",

View File

@@ -244,6 +244,10 @@ $text = array(
"ice-coder" =>
array(
"No text selected..." => "No text selected to search on",
"all files" => "all files",
"all filenames" => "all filenames",
"selected files" => "selected files",
"selected filenames" => "selected filenames",
"Creating Folder" => "Creating Folder",
"Sorry you can..." => "Sorry, you can only have 100 files open at a time!",
"Opening File" => "Opening File",
@@ -256,6 +260,11 @@ $text = array(
"Pasting File" => "Pasting File",
"Sorry cannot paste..." => "Sorry, cannot paste a whole root",
"Nothing to paste..." => "Nothing to paste, copy a file/folder first!",
"and" => "and",
"this document" => "this document",
"replace" => "replace",
"replace all" => "replace all",
"file" => "file",
"Replacing text in" => "Replacing text in",
"Cancelled tasks" => "Cancelled tasks",
"Open previous files" => "Open previous files?",

View File

@@ -1,4 +1,4 @@
<?php
<?php
// French language translation
// par: @krisxoofoo (GitHub)
// @kris_fr Twitter)
@@ -88,15 +88,15 @@ dans lib/config__settings.php",
"website" => "Site internet",
"Close all tabs" => "Fermer les onglets",
"Alphabetize tabs" => "Onglets par ordre alphab&eacute;tique",
"Find" => "Chercher",
"in" => "dans",
"and" => "et",
"replace" => "remplacer",
"replace all" => "remplacer tout",
"this document" => "ce document",
"open documents" => "les documents ouverts",
"all files" => "tous les fichiers",
"all filenames" => "tous les noms de fichiers",
// "Find" => "Chercher",
// "in" => "dans",
// "and" => "et",
// "replace" => "remplacer",
// "replace all" => "remplacer tout",
// "this document" => "ce document",
// "open documents" => "les documents ouverts",
// "all files" => "tous les fichiers",
// "all filenames" => "tous les noms de fichiers",
"Turn on/off..." => "Basculer on/off l&apos;assistance au code",
"Code Assist" => "Assistance au Code",
"Go to Line" => "Aller &agrave; la ligne",

View File

@@ -89,15 +89,15 @@ $text = array(
"website" => "Website",
"Close all tabs" => "Alle Tabs schlie&szlig;en",
"Alphabetize tabs" => "Tabs alphabetisch sortieren",
"Find" => "Finden",
"in" => "in",
"and" => "und",
"replace" => "ersetzen",
"replace all" => "alle ersetzen",
"this document" => "dieses Dokument",
"open documents" => "ge&ouml;ffnete Dokumente",
"all files" => "Alle Dateien",
"all filenames" => "Alle Dateinamen",
// "Find" => "Finden",
// "in" => "in",
// "and" => "und",
// "replace" => "ersetzen",
// "replace all" => "alle ersetzen",
// "this document" => "dieses Dokument",
// "open documents" => "ge&ouml;ffnete Dokumente",
// "all files" => "Alle Dateien",
// "all filenames" => "Alle Dateinamen",
"Turn on/off..." => "Codeassistenten ein- ausschalten",
"Code Assist" => "Codeassistent",
"Go to Line" => "Geh zur Zeile",

View File

@@ -1,4 +1,4 @@
<?php
<?php
// Italian language translation
// by: @luciorota (GitHub)
// @luciorota (lucio.rota@gmail.com)
@@ -89,15 +89,15 @@ $text = array(
"website" => "sito web",
"Close all tabs" => "Chiudi tutte le schede",
"Alphabetize tabs" => "Ordina schede",
"Find" => "Trova",
"in" => "in",
"and" => "e",
"replace" => "sostituisci",
"replace all" => "sostituisci tutto",
"this document" => "questo documento",
"open documents" => "apri documenti",
"all files" => "tutti i file",
"all filenames" => "titti i nomi",
// "Find" => "Trova",
// "in" => "in",
// "and" => "e",
// "replace" => "sostituisci",
// "replace all" => "sostituisci tutto",
// "this document" => "questo documento",
// "open documents" => "apri documenti",
// "all files" => "tutti i file",
// "all filenames" => "titti i nomi",
"Turn on/off..." => "Attiva/disattiva code assist",
"Code Assist" => "Code Assist",
"Go to Line" => "Vai alla riga",

View File

@@ -89,15 +89,15 @@ $text = array(
"website" => "webside",
"Close all tabs" => "Lukk alle faner",
"Alphabetize tabs" => "Ordne faner alfabetisk",
"Find" => "Finn",
"in" => "i",
"and" => "og",
"replace" => "erstatt",
"replace all" => "erstatt alt",
"this document" => "dette dokumentet",
"open documents" => "&aring;pne dokumenter",
"all files" => "alle filer",
"all filenames" => "alle filenavn",
// "Find" => "Finn",
// "in" => "i",
// "and" => "og",
// "replace" => "erstatt",
// "replace all" => "erstatt alt",
// "this document" => "dette dokumentet",
// "open documents" => "&aring;pne dokumenter",
// "all files" => "alle filer",
// "all filenames" => "alle filenavn",
"Turn on/off..." => "Svitsj p&aring;/av kode assistenten",
"Code Assist" => "Kode Assistenten",
"Go to Line" => "G&aring; til Linje",

View File

@@ -89,15 +89,15 @@ $text = array(
"website" => "وب سایت",
"Close all tabs" => "بستن همه پنجره ها",
"Alphabetize tabs" => "مرتب سازی پنجره ها بر اساس حروف الفبا",
"Find" => "یافتن",
"in" => "در",
"and" => "و",
"replace" => "جایگزین کردن",
"replace all" => "جایگزین کردن همه",
"this document" => "این سند",
"open documents" => "سند های باز",
"all files" => "همه فایل ها",
"all filenames" => "همه نام فایل ها",
// "Find" => "یافتن",
// "in" => "در",
// "and" => "و",
// "replace" => "جایگزین کردن",
// "replace all" => "جایگزین کردن همه",
// "this document" => "این سند",
// "open documents" => "سند های باز",
// "all files" => "همه فایل ها",
// "all filenames" => "همه نام فایل ها",
"Turn on/off..." => "روشن / خاموش کردن کد کمد",
"Code Assist" => "کد کمک",
"Go to Line" => "برو به خط",

View File

@@ -443,7 +443,7 @@ if (action=="save") {
if (strpos($file,"[NEW]")>0||$saveType=="saveAs") {
?>
fileLoc = '<?php echo $fileLoc;?>';
newFileName = top.ICEcoder.getInput('<?php echo $t['Enter filename to save at']; ?> '+(fileLoc!='' ? fileLoc : '/'),'');
newFileName = top.ICEcoder.getInput('<?php echo $t['Enter filename to...']; ?> '+(fileLoc!='' ? fileLoc : '/'),'');
if (newFileName) {
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName}
newFileName = fileLoc + newFileName;

View File

@@ -661,8 +661,8 @@ var ICEcoder = {
}
// Adjust the file & replace select dropdown values accordingly
document.findAndReplace.target[2].innerHTML = !top.ICEcoder.selectedFiles[0] ? "all files" : "selected files";
document.findAndReplace.target[3].innerHTML = !top.ICEcoder.selectedFiles[0] ? "all filenames" : "selected filenames";
document.findAndReplace.target[2].innerHTML = !top.ICEcoder.selectedFiles[0] ? top.t['all files'] : top.t['selected files'];
document.findAndReplace.target[3].innerHTML = !top.ICEcoder.selectedFiles[0] ? top.t['all filenames'] : top.t['selected filenames'];
// Hide the file menu incase it's showing
top.ICEcoder.hideFileMenu();
@@ -1167,7 +1167,7 @@ var ICEcoder = {
top.get('rText').style.display =
top.get('replace').style.display =
top.get('rTarget').style.display =
document.findAndReplace.connector.value=="and"
document.findAndReplace.connector.value==top.t['and']
? "inline-block" : "none";
},
@@ -1182,13 +1182,13 @@ var ICEcoder = {
// If we have something to find in currrent document
cM = ICEcoder.getcMInstance();
if (cM && find.length>0 && document.findAndReplace.target.value=="this document") {
if (cM && find.length>0 && document.findAndReplace.target.value==top.t['this document']) {
content = cM.getValue().toLowerCase();
// Find & replace the next instance, or all?
if (document.findAndReplace.connector.value=="and" && buttonClick) {
if (document.findAndReplace.replaceAction.value=="replace" && cM.getSelection().toLowerCase()==find) {
if (document.findAndReplace.connector.value==top.t['and'] && buttonClick) {
if (document.findAndReplace.replaceAction.value==top.t['replace'] && cM.getSelection().toLowerCase()==find) {
cM.replaceSelection(replace,"around");
} else if (document.findAndReplace.replaceAction.value=="replace all") {
} else if (document.findAndReplace.replaceAction.value==top.t['replace all']) {
var rExp = new RegExp(find,"gi");
cM.setValue(cM.getValue().replace(rExp,replace));
}
@@ -1275,13 +1275,13 @@ var ICEcoder = {
replaceQS = "";
targetQS = "";
filesQS = "";
if (document.findAndReplace.connector.value=="and") {
if (document.findAndReplace.connector.value==top.t['and']) {
replaceQS = "&replace="+replace;
}
if (document.findAndReplace.target.value.indexOf("file")>=0) {
if (document.findAndReplace.target.value.indexOf(top.t['file'])>=0) {
targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-");
}
if (document.findAndReplace.target.value=="selected files") {
if (document.findAndReplace.target.value==top.t['selected files']) {
filesQS = "&selectedFiles="+top.ICEcoder.selectedFiles.join(":");
}
find = find.replace(/\'/g, '\&#39;');
@@ -1757,7 +1757,7 @@ var ICEcoder = {
},
// Show the GitHub commit screen
gitHubAction: function(action) {
githubAction: function(action) {
top.get('mediaContainer').innerHTML = '<iframe src="lib/github.php?action='+action+'&selectedFiles='+top.ICEcoder.selectedFiles.join(";")+'&csrf='+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';
top.ICEcoder.showHide('show',top.get('blackMask'));
},

18
lib/ice-coder.min.js vendored
View File

@@ -23,9 +23,9 @@ b){ICEcoder.thisFileFolderType=a;ICEcoder.thisFileFolderLink=b},selectFileFolder
1)):(ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d));else if(a.shiftKey){var h=function(a,b,c,d){return("00000000000000000000"+a).substr(-20)};e=!1;f=c.parentNode.parentNode.parentNode;g=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];m=d.replace(/\d+/g,h)<g.replace(/\d+/g,h)?d:g;g=d.replace(/\d+/g,h)>g.replace(/\d+/g,h)?d:g;if(0<top.ICEcoder.selectedFiles.length&&m.substr(0,m.lastIndexOf("|"))==g.substr(0,g.lastIndexOf("|")))for(d=0;1E6>d&&("LI"!=f.childNodes[d].nodeName&&
d++,c=f.childNodes[d].childNodes[0].childNodes[1],c.id==m&&(e=!0),1==e&&-1==top.ICEcoder.selectedFiles.indexOf(c.id)&&(ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(c.id)),c.id!=g);d+=2);else ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d);top.ICEcoder.githubDiff&&(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,
top.get("githubNavCommit").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavCommit").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555",top.get("githubNavSelectedCount").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555");document.findAndReplace.target[2].innerHTML=
top.ICEcoder.selectedFiles[0]?"selected files":"all files";document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?"selected filenames":"all filenames";top.ICEcoder.hideFileMenu()},deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selectedFiles[b]),ICEcoder.selectDeselectFile("deselect",a);top.ICEcoder.selectedFiles.length=0},selectDeselectFile:function(a,b){var c;b&&(c=-1<
top.ICEcoder.openFiles.indexOf(b.id.replace(/\|/g,"/"))?!0:!1,top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]==b.id.replace(/\|/g,"/")?b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:top.ICEcoder.tabBGcurrent:b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile)},newFile:function(){top.ICEcoder.newTab();top.ICEcoder.saveFile()},
newFolder:function(){var a,b;a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");if(b=top.ICEcoder.getInput("Enter new folder name at "+a,""))b=(a+"/"+b).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=newFolder&file="+b.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+"</b><br>"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType=
top.ICEcoder.selectedFiles[0]?top.t["selected files"]:top.t["all files"];document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected filenames"]:top.t["all filenames"];top.ICEcoder.hideFileMenu()},deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selectedFiles[b]),ICEcoder.selectDeselectFile("deselect",a);top.ICEcoder.selectedFiles.length=0},selectDeselectFile:function(a,
b){var c;b&&(c=-1<top.ICEcoder.openFiles.indexOf(b.id.replace(/\|/g,"/"))?!0:!1,top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]==b.id.replace(/\|/g,"/")?b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:top.ICEcoder.tabBGcurrent:b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile)},newFile:function(){top.ICEcoder.newTab();
top.ICEcoder.saveFile()},newFolder:function(){var a,b;a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");if(b=top.ICEcoder.getInput("Enter new folder name at "+a,""))b=(a+"/"+b).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=newFolder&file="+b.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+"</b><br>"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType=
"file");"/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)?top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),b=!1),b&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g,
"|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Opening File"]+"</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab(),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b<a.length;b++)top.ICEcoder.thisFileFolderLink=a[b].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},openPrompt:function(){var a;if(a=
top.ICEcoder.getInput(top.t["Enter relative file..."],""))-1<a.indexOf("://")?top.ICEcoder.getRemoteFile(a):top.ICEcoder.openFile(a)},getRemoteFile:function(a){top.ICEcoder.serverQueue("add","lib/file-control.php?action=getRemoteFile&file="+a+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>"+top.t.Getting+"</b><br>"+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.ICEcoder.selectedFiles.length&&
@@ -48,13 +48,13 @@ top.ICEcoder.getcMInstance().focus()};l.ondragend=function(){top.ICEcoder.dropFi
targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id=b.replace(/\//g,"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",e.substr(0,e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.innerHTML=d);"delete"==
a&&(h=top.get("filesFrame").contentWindow.document.getElementById((""==top.iceRoot?b.replace(/\/$/,"").replace(/\//g,"|"):"")+"|"+c).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();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="and"==document.findAndReplace.connector.value?"inline-block":"none"},findReplace:function(a,
b,c){var d,e,f;d=a.toLowerCase();e=top.get("replace").value;f=top.get("results");if((a=ICEcoder.getcMInstance())&&0<d.length&&"this document"==document.findAndReplace.target.value){a.getValue().toLowerCase();"and"==document.findAndReplace.connector.value&&c&&("replace"==document.findAndReplace.replaceAction.value&&a.getSelection().toLowerCase()==d?a.replaceSelection(e,"around"):"replace all"==document.findAndReplace.replaceAction.value&&(c=new RegExp(d,"gi"),a.setValue(a.getValue().replace(c,e))));
c=a.getValue().toLowerCase();if(!top.ICEcoder.findMode||d!=top.ICEcoder.lastsearch){ICEcoder.results=[];ICEcoder.resultsLines=[];for(e=0;e<c.length;e++)c.substr(e,d.length)==d&&-1==ICEcoder.results.indexOf(e)&&(ICEcoder.results.push(e),-1==ICEcoder.resultsLines.indexOf(a.posFromIndex(e).line+1)&&ICEcoder.resultsLines.push(a.posFromIndex(e).line+1));ICEcoder.lastsearch=d}if(0<ICEcoder.results.length){c=a.getScrollInfo().height>a.getScrollInfo().clientHeight;if(b)f.innerHTML=ICEcoder.results.length+
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,e,f;d=a.toLowerCase();e=top.get("replace").value;f=top.get("results");if((a=ICEcoder.getcMInstance())&&0<d.length&&document.findAndReplace.target.value==top.t["this document"]){a.getValue().toLowerCase();document.findAndReplace.connector.value==top.t.and&&c&&(document.findAndReplace.replaceAction.value==top.t.replace&&a.getSelection().toLowerCase()==d?a.replaceSelection(e,"around"):document.findAndReplace.replaceAction.value==top.t["replace all"]&&(c=new RegExp(d,"gi"),a.setValue(a.getValue().replace(c,
e))));c=a.getValue().toLowerCase();if(!top.ICEcoder.findMode||d!=top.ICEcoder.lastsearch){ICEcoder.results=[];ICEcoder.resultsLines=[];for(e=0;e<c.length;e++)c.substr(e,d.length)==d&&-1==ICEcoder.results.indexOf(e)&&(ICEcoder.results.push(e),-1==ICEcoder.resultsLines.indexOf(a.posFromIndex(e).line+1)&&ICEcoder.resultsLines.push(a.posFromIndex(e).line+1));ICEcoder.lastsearch=d}if(0<ICEcoder.results.length){c=a.getScrollInfo().height>a.getScrollInfo().clientHeight;if(b)f.innerHTML=ICEcoder.results.length+
" results";else{for(e=ICEcoder.findResult=0;e<ICEcoder.results.length;e++)ICEcoder.results[e]<a.indexFromPos(a.getCursor())&&ICEcoder.findResult++;ICEcoder.findResult>ICEcoder.results.length-1&&(ICEcoder.findResult=0);f.innerHTML="Highlighted result "+(ICEcoder.findResult+1)+" of "+ICEcoder.results.length+" results";b=a.getSearchCursor(d,a.getCursor(),!0);b.findNext();b.from()||(b=a.getSearchCursor(d,{line:0,ch:0},!0),b.findNext());a.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=
!0}d=c?parseInt(top.ICEcoder.content.style.height,10)/a.lineCount():a.defaultTextHeight();b=c?0:a.heightAtLine(0);top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=c?"17px":"0";f="";for(e=1;e<=a.lineCount();e++)c=-1<ICEcoder.resultsLines.indexOf(e)?a.getCursor().line+1==e?"#b00":"#888":"transparent",f+='<div style="position: absolute; display: block; width: 5px; height:'+d+"px; background: "+c+"; top: "+parseInt(d*(e-1)+b,10)+'px"></div>';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}""!=d&&c?(f=b=a="","and"==document.findAndReplace.connector.value&&(a="&replace="+e),0<=document.findAndReplace.target.value.indexOf("file")&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,
"-")),"selected files"==document.findAndReplace.target.value&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),d=d.replace(/\'/g,"&#39;"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):d,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+d+a+b+f+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(f.innerHTML="No results",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}""!=d&&c?(f=b=a="",document.findAndReplace.connector.value==top.t.and&&(a="&replace="+e),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(":")),d=d.replace(/\'/g,"&#39;"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):d,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+d+a+b+f+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(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.php?action=replaceText&fileRef="+a.replace(/\//g,"|")+"&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>"+top.t["Replacing text in"]+"</b><br>"+a)},getNestLocation:function(a){var b,c,d;if(b=ICEcoder.getcMInstance()){c=b.getValue();b=b.getTokenAt(b.getCursor()).state;d=!1;"undefined"!=typeof b&&
(d=b.context);"undefined"!=typeof b.curState&&"undefined"!=typeof b.curState.htmlState&&(d=b.curState.htmlState.context);ICEcoder.htmlTagArray=[];if(d)for(;d;d=d.prev)"undefined"!=typeof d.tagName&&ICEcoder.htmlTagArray.unshift(d.tagName);ICEcoder.tagString=ICEcoder.htmlTagArray[ICEcoder.htmlTagArray.length-1];"JavaScript"==ICEcoder.caretLocType&&(ICEcoder.tagString="script");a&&!top.ICEcoder.dontUpdateNest&&(ICEcoder.nestDisplay.innerHTML="","undefined"!=typeof ICEcoder.openFiles[ICEcoder.selectedTab-
1]&&(a=ICEcoder.openFiles[ICEcoder.selectedTab-1],ICEcoder.getNestLocationSub(c,a)))}},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().line;c=a.getCursor().ch;for(var e=d=0;e<b;e++)d+=a.getLine(e).length+1;ICEcoder.caretPos=d+c-1;ICEcoder.getNestLocation("yes")},updateCharDisplay:function(){var a;a=ICEcoder.getcMInstance();ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},
@@ -76,7 +76,7 @@ setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.frames.fileControl.l
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.previousFiles.length&&top.ICEcoder.ask(top.t["Open previous files"]+"\n\n"+top.ICEcoder.previousFiles.length+" files:\n"+top.ICEcoder.previousFiles.join("\n").replace(/\|/g,"/").replace(new RegExp(top.docRoot+top.iceRoot,"gi"),"")))for(var a=
0;a<top.ICEcoder.previousFiles.length;a++)top.ICEcoder.thisFileFolderLink=top.ICEcoder.previousFiles[a].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},settingsScreen:function(a){a||(top.get("mediaContainer").innerHTML='<iframe src="lib/settings-screen.php" class="whiteGlow" style="width: 970px; height: 610px"></iframe>');top.ICEcoder.showHide(a?"hide":"show",top.get("blackMask"))},helpScreen:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/help.php" class="whiteGlow" style="width: 840px; height: 515px"></iframe>';
top.ICEcoder.showHide("show",top.get("blackMask"))},showManual:function(a,b){var c;c=b?"#"+b:"";top.get("mediaContainer").innerHTML='<iframe src="https://icecoder.net/manual?version='+a+c+'" class="whiteGlow" style="width: 800px; height: 470px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/properties.php?fileName='+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';
top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},gitHubAction:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/github.php?action='+a+"&selectedFiles="+top.ICEcoder.selectedFiles.join(";")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';
top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},githubAction:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/github.php?action='+a+"&selectedFiles="+top.ICEcoder.selectedFiles.join(";")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';
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='<iframe src="lib/github-manager.php" class="whiteGlow" style="width: 660px; height: 450px"></iframe>',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,e,f,g,m,h,k,n,p,l,r,s,t){var q;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+1,a.lastIndexOf("."));"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);

View File

@@ -117,7 +117,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
$r = 0;
function phpGrep($q, $path, $base) {
$fp = opendir($path);
global $r, $ICEcoder, $serverType, $selectedFiles, $docRoot, $ICEcoderDir, $context;
global $t, $r, $ICEcoder, $serverType, $selectedFiles, $docRoot, $ICEcoderDir, $context;
if (!isset($ret)) {$ret="";};
$slash = $serverType == strpos($path,"\\")>-1 ? "\\" : "/";
while($f = readdir($fp)) {

View File

@@ -45,7 +45,7 @@ include(dirname(__FILE__)."/../lang/english.php");
$englishText = $text;
// Load chosen language ontop to replace English
include(dirname(__FILE__)."/../lang/english.php");
$text = array_merge($englishText, $text);
$text = array_replace_recursive ($englishText, $text);
$_SESSION['text'] = $text;
// Login not required or we're in demo mode and have password set in our settings, log us straight in