diff --git a/src/main/java/org/sagebionetworks/web/client/GWTWrapperImpl.java b/src/main/java/org/sagebionetworks/web/client/GWTWrapperImpl.java index ac4de7199d..bb392e2fbf 100644 --- a/src/main/java/org/sagebionetworks/web/client/GWTWrapperImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/GWTWrapperImpl.java @@ -34,7 +34,7 @@ public class GWTWrapperImpl implements GWTWrapper { @Override public String getHostPageBaseURL() { - return GWT.getHostPageBaseURL(); + return getHostpageUrl(); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadge.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadge.java index 8ac9903f9f..e29d679787 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadge.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadge.java @@ -215,7 +215,7 @@ public void onFailure(Throwable caught) { } public void onSuccess(AddBatchOfFilesToDownloadListResponse result) { - String href = "DownloadCart:0"; + String href = "/DownloadCart:0"; popupUtils.showInfo( entityHeader.getName() + EntityBadge.ADDED_TO_DOWNLOAD_LIST, href, diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityListRowBadge.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityListRowBadge.java index 7f2eda8803..70fa2c1f46 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityListRowBadge.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityListRowBadge.java @@ -219,7 +219,7 @@ public void onFailure(Throwable caught) { } public void onSuccess(AddBatchOfFilesToDownloadListResponse result) { - String href = "DownloadCart:0"; + String href = "/DownloadCart:0"; popupUtils.showInfo( entityName + EntityBadge.ADDED_TO_DOWNLOAD_LIST, href, diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/ButtonLinkWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/ButtonLinkWidgetViewImpl.java index c547f2b8fd..8973bf4d26 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/ButtonLinkWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/ButtonLinkWidgetViewImpl.java @@ -70,13 +70,17 @@ public ButtonLinkWidgetViewImpl( public void configure( WikiPageKey wikiKey, String buttonText, - final String url, + String url, boolean isHighlight, final boolean openInNewWindow ) { clear(); button.setText(buttonText); if (isHighlight) button.setType(ButtonType.INFO); + // Detect old #!, and direct to the right place + if (url.startsWith("#!")) { + url = "/" + url.substring("#!".length()); + } button.setHref(url); if (openInNewWindow) { button diff --git a/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityBadgeTest.java b/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityBadgeTest.java index 3907b053ae..ed6c8221b8 100644 --- a/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityBadgeTest.java +++ b/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityBadgeTest.java @@ -363,7 +363,7 @@ public void testOnAddToDownloadListV2() { verify(mockPopupUtils) .showInfo( header.getName() + EntityBadge.ADDED_TO_DOWNLOAD_LIST, - "DownloadCart:0", + "/DownloadCart:0", DisplayConstants.VIEW_DOWNLOAD_LIST ); verify(mockEventBus).fireEvent(any(DownloadListUpdatedEvent.class)); diff --git a/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityListRowBadgeTest.java b/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityListRowBadgeTest.java index 8423f95fc6..775341eadb 100644 --- a/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityListRowBadgeTest.java +++ b/src/test/java/org/sagebionetworks/web/unitclient/widget/entity/EntityListRowBadgeTest.java @@ -286,7 +286,7 @@ public void testOnAddToDownloadListV2() { verify(mockPopupUtils) .showInfo( entityName + EntityBadge.ADDED_TO_DOWNLOAD_LIST, - "DownloadCart:0", + "/DownloadCart:0", DisplayConstants.VIEW_DOWNLOAD_LIST ); verify(mockEventBus).fireEvent(any(DownloadListUpdatedEvent.class));