diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java index 8a237b3..166d2f9 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java @@ -7,7 +7,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.TreeMap; -import org.gcube.application.geoportalcommon.shared.GeoNaItemRef; +import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences; import org.gcube.application.geoportalcommon.shared.SearchingFilter; import org.gcube.application.geoportalcommon.shared.config.GcubeUserRole; import org.gcube.application.geoportalcommon.shared.config.OPERATION_ON_ITEM; @@ -1413,7 +1413,7 @@ public class GeoPortalDataEntryApp implements EntryPoint { final NewBrowserWindow newBrowserWindow = NewBrowserWindow.open("", "_blank", ""); GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(resultDocumentDV.getId(), - resultDocumentDV.getProfileID(), new AsyncCallback() { + resultDocumentDV.getProfileID(), new AsyncCallback() { @Override public void onFailure(Throwable caught) { hpGetLink.clear(); @@ -1424,7 +1424,7 @@ public class GeoPortalDataEntryApp implements EntryPoint { } @Override - public void onSuccess(GeoNaItemRef result) { + public void onSuccess(GeoportalItemReferences result) { String theURL = result.getRestrictedLink().getShortURL() != null ? result.getRestrictedLink().getShortURL() : result.getRestrictedLink().getCompleteURL(); diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryService.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryService.java index 42bbe28..5d17c0f 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryService.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryService.java @@ -2,7 +2,7 @@ package org.gcube.portlets.user.geoportaldataentry.client; import java.util.List; -import org.gcube.application.geoportalcommon.shared.GeoNaItemRef; +import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences; import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData; import org.gcube.application.geoportalcommon.shared.SearchingFilter; import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV; @@ -52,7 +52,7 @@ public interface GeoportalDataEntryService extends RemoteService { * @return the links for * @throws Exception the exception */ - GeoNaItemRef getLinksFor(String itemId, String profileID) throws Exception; + GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception; /** * Gets the list projects. diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryServiceAsync.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryServiceAsync.java index 734d713..c766468 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryServiceAsync.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoportalDataEntryServiceAsync.java @@ -2,7 +2,7 @@ package org.gcube.portlets.user.geoportaldataentry.client; import java.util.List; -import org.gcube.application.geoportalcommon.shared.GeoNaItemRef; +import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences; import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData; import org.gcube.application.geoportalcommon.shared.SearchingFilter; import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV; @@ -56,7 +56,7 @@ public interface GeoportalDataEntryServiceAsync { void getGeonaInitConfig(AsyncCallback callback); - void getLinksFor(String itemId, String profileID, AsyncCallback callback); + void getLinksFor(String itemId, String profileID, AsyncCallback callback); void getListProjects(String theProfileID, Integer start, Integer limit, SearchingFilter filter, boolean reloadFromService, AsyncCallback callback); diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/relation/ViewRelationshipPanel.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/relation/ViewRelationshipPanel.java index 145718a..d65b82f 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/relation/ViewRelationshipPanel.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/relation/ViewRelationshipPanel.java @@ -96,12 +96,17 @@ public class ViewRelationshipPanel extends Composite { Modal mw = new Modal(true, true); mw.setTitle("Relationships"); - - int width = Window.getClientWidth(); - if(width > 1024) { - width = 1024; - mw.setWidth(width); + + int width = 0; + try { + width = Window.getClientWidth() * 75 / 100; + } catch (Exception e) { + // TODO: handle exception } + + if (width > 500) + mw.setWidth(width); + mw.add(new ViewRelationshipPanel(appManagerBus, fromProject, false)); mw.show(); diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/report/LifecycleInformationPanel.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/report/LifecycleInformationPanel.java index 888d3c2..6a85ea7 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/report/LifecycleInformationPanel.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/report/LifecycleInformationPanel.java @@ -1,6 +1,6 @@ package org.gcube.portlets.user.geoportaldataentry.client.ui.report; -import org.gcube.application.geoportalcommon.shared.GeoNaItemRef; +import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences; import org.gcube.application.geoportalcommon.shared.geoportal.project.LifecycleInformationDV; import org.gcube.portlets.user.geoportaldataentry.client.GeoportalDataEntryServiceAsync; import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.HTMLUtil; @@ -79,7 +79,7 @@ public class LifecycleInformationPanel extends FlowPanel { hpGetLink.add(lc); add(hpGetLink); GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(projectID, profileID, - new AsyncCallback() { + new AsyncCallback() { @Override public void onFailure(Throwable caught) { @@ -88,7 +88,7 @@ public class LifecycleInformationPanel extends FlowPanel { } @Override - public void onSuccess(GeoNaItemRef result) { + public void onSuccess(GeoportalItemReferences result) { hpGetLink.clear(); String theURL = result.getRestrictedLink().getShortURL() != null ? result.getRestrictedLink().getShortURL() diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java index 5cd41e4..940f7c9 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java @@ -23,7 +23,7 @@ import org.gcube.application.geoportalcommon.geoportal.ProjectsCaller; import org.gcube.application.geoportalcommon.geoportal.UseCaseDescriptorCaller; import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile; import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile; -import org.gcube.application.geoportalcommon.shared.GeoNaItemRef; +import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences; import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData; import org.gcube.application.geoportalcommon.shared.SearchingFilter; import org.gcube.application.geoportalcommon.shared.config.GcubeUserRole; @@ -366,14 +366,14 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen * @throws Exception the exception */ @Override - public GeoNaItemRef getLinksFor(String itemId, String profileID) throws Exception { + public GeoportalItemReferences getLinksFor(String itemId, String profileID) throws Exception { LOG.info("getLinksFor called"); SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true); GNADataViewerConfigProfile grViewerProfile = SessionUtil .getGeportalViewerResourceProfile(getThreadLocalRequest()); GeoportalCommon gc = new GeoportalCommon(grViewerProfile); - GeoNaItemRef item = new GeoNaItemRef(itemId, profileID); + GeoportalItemReferences item = new GeoportalItemReferences(itemId, profileID); item = gc.getPublicLinksFor(item, false); LOG.info("Returning: " + item); return item;