mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Getting rid of rightClickedFile
Now using last item on selectedFiles array
This commit is contained in:
@@ -38,7 +38,7 @@ if ($_GET['action']=="load") {
|
||||
}
|
||||
if (strpos($finfo,"text")===0 || strpos($finfo,"empty")!==false) {
|
||||
echo 'fileType="text";';
|
||||
echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
|
||||
echo 'top.ICEcoder.shortURL = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
echo '</script><textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&",$loadedFile)).'</textarea><script>';
|
||||
} else if (strpos($finfo,"image")===0) {
|
||||
@@ -139,9 +139,9 @@ if ($_GET['action']=="upload") {
|
||||
$this->uploadFile=$uploadDir.$current->name;
|
||||
$fileName = $current->name;
|
||||
if ($this->upload($current,$this->uploadFile)) {
|
||||
echo 'action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.rightClickedFile.replace(/\|/g,\'/\'),\''.$fileName.'\',false,false,true); top.ICEcoder.serverMessage("Uploaded file(s) OK");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
echo 'action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,\'/\'),\''.$fileName.'\',false,false,true); top.ICEcoder.serverMessage("Uploaded file(s) OK");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.rightClickedFile.replace(/\|/g,'/'));";
|
||||
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'));";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user