diff --git a/lib/multiple-results.php b/lib/multiple-results.php
index 6fe2949..08aea43 100644
--- a/lib/multiple-results.php
+++ b/lib/multiple-results.php
@@ -110,7 +110,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
$ret .= "";
$ret .= str_replace($base,"",$fullPath)."
Found X times
";
if (isset($_GET['replace'])) {
- $ret .= "replace
";
+ $ret .= "replace
";
};
$ret .= '
';
echo 'foundArray.push("'.$fullPath.'");';
@@ -160,21 +160,15 @@ var replaceAll = function() {
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
}
-var replaceInFileSingle = function(fileNum) {
- console.log(fileNum + "::" + foundArray[fileNum]);
- //top.ICEcoder.switchTab(tab);
- //cM = top.ICEcoder.getcMInstance();
- //content = cM.getValue();
- //cM.setValue(cM.getValue().replace(rExp,top.document.getElementById('replace').value));
- //document.getElementById('foundCount'+tab).innerHTML = document.getElementById('foundCount'+tab).innerHTML.replace('Found','Replaced');
+var replaceInFileSingle = function(fileRef) {
+ top.ICEcoder.replaceInFile(fileRef,'','');
}
var replaceInFilesAll = function() {
- //for (var i=0;i<=foundArray.length-1;i++) {
- // replaceSingle(foundArray[i]);
- //}
- //top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
- console.log('REPLACE IN ALL FILES');
+ for (var i=0;i<=foundArray.length-1;i++) {
+ replaceInFileSingle(foundArray[i]);
+ }
+ top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
}
var renameSingle = function(arrayRef) {