diff --git a/.classpath b/.classpath index 9d55208..3754268 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -33,5 +33,5 @@ - + diff --git a/distro/changelog.xml b/distro/changelog.xml index 22cfedc..8e24c11 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,7 +1,13 @@ + + [Feature #11374] Download items with double click + + - [Feature #9926] read the scope from environment variable + [Feature #9926] read the scope from environment variable + diff --git a/pom.xml b/pom.xml index 3b2a8b9..7ec4a80 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.gcube.portlets.user workspace-explorer-app - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT war diff --git a/src/main/java/org/gcube/portlets/user/workspaceexplorerapp/client/grid/AbstractItemsCellTable.java b/src/main/java/org/gcube/portlets/user/workspaceexplorerapp/client/grid/AbstractItemsCellTable.java index 4c2b199..89d73fc 100644 --- a/src/main/java/org/gcube/portlets/user/workspaceexplorerapp/client/grid/AbstractItemsCellTable.java +++ b/src/main/java/org/gcube/portlets/user/workspaceexplorerapp/client/grid/AbstractItemsCellTable.java @@ -3,7 +3,9 @@ package org.gcube.portlets.user.workspaceexplorerapp.client.grid; import java.util.List; import java.util.Set; +import org.gcube.portlets.user.workspaceexplorerapp.client.download.DownloadType; import org.gcube.portlets.user.workspaceexplorerapp.client.event.ClickItemEvent; +import org.gcube.portlets.user.workspaceexplorerapp.client.event.DownloadItemEvent; import org.gcube.portlets.user.workspaceexplorerapp.client.event.LoadFolderEvent; import org.gcube.portlets.user.workspaceexplorerapp.client.event.RightClickItemEvent; import org.gcube.portlets.user.workspaceexplorerapp.shared.Item; @@ -96,7 +98,12 @@ public abstract class AbstractItemsCellTable { Set selected = msm.getSelectedSet(); GWT.log("Double Click: "+selected); if (selected != null && !selected.isEmpty()) { - AbstractItemsCellTable.this.eventBus.fireEvent(new LoadFolderEvent(selected.iterator().next())); + Item item = selected.iterator().next(); + if(item.isFolder() || item.isRoot() || item.isSharedFolder() || item.isSpecialFolder()) + //IN CASE OF FOLDER OPEN IT + AbstractItemsCellTable.this.eventBus.fireEvent(new LoadFolderEvent(selected.iterator().next())); + else //IN CASE OF FILE DOWNLOAD IT... + AbstractItemsCellTable.this.eventBus.fireEvent(new DownloadItemEvent(item, DownloadType.DOWNLOAD)); } } },