From 9439ffa8c8db22abb657bc38db647942356418ec Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 2 Aug 2024 17:13:37 +0200 Subject: [PATCH] uncommented submit from for D&D --- .../uploader/dragdrop/MultipleDNDUpload.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/dragdrop/MultipleDNDUpload.java b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/dragdrop/MultipleDNDUpload.java index 69e3a32..5741302 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/dragdrop/MultipleDNDUpload.java +++ b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/dragdrop/MultipleDNDUpload.java @@ -672,24 +672,24 @@ public class MultipleDNDUpload extends LayoutPanel implements HasWorskpaceUpload } -// xhr.send(formdata); -// instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::addNewSubmitToMonitor(Ljava/lang/String;)(uploadUUID); -// -// if(numFolder>0){ -// var msg; -// if(numFolder==files.length){ -// msg = "Is not possible to upload a folder"; -// instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::showAlert(Ljava/lang/String;)(msg); -// return; -// } -// -// var msg = "Ignored "; -// msg += numFolder > 1? numFolder+" folders": numFolder+" folder"; -// msg+= " during upload"; -// console.log(msg); -// instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::showAlert(Ljava/lang/String;)(msg); -// } -// instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::reset()(); + xhr.send(formdata); + instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::addNewSubmitToMonitor(Ljava/lang/String;)(uploadUUID); + + if(numFolder>0){ + var msg; + if(numFolder==files.length){ + msg = "Is not possible to upload a folder"; + instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::showAlert(Ljava/lang/String;)(msg); + return; + } + + var msg = "Ignored "; + msg += numFolder > 1? numFolder+" folders": numFolder+" folder"; + msg+= " during upload"; + console.log(msg); + instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::showAlert(Ljava/lang/String;)(msg); + } + instance.@org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload::reset()(); });