Finishing updating multple results info items on task done

This commit is contained in:
mattpass
2021-07-01 21:34:00 +01:00
parent d92c3b00c3
commit e8ba59fe46
12 changed files with 18 additions and 3 deletions

View File

@@ -297,6 +297,7 @@ $text = [
"No matches found" => "没有找到匹配",
"selected" => "选择",
"found in" => "查询结果在",
"Renamed" => "Renamed",
"Replaced" => "已替换"
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "沒有找到匹配",
"selected" => "選擇",
"found in" => "查詢結果在",
"Renamed" => "Renamed",
"Replaced" => "已替換"
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "Geen overeenkomsten gevonden",
"selected" => "geselecteerd",
"found in" => "gevonden in",
"Renamed" => "Renamed",
"Replaced" => "Vervangen",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "No matches found",
"selected" => "selected",
"found in" => "found in",
"Renamed" => "Renamed",
"Replaced" => "Replaced",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "Aucun résultat de trouver",
"selected" => "sélectionné",
"found in" => "trouvé dans",
"Renamed" => "Renamed",
"Replaced" => "Remplacé",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "Nichts gefunden",
"selected" => "Ausgewählte",
"found in" => "Gefunden in",
"Renamed" => "Renamed",
"Replaced" => "Ersetzen",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "No matches found",
"selected" => "selected",
"found in" => "found in",
"Renamed" => "Renamed",
"Replaced" => "Replaced",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "Ingen treff",
"selected" => "valgt",
"found in" => "funnet i",
"Renamed" => "Renamed",
"Replaced" => "Erstattet",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "جستجو نتیجه ای نداشت",
"selected" => "انتخاب شده",
"found in" => "یافتن در",
"Renamed" => "Renamed",
"Replaced" => "جایگزین شود",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "Nenhum resultado encontrado",
"selected" => "selecionado",
"found in" => "encontrado em",
"Renamed" => "Renamed",
"Replaced" => "Substituído(s)",
],

View File

@@ -296,6 +296,7 @@ $text = [
"No matches found" => "No se encontraron coincidencias",
"selected" => "seleccionado",
"found in" => "encontrado en",
"Renamed" => "Renamed",
"Replaced" => "Reemplezado",
],

View File

@@ -195,7 +195,7 @@ if (true === isset($_GET['target']) && false !== strpos($_GET['target'], "filena
$ret .= str_replace($base, "", $fullPath) . "</a><div id=\\\"foundCount" . $r . "\\\">" .
$t['Found'] . " " . substr_count(strtolower(toUTF8noBOM(getData($fullPath), false)), strtolower($q)) . " " . $t['times'] . "</div>";
if (isset($_GET['replace'])) {
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('" . $fullPath . "'); this.style.display=\'none\'\\\">" . $t['replace'] . "</div>";
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('" . $fullPath . "', " . $r . "); this.style.display=\'none\'\\\">" . $t['replace'] . "</div>";
};
$ret .= '<hr>';
echo 'foundArray.push("' . $fullPath . '");' . PHP_EOL;
@@ -251,9 +251,13 @@ if (true === isset($_GET['target']) && false !== strpos($_GET['target'], "filena
parent.ICEcoder.showHide('hide', parent.document.getElementById('blackMask'));
};
const replaceInFileSingle = function(fileRef) {
const replaceInFileSingle = function(fileRef, idNum) {
// TODO: findText in this line
parent.ICEcoder.replaceInFile(fileRef, true === parent.ICEcoder.findRegex ? findText : parent.ICEcoder.escapeRegex(findText), '<?php if (isset($_GET['replace'])) {echo xssClean($_GET['replace'], 'script');}; ?>');
if (idNum) {
const newText = document.getElementById('foundCount' + idNum).innerHTML = document.getElementById('foundCount' + idNum).innerHTML.replace('<?php echo $t['Found'];?>', '<?php echo $t['Replaced'];?>');
parent.ICEcoder.findUpdateMultiInfoID = ['foundCount' + idNum, newText];
}
};
const replaceInFilesAll = function() {
@@ -269,7 +273,7 @@ if (true === isset($_GET['target']) && false !== strpos($_GET['target'], "filena
// TODO: get this working with regex
newName = spansArray[arrayRef].id.replace(/\|/g, "/").replace(/_perms/g, "").replace(rExp, "<?php if (isset($_GET['replace'])) {echo xssClean($_GET['replace'], 'script');}; ?>");
parent.ICEcoder.renameFile(fileRef,newName);
parent.ICEcoder.findUpdateMultiInfoID = ['foundCount' + arrayRef, 'Renamed'];
parent.ICEcoder.findUpdateMultiInfoID = ['foundCount' + arrayRef, '<?php echo $t['Renamed'];?>'];
};
const renameAll = function() {