Pass thru list of selected files on find/replace

If we choose selected files when performing a find/replace, build up a
colon seperated list and tack on as a querysting
This commit is contained in:
Matt Pass
2012-12-17 08:29:12 +00:00
parent 2bb961b7a8
commit 2a2cd81149

View File

@@ -895,16 +895,24 @@ var ICEcoder = {
if (find != "" && buttonClick) {
replaceQS = "";
targetQS = "";
filesQS = "";
if (document.findAndReplace.connector.value=="and") {
replaceQS = "&replace="+replace;
}
if (document.findAndReplace.target.value.indexOf("file")>=0) {
targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-");
}
if (document.findAndReplace.target.value=="selected files") {
filesQS = "&selectedFiles=";
for(i=0;i<top.ICEcoder.selectedFiles.length;i++) {
filesQS += top.ICEcoder.selectedFiles[i]+":";
}
filesQS = filesQS.replace(/\:$/g,"");
}
find = find.replace(/\'/g, '&#39;');
find != encodeURIComponent(find) ? find = 'ICEcoder:'+encodeURIComponent(find) : find;
top.ICEcoder.showHide('show',top.document.getElementById('loadingMask'));
top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/multiple-results.php?find='+find+replaceQS+targetQS+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>';
top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/multiple-results.php?find='+find+replaceQS+targetQS+filesQS+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>';
}
}
},