file now POST'd and can be sent to serverqueue

This commit is contained in:
Matt Pass
2014-11-14 11:43:37 +00:00
parent d43278fbf7
commit b650b64455

View File

@@ -1178,7 +1178,7 @@ var ICEcoder = {
: "|[NEW]";
}
filePath = filePath.replace("||","|");
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&file="+filePath+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType+"&csrf="+top.ICEcoder.csrf);
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType+"&csrf="+top.ICEcoder.csrf,decodeURIComponent(filePath));
top.ICEcoder.serverMessage('<b>'+top.t['Saving']+'</b><br>'+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""));
},
@@ -2023,7 +2023,7 @@ var ICEcoder = {
},
// Queue items up for processing in turn
serverQueue: function(action,item) {
serverQueue: function(action,item,file) {
var cM, nextSaveID, txtArea, topSaveID, element, xhr, statusObj, timeStart;
cM = ICEcoder.getcMInstance();
@@ -2084,7 +2084,7 @@ var ICEcoder = {
xhr.open("POST",ICEcoder.serverQueueItems[0],true);
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
timeStart = new Date().getTime();
xhr.send('timeStart='+timeStart+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
xhr.send('timeStart='+timeStart+'&file='+file+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
} else {
setTimeout(function() {top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href=ICEcoder.serverQueueItems[0]},1);
}