From f87af35e0736a7e3c5680691c2d4a4f239945ba3 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 29 Jun 2018 17:29:18 +0000 Subject: [PATCH] ref 11724: SAI - Update to StorageHUB https://support.d4science.org/issues/11724 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@169581 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 4 ++-- .../client/create/ProjectFolderSelectionCard.java | 3 ++- .../client/project/ProjectManager.java | 15 ++++++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 45d35a9..739908e 100644 --- a/pom.xml +++ b/pom.xml @@ -323,12 +323,12 @@ [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) - + org.gcube.portlets.widgets workspace-explorer [2.0.0-SNAPSHOT,3.0.0-SNAPSHOT) - + diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/create/ProjectFolderSelectionCard.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/create/ProjectFolderSelectionCard.java index e206283..c38f94e 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/create/ProjectFolderSelectionCard.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/create/ProjectFolderSelectionCard.java @@ -35,7 +35,8 @@ public class ProjectFolderSelectionCard extends WizardCard { @Override public void onSelectedItem(Item item) { - if (item.getType() == ItemType.FOLDER) { + if (item.getType() == ItemType.FOLDER||item.getType() == ItemType.PRIVATE_FOLDER + ||item.getType() == ItemType.SHARED_FOLDER||item.getType() == ItemType.VRE_FOLDER) { createNewProjectFolder(item); } else { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java index 53d33c7..e2e8930 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java @@ -155,7 +155,8 @@ public class ProjectManager { @Override public void onSelectedItem(Item item) { - if (item.getType() == ItemType.FOLDER) { + if (item.getType() == ItemType.FOLDER||item.getType() == ItemType.PRIVATE_FOLDER + ||item.getType() == ItemType.SHARED_FOLDER||item.getType() == ItemType.VRE_FOLDER) { openProjectOnServer(item); } else { @@ -235,11 +236,8 @@ public class ProjectManager { public void addResource() { List selectableTypes = new ArrayList(); selectableTypes.add(ItemType.EXTERNAL_FILE); - selectableTypes.add(ItemType.EXTERNAL_IMAGE); - selectableTypes.add(ItemType.IMAGE_DOCUMENT); - selectableTypes.add(ItemType.DOCUMENT); - selectableTypes.add(ItemType.PDF_DOCUMENT); - + + List showableTypes = new ArrayList(); showableTypes.addAll(Arrays.asList(ItemType.values())); @@ -250,9 +248,8 @@ public class ProjectManager { @Override public void onSelectedItem(Item item) { - if (item.getType() == ItemType.EXTERNAL_FILE || item.getType() == ItemType.EXTERNAL_IMAGE - || item.getType() == ItemType.IMAGE_DOCUMENT || item.getType() == ItemType.DOCUMENT - || item.getType() == ItemType.PDF_DOCUMENT) { + if (item.getType() != ItemType.FOLDER&&item.getType() != ItemType.PRIVATE_FOLDER + &&item.getType() != ItemType.SHARED_FOLDER&&item.getType() != ItemType.VRE_FOLDER) { String filename = item.getName(); if (filename != null && !filename.isEmpty()) { addResourceToProject(item);