|
|
|
@ -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<Item> 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));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|