diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index b83d38d..07d3f48 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,5 +1,7 @@ - + + + @@ -129,7 +131,9 @@ - + + + @@ -259,7 +263,9 @@ - + + + @@ -389,7 +395,9 @@ - + + + @@ -519,7 +527,9 @@ - + + + @@ -649,7 +659,9 @@ - + + + @@ -668,10 +680,18 @@ uses + + uses + + + uses + uses - + + + @@ -801,7 +821,9 @@ - + + + @@ -931,7 +953,9 @@ - + + + @@ -1061,7 +1085,9 @@ - + + + diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/cms/project/ProjectViewer.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/cms/project/ProjectViewer.java index c582248..0ecf7e1 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/cms/project/ProjectViewer.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/cms/project/ProjectViewer.java @@ -152,7 +152,7 @@ public class ProjectViewer extends Composite { @Override public void onSuccess(Boolean result) { GWT.log("Export as PDF visible: " + result); - exportButton.setEnabled(result); + exportButton.setVisible(result); } }); @@ -207,7 +207,7 @@ public class ProjectViewer extends Composite { exportButton.setType(ButtonType.LINK); exportButton.setIcon(IconType.FILE); exportButton.setTitle("Export as PDF"); - exportButton.setEnabled(false); + exportButton.setVisible(false); exportButton.addClickHandler(new ClickHandler() { @@ -240,46 +240,8 @@ public class ProjectViewer extends Composite { builder.append(GeoportalDataViewerConstants.USER_ID_PARAMETER + "=" + currentUserId); String geoportalExportActionServlet = builder.toString(); - -// Method httpMethod = RequestBuilder.GET; -// RequestBuilder requestBuilder = new RequestBuilder(httpMethod, geoportalExportActionServlet); - + NewBrowserWindow.open(geoportalExportActionServlet, "_blank", ""); - -// try { -// requestBuilder.sendRequest("", new RequestCallback() { -// -// @Override -// public void onResponseReceived(Request request, Response response) { -// newBrowserWindow.setUrl(geoportalExportActionServlet); -// -// } -// -// @Override -// public void onError(Request request, Throwable exception) { -// newBrowserWindow.close(); -// Modal errorModal = new Modal(true, true); -// errorModal.setCloseVisible(true); -// errorModal.setTitle("Oops..."); -// Image geoportalError = new Image(GeoportalImages.ICONS.warningError()); -// FlowPanel errorPanelMsg = new FlowPanel(); -// errorPanelMsg.getElement().addClassName("general_warning"); -// errorPanelMsg.add(geoportalError); -// errorPanelMsg.add(new HTML("D4S GeoPortal")); -// HTML erroMessage = new HTML( -// "Oops something went wrong, error occurred when exporting the project. Error is: " -// + exception.getMessage()); -// errorPanelMsg.add(erroMessage); -// errorModal.add(errorPanelMsg); -// errorModal.show(); -// -// } -// -// }); -// } catch (RequestException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } } });