mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-11 19:16:49 +01:00
Now displaying Replaced text when successfully replaced
This commit is contained in:
@@ -32,6 +32,7 @@ var ICEcoder = {
|
||||
resultsLines: [], // Array of lines containing results (simpler version of results)
|
||||
findResult: 0, // Array position of current find in results
|
||||
findRegex: false, // If find attempts are done using regex
|
||||
findUpdateMultiInfoID: [], // ID of multiple results modal elem to update & text, when rename/replace is successful
|
||||
scrollbarVisible: false, // Indicates if the main pane has a scrollbar
|
||||
mouseDown: false, // If the mouse is down
|
||||
mouseDownInCM: false, // If the mouse is down within CodeMirror instance (can be false, 'editor' or 'gutter')
|
||||
@@ -3596,8 +3597,15 @@ var ICEcoder = {
|
||||
console.log(statusObj);
|
||||
ICEcoder.serverMessage();
|
||||
ICEcoder.serverQueue('del');
|
||||
// Successful, process the requested action to take now
|
||||
} else {
|
||||
eval(statusObj.action.doNext);
|
||||
// If we need to update the multiple results pane with new info now a task is done successfully
|
||||
if (ICEcoder.findUpdateMultiInfoID[0]) {
|
||||
get('multipleResultsIFrame').contentWindow.document.getElementById(ICEcoder.findUpdateMultiInfoID[0])
|
||||
.innerHTML = ICEcoder.findUpdateMultiInfoID[1];
|
||||
ICEcoder.findUpdateMultiInfoID = [];
|
||||
}
|
||||
}
|
||||
// Some other response? Display a message about that
|
||||
} else {
|
||||
|
||||
@@ -266,9 +266,10 @@ if (true === isset($_GET['target']) && false !== strpos($_GET['target'], "filena
|
||||
const renameSingle = function(arrayRef) {
|
||||
fileRef = spansArray[arrayRef].id.replace(/\|/g, "/").replace(/_perms/g, "");
|
||||
const rExp = new RegExp(true === parent.ICEcoder.findRegex ? findText : parent.ICEcoder.escapeRegex(findText), "gi");
|
||||
// TODO: get this working
|
||||
// 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'];
|
||||
};
|
||||
|
||||
const renameAll = function() {
|
||||
|
||||
Reference in New Issue
Block a user