mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
If our file is |[NEW], prefix selectedFiles[0]
This is so we can pick up where we are saving the new file.
This commit is contained in:
@@ -641,10 +641,14 @@ var ICEcoder = {
|
||||
|
||||
// Save a file
|
||||
saveFile: function(saveAs) {
|
||||
var saveType;
|
||||
var saveType, filePath;
|
||||
|
||||
saveType = saveAs ? "saveAs" : "save";
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=save&file="+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|")+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType);
|
||||
filePath = ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");
|
||||
if (filePath=="|[NEW]") {
|
||||
filePath = top.ICEcoder.selectedFiles[0]+filePath;
|
||||
}
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=save&file="+filePath+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType);
|
||||
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user