209: TDM - Show the resources through a ListView widget

Task-Url: https://support.d4science.org/issues/209

Updated resources support

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-resources-widget@115416 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-06-16 16:02:36 +00:00
parent 5d62cd263c
commit e4481a3502
11 changed files with 42 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTD;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor;
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType;
import org.gcube.portlets.user.td.resourceswidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.resourceswidget.client.resources.ResourceBundle;
import org.gcube.portlets.user.td.widgetcommonevent.shared.mime.MimeTypeSupport;
import com.google.gwt.safehtml.shared.SafeUri; import com.google.gwt.safehtml.shared.SafeUri;
import com.google.gwt.safehtml.shared.UriUtils; import com.google.gwt.safehtml.shared.UriUtils;
@ -133,6 +134,20 @@ public class ResourcesListViewDetailPanel extends SimpleContainer {
&& internalURITD.getThumbnailTD().getUrl() != null) { && internalURITD.getThumbnailTD().getUrl() != null) {
thumbnailPath = UriUtils.fromTrustedString(internalURITD thumbnailPath = UriUtils.fromTrustedString(internalURITD
.getThumbnailTD().getUrl()); .getThumbnailTD().getUrl());
} else {
if (internalURITD.getMimeType() != null) {
if (internalURITD.getMimeType().compareTo(
MimeTypeSupport._gif.getMimeName()) == 0
|| internalURITD.getMimeType().compareTo(
MimeTypeSupport._jpg.getMimeName()) == 0
|| internalURITD.getMimeType().compareTo(
MimeTypeSupport._png.getMimeName()) == 0
|| internalURITD.getMimeType().compareTo(
MimeTypeSupport._bmp.getMimeName()) == 0) {
thumbnailPath = ResourceBundle.INSTANCE.picture160()
.getSafeUri();
}
}
} }
} }

View File

@ -467,6 +467,20 @@ public class ResourcesListViewPanel extends FramedPanel {
&& internalURITD.getThumbnailTD().getUrl() != null) { && internalURITD.getThumbnailTD().getUrl() != null) {
thumbnailPath = UriUtils.fromTrustedString(internalURITD thumbnailPath = UriUtils.fromTrustedString(internalURITD
.getThumbnailTD().getUrl()); .getThumbnailTD().getUrl());
} else {
if (internalURITD.getMimeType() != null) {
if (internalURITD.getMimeType().compareTo(
MimeTypeSupport._gif.getMimeName()) == 0
|| internalURITD.getMimeType().compareTo(
MimeTypeSupport._jpg.getMimeName()) == 0
|| internalURITD.getMimeType().compareTo(
MimeTypeSupport._png.getMimeName()) == 0
|| internalURITD.getMimeType().compareTo(
MimeTypeSupport._bmp.getMimeName()) == 0) {
thumbnailPath = ResourceBundle.INSTANCE.picture80()
.getSafeUri();
}
}
} }
} }

View File

@ -167,6 +167,19 @@ public interface ResourceBundle extends ClientBundle {
@Source("file_160.png") @Source("file_160.png")
ImageResource file160(); ImageResource file160();
@Source("picture.png")
ImageResource picture();
@Source("picture_32.png")
ImageResource picture32();
@Source("picture_80.png")
ImageResource picture80();
@Source("picture_160.png")
ImageResource picture160();
@Source("magnifier-zoom-in_32.png") @Source("magnifier-zoom-in_32.png")
ImageResource magnifierZoomIn32(); ImageResource magnifierZoomIn32();

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB