Francesco Mangiacrapa 2018-03-07 16:46:01 +00:00
parent 9e497e92a6
commit 8ce1471696
4 changed files with 19 additions and 6 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/workspace-explorer-app-1.0.2-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/workspace-explorer-app-1.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/workspace-explorer-app-1.0.2-SNAPSHOT/WEB-INF/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/workspace-explorer-app-1.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -33,5 +33,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/workspace-explorer-app-1.0.2-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/workspace-explorer-app-1.2.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,7 +1,13 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.portlets-user.workspace-explorer-app.1-2-0"
date="2018-03-07">
<Change>[Feature #11374] Download items with double click
</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-explorer-app.1-1-0" <Changeset component="org.gcube.portlets-user.workspace-explorer-app.1-1-0"
date="2017-10-11"> date="2017-10-11">
<Change>[Feature #9926] read the scope from environment variable</Change> <Change>[Feature #9926] read the scope from environment variable
</Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.portlets-user.workspace-explorer-app.1-0-2" <Changeset component="org.gcube.portlets-user.workspace-explorer-app.1-0-2"
date="2017-10-10"> date="2017-10-10">

View File

@ -9,7 +9,7 @@
</parent> </parent>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-explorer-app</artifactId> <artifactId>workspace-explorer-app</artifactId>
<version>1.1.0-SNAPSHOT</version> <version>1.2.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<description> <description>

View File

@ -3,7 +3,9 @@ package org.gcube.portlets.user.workspaceexplorerapp.client.grid;
import java.util.List; import java.util.List;
import java.util.Set; 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.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.LoadFolderEvent;
import org.gcube.portlets.user.workspaceexplorerapp.client.event.RightClickItemEvent; import org.gcube.portlets.user.workspaceexplorerapp.client.event.RightClickItemEvent;
import org.gcube.portlets.user.workspaceexplorerapp.shared.Item; import org.gcube.portlets.user.workspaceexplorerapp.shared.Item;
@ -96,7 +98,12 @@ public abstract class AbstractItemsCellTable {
Set<Item> selected = msm.getSelectedSet(); Set<Item> selected = msm.getSelectedSet();
GWT.log("Double Click: "+selected); GWT.log("Double Click: "+selected);
if (selected != null && !selected.isEmpty()) { 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));
} }
} }
}, },