Feature #5207 completed
Updated pom version at 6.17.0 git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@148922 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9f542d3b99
commit
8ef26bdf7a
|
@ -1,9 +1,14 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-17-0"
|
||||
date="2017-05-22">
|
||||
<Change>[Feature #5207] Integrate Image Preview Widget</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-16-1"
|
||||
date="2017-04-11">
|
||||
<Change>Quick fix to set folder as public</Change>
|
||||
<Change>Updated messages to history including version of file if it is
|
||||
present</Change>
|
||||
present
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-16-0"
|
||||
date="2017-03-03">
|
||||
|
|
13
pom.xml
13
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>workspace-tree-widget</artifactId>
|
||||
<version>6.16.1-SNAPSHOT</version>
|
||||
<version>6.17.0-SNAPSHOT</version>
|
||||
<name>gCube Workspace Tree Widget</name>
|
||||
<description>
|
||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||
|
@ -132,12 +132,11 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Auth Framework -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.gcube.common</groupId> -->
|
||||
<!-- <artifactId>authorization-client</artifactId> -->
|
||||
<!-- <scope>provided</scope> -->
|
||||
<!-- </dependency> -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>image-previewer-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- HOME LIBRARY -->
|
||||
<dependency>
|
||||
|
|
|
@ -12,17 +12,23 @@
|
|||
<inherits name='com.extjs.gxt.ui.GXT' />
|
||||
<inherits name='org.gcube.portal.clientcontext.GCubeClientContext' />
|
||||
|
||||
<inherits name="org.gcube.portlets.widgets.workspacesharingwidget.WorkspaceSharingWidget" />
|
||||
<inherits
|
||||
name="org.gcube.portlets.widgets.workspacesharingwidget.WorkspaceSharingWidget" />
|
||||
|
||||
<servlet path="/WorkspaceService" class="org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl" />
|
||||
<inherits name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader"></inherits>
|
||||
<inherits name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
|
||||
<servlet path="/WorkspaceService"
|
||||
class="org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl" />
|
||||
<inherits
|
||||
name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader"></inherits>
|
||||
<inherits
|
||||
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
|
||||
|
||||
<servlet path="/DownloadService"
|
||||
class="org.gcube.portlets.user.workspace.server.DownloadServlet" />
|
||||
<servlet path="/ImageService"
|
||||
class="org.gcube.portlets.user.workspace.server.ImageServlet" />
|
||||
|
||||
<inherits name="org.gcube.portlets.widgets.imagepreviewerwidget.ImagePreviewer" />
|
||||
|
||||
<!-- Specify the application specific style sheet. -->
|
||||
<stylesheet src='workspacetree.css' />
|
||||
|
||||
|
|
|
@ -1519,7 +1519,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onSuccess(GWTWorkspaceItem item) {
|
||||
GWT.log("Image loaded: "+item.toString());
|
||||
GWT.log("Image loaded: "+item.getName() + " label: "+item.getLabel());
|
||||
if(fileModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.IMAGE_DOCUMENT))
|
||||
new WindowImagePreview(fileModel.getName(), (GWTImageDocument) item, positionX, positionY);
|
||||
else
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
package org.gcube.portlets.user.workspace.client.view.windows;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.client.workspace.folder.item.GWTExternalImage;
|
||||
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTImageDocument;
|
||||
import org.gcube.portlets.widgets.imagepreviewerwidget.client.EnhancedImage;
|
||||
import org.gcube.portlets.widgets.imagepreviewerwidget.client.ui.Carousel;
|
||||
|
||||
import com.extjs.gxt.ui.client.widget.Window;
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
|
@ -36,9 +41,10 @@ public class WindowImagePreview {
|
|||
initWindow(name, positionX, positionY);
|
||||
window.add(loader);
|
||||
Image img = new Image(image.getThumbnailUrl());
|
||||
|
||||
img.setWidth(String.valueOf(image.getThumbnailWidth()));
|
||||
img.setHeight(String.valueOf(image.getThumbnailHeight()));
|
||||
log("Thumbnail URL: "+image.getThumbnailUrl());
|
||||
GWT.log("Thumbnail URL 1: "+image.getThumbnailUrl());
|
||||
Image loadImg = new Image(image.getThumbnailUrl());
|
||||
|
||||
loadImg.addLoadHandler(new LoadHandler() {
|
||||
|
@ -71,11 +77,14 @@ public class WindowImagePreview {
|
|||
// System.out.println("postionX.................." + positionX);
|
||||
// System.out.println("positionY.................." + positionY);
|
||||
|
||||
Image img = new Image(image.getThumbnailUrl());
|
||||
img.setWidth(String.valueOf(image.getThumbnailWidth()));
|
||||
img.setHeight(String.valueOf(image.getThumbnailHeight()));
|
||||
window.add(new Image(image.getThumbnailUrl()));
|
||||
window.show();
|
||||
// Image img = new Image(image.getThumbnailUrl());
|
||||
// GWT.log("Thumbnail URL 2: "+image.getThumbnailUrl());
|
||||
//// img.setWidth(String.valueOf(image.getThumbnailWidth()));
|
||||
//// img.setHeight(String.valueOf(image.getThumbnailHeight()));
|
||||
// window.add(img);
|
||||
// window.show();
|
||||
|
||||
showCarousel(name, image.getThumbnailUrl(), positionX, positionY);
|
||||
|
||||
}
|
||||
|
||||
|
@ -97,6 +106,18 @@ public class WindowImagePreview {
|
|||
window.setPosition(positionX, positionY);
|
||||
}
|
||||
|
||||
private void showCarousel(
|
||||
String imageTitle, String imageURL, int positionX, int positionY) {
|
||||
Carousel carousel = new Carousel();
|
||||
List<EnhancedImage> list = new ArrayList<EnhancedImage>();
|
||||
GWT.log("Generating imageURL: "+imageURL);
|
||||
EnhancedImage myimg = new EnhancedImage(imageURL, imageTitle, imageTitle);
|
||||
list.add(myimg);
|
||||
carousel.updateImages(list);
|
||||
carousel.hideArrows();
|
||||
carousel.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Log.
|
||||
*
|
||||
|
|
|
@ -173,4 +173,6 @@ public abstract class GWTWorkspaceItem implements IsSerializable {
|
|||
return isLoading;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue