implemented deletion of project files and dirs
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -24,7 +24,6 @@ import de.srsoftware.umbrella.core.model.Company;
|
||||
import de.srsoftware.umbrella.core.model.Project;
|
||||
import de.srsoftware.umbrella.core.model.Token;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaUser;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.file.Files;
|
||||
@@ -136,6 +135,7 @@ public class FileModule extends BaseHandler implements FileService {
|
||||
if (!dropDir(file)) return sendContent(ex,HTTP_SERVER_ERROR,format("Failed to delete {0}",file.getName()));
|
||||
Map<String,Object> map = getDirectory(file.getParentFile());
|
||||
map.put("title",file.getName());
|
||||
map.put("delete",true);
|
||||
return sendContent(ex,map);
|
||||
|
||||
}
|
||||
|
||||
@@ -73,9 +73,9 @@
|
||||
|
||||
async function handleDirectory(res){
|
||||
let json = await res.json();
|
||||
if (json.dirs) children.dirs = json.dirs;
|
||||
if (json.files) children.files = json.files;
|
||||
if (json.title) children.title = json.title;
|
||||
children.dirs = json.dirs ? json.dirs : {};
|
||||
children.files = json.files ? json.files : {};
|
||||
children.title = json.title ? json.title : {};
|
||||
delete_allowed = json.delete;
|
||||
yikes();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user