From 744cfbad160b9a54756f3e89e97248435a2e973c Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 31 Aug 2014 07:01:23 +0100 Subject: [PATCH 01/10] Fix to language ref array item --- lib/file-control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/file-control.php b/lib/file-control.php index e6b9d62..78d4356 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -443,7 +443,7 @@ if (action=="save") { if (strpos($file,"[NEW]")>0||$saveType=="saveAs") { ?> fileLoc = ''; - newFileName = top.ICEcoder.getInput(' '+(fileLoc!='' ? fileLoc : '/'),''); + newFileName = top.ICEcoder.getInput(' '+(fileLoc!='' ? fileLoc : '/'),''); if (newFileName) { if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName} newFileName = fileLoc + newFileName; @@ -471,4 +471,4 @@ if (action=="doneSave") { // Finally, switch mode in case we have saved, renamed file etc top.ICEcoder.switchMode(); - \ No newline at end of file + From 99a9c7ef801c7583e836fb17895f0dfb84498a08 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 3 Sep 2014 05:34:20 +0100 Subject: [PATCH 02/10] Case change only on function name --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 7bec04c..68cf370 100644 --- a/index.php +++ b/index.php @@ -176,9 +176,9 @@ $t = $text['index'];
-
Commit
+
Commit
Selected: 0
-
Pull
+
Pull
@@ -313,4 +313,4 @@ ICEcoder.setLayout('dontSetEditor'); - \ No newline at end of file + From b9be8cb70d8d66349b67b4731c415177d992ba5c Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 3 Sep 2014 06:11:54 +0100 Subject: [PATCH 03/10] Remove new line at EOF --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 68cf370..c80922d 100644 --- a/index.php +++ b/index.php @@ -313,4 +313,4 @@ ICEcoder.setLayout('dontSetEditor'); - + \ No newline at end of file From 8da637c650a62802fedb6991839a1e52606b2e48 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 3 Sep 2014 06:12:38 +0100 Subject: [PATCH 04/10] Remove new line at EOF --- lib/file-control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file-control.php b/lib/file-control.php index 78d4356..4ddd2f9 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -471,4 +471,4 @@ if (action=="doneSave") { // Finally, switch mode in case we have saved, renamed file etc top.ICEcoder.switchMode(); - + \ No newline at end of file From d24a2745ce3c3ddb0968866b56a24018416ec2e4 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 3 Sep 2014 06:14:50 +0100 Subject: [PATCH 05/10] Case change on function namee --- lib/ice-coder.js | 2 +- lib/ice-coder.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 807fe82..a96a206 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1757,7 +1757,7 @@ var ICEcoder = { }, // Show the GitHub commit screen - gitHubAction: function(action) { + githubAction: function(action) { top.get('mediaContainer').innerHTML = ''; top.ICEcoder.showHide('show',top.get('blackMask')); }, diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 5487961..3f5652b 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -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.showHide(a?"hide":"show",top.get("blackMask"))},helpScreen:function(){top.get("mediaContainer").innerHTML=''; top.ICEcoder.showHide("show",top.get("blackMask"))},showManual:function(a,b){var c;c=b?"#"+b:"";top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML=''; -top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show",top.get("blackMask"))},gitHubAction:function(a){top.get("mediaContainer").innerHTML=''; +top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show",top.get("blackMask"))},githubAction:function(a){top.get("mediaContainer").innerHTML=''; 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,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); From 44aca5ad1b5c958bd4ddebf71b94d5e6ac03a8d5 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 5 Sep 2014 22:07:26 +0100 Subject: [PATCH 06/10] Need to use array_replace_recursive() This is the function needed to overwrite $text array ontop of $englishText, including nested arrays --- lib/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/settings.php b/lib/settings.php index 3d7e808..e092985 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -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 From 0715782e3ab6f5e38e81b68b66763821e4a85652 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 5 Sep 2014 22:17:40 +0100 Subject: [PATCH 07/10] For now stop using translations on find/replace Using non English test for now is breaking functionality To be looked into and fixed, then these translations can be re-enabled --- lang/chinese-simplified.php | 18 +++++++++--------- lang/chinese-traditional.php | 20 ++++++++++---------- lang/dutch.php | 18 +++++++++--------- lang/french.php | 20 ++++++++++---------- lang/german.php | 18 +++++++++--------- lang/italian.php | 20 ++++++++++---------- lang/norwegian.php | 18 +++++++++--------- lang/persian.php | 18 +++++++++--------- 8 files changed, 75 insertions(+), 75 deletions(-) diff --git a/lang/chinese-simplified.php b/lang/chinese-simplified.php index 0724201..5970172 100644 --- a/lang/chinese-simplified.php +++ b/lang/chinese-simplified.php @@ -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" => "转到行", diff --git a/lang/chinese-traditional.php b/lang/chinese-traditional.php index 58384b8..b206ebb 100644 --- a/lang/chinese-traditional.php +++ b/lang/chinese-traditional.php @@ -1,4 +1,4 @@ - "網站", "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" => "轉到行", diff --git a/lang/dutch.php b/lang/dutch.php index 1df3bfa..f1bca66 100644 --- a/lang/dutch.php +++ b/lang/dutch.php @@ -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", diff --git a/lang/french.php b/lang/french.php index a960d03..4e6b8f7 100644 --- a/lang/french.php +++ b/lang/french.php @@ -1,4 +1,4 @@ - "Site internet", "Close all tabs" => "Fermer les onglets", "Alphabetize tabs" => "Onglets par ordre alphabé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'assistance au code", "Code Assist" => "Assistance au Code", "Go to Line" => "Aller à la ligne", diff --git a/lang/german.php b/lang/german.php index da359e5..4cf1e5e 100644 --- a/lang/german.php +++ b/lang/german.php @@ -89,15 +89,15 @@ $text = array( "website" => "Website", "Close all tabs" => "Alle Tabs schließ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ö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ö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", diff --git a/lang/italian.php b/lang/italian.php index b5877e8..5eb361f 100644 --- a/lang/italian.php +++ b/lang/italian.php @@ -1,4 +1,4 @@ - "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", diff --git a/lang/norwegian.php b/lang/norwegian.php index 0eeb789..82e5376 100644 --- a/lang/norwegian.php +++ b/lang/norwegian.php @@ -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" => "å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" => "åpne dokumenter", +// "all files" => "alle filer", +// "all filenames" => "alle filenavn", "Turn on/off..." => "Svitsj på/av kode assistenten", "Code Assist" => "Kode Assistenten", "Go to Line" => "Gå til Linje", diff --git a/lang/persian.php b/lang/persian.php index c0e3130..4abd490 100644 --- a/lang/persian.php +++ b/lang/persian.php @@ -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" => "برو به خط", From 296eeff33d8abbccb01c1fa25b6df30be3148a50 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 5 Sep 2014 22:21:31 +0100 Subject: [PATCH 08/10] Translations added for find/replace area in English --- lang/english.php | 9 +++++++++ lib/ice-coder.js | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lang/english.php b/lang/english.php index 582d4bb..fcd1ba1 100644 --- a/lang/english.php +++ b/lang/english.php @@ -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?", diff --git a/lib/ice-coder.js b/lib/ice-coder.js index a96a206..a522281 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -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, '\''); From 941801078cc579c8b1cff78deb4a1134b566a9ad Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 5 Sep 2014 22:22:28 +0100 Subject: [PATCH 09/10] Updated to match main JS file --- lib/ice-coder.min.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 3f5652b..a5a3cda 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -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;if(0d&&("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.t["Creating Folder"]+"
"+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.t["Creating Folder"]+"
"+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(""+top.t["Opening File"]+"
"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab(),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&&0a.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())&&0a.getScrollInfo().clientHeight;if(b)f.innerHTML=ICEcoder.results.length+ " results";else{for(e=ICEcoder.findResult=0;eICEcoder.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
';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,"'"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):d,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML=''):(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,"'"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):d,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.php?action=replaceText&fileRef="+a.replace(/\//g,"|")+"&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage(""+top.t["Replacing text in"]+"
"+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 Date: Fri, 5 Sep 2014 22:36:01 +0100 Subject: [PATCH 10/10] $t needed in function to display text --- lib/multiple-results.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/multiple-results.php b/lib/multiple-results.php index 21f8015..fe63efd 100644 --- a/lib/multiple-results.php +++ b/lib/multiple-results.php @@ -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)) {