mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 16:46:48 +01:00
Don't update openFiles array on upload
Calling updateFileManagerList now includes a 6th argument and if a true value is passed, then it's indicating an uploaded file and shouldn't set the openFiles array value.
This commit is contained in:
@@ -103,7 +103,7 @@ if ($_GET['action']=="upload") {
|
||||
$this->uploadFile=$uploadDir.$current->name;
|
||||
$fileName = $current->name;
|
||||
if ($this->upload($current,$this->uploadFile)) {
|
||||
echo '<script>action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.rightClickedFile.replace(/\|/g,\'/\'),\''.$fileName.'\');</script>';
|
||||
echo '<script>action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.rightClickedFile.replace(/\|/g,\'/\'),\''.$fileName.'\',false,false,true);</script>';
|
||||
} else {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.rightClickedFile.replace(/\|/g,'/'))</script>";
|
||||
}
|
||||
@@ -135,7 +135,7 @@ if ($_GET['action']=="upload") {
|
||||
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot upload whilst in demo mode');</script>";
|
||||
}
|
||||
|
||||
echo "<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.hideFileMenu();top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));</script>";
|
||||
echo "<script>top.ICEcoder.hideFileMenu();top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));</script>";
|
||||
}
|
||||
|
||||
// If we're due to rename a file/folder...
|
||||
|
||||
@@ -652,7 +652,7 @@ var ICEcoder = {
|
||||
},
|
||||
|
||||
// Update the file manager tree list on demand
|
||||
updateFileManagerList: function(action,location,file,perms,oldName) {
|
||||
updateFileManagerList: function(action,location,file,perms,oldName,uploaded) {
|
||||
var actionElemType, cssStyle, perms, targetElem, locNest, newText, innerLI, newUL, newLI, elemType, nameLI, shortURL, newMouseOver;
|
||||
|
||||
// Adding files
|
||||
@@ -714,7 +714,7 @@ var ICEcoder = {
|
||||
}
|
||||
}
|
||||
// If we added a new file, we've saved it under a new filename, so set that
|
||||
if (actionElemType=="file") {
|
||||
if (actionElemType=="file" && !uploaded) {
|
||||
top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=location+file;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user