diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java index ab0e45b..90a25ea 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java @@ -44,6 +44,7 @@ import com.github.gwtbootstrap.client.ui.constants.ControlGroupType; import com.github.gwtbootstrap.client.ui.resources.Bootstrap.Tabs; import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.SelectElement; +import com.google.gwt.dom.client.Style.Float; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; @@ -901,7 +902,11 @@ public class CreateDatasetForm extends Composite{ final String datasetUrl = createdDatasetBean.getSource(); goToDatasetButtonPanel.setVisible(true); goToDatasetButton.setVisible(true); - goToDatasetButton.setText(datasetUrl); + goToDatasetButton.getElement().getStyle().setFloat(Float.LEFT); + goToDatasetButton.setText( + (datasetUrl.length() > 100 ? + datasetUrl.substring(0, 100) + "..." : datasetUrl) + ); goToDatasetButton.setHref(datasetUrl); goToDatasetButton.addClickHandler(new ClickHandler() { diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java index 8095cf1..968053c 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java @@ -11,6 +11,7 @@ import com.github.gwtbootstrap.client.ui.TextArea; import com.github.gwtbootstrap.client.ui.TextBox; import com.github.gwtbootstrap.client.ui.constants.AlertType; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Style.Float; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.shared.HandlerManager; @@ -64,7 +65,11 @@ public class AddResourceToDataset extends Composite{ this.datasetId = datasetId; this.datasetOrg = datasetOrg; - goToDatasetButton.setText(datasetUrl); + goToDatasetButton.getElement().getStyle().setFloat(Float.LEFT); + goToDatasetButton.setText( + (datasetUrl.length() > 100 ? + datasetUrl.substring(0, 100) + "..." : datasetUrl) + ); goToDatasetButton.setHref(datasetUrl); goToDatasetButton.addClickHandler(new ClickHandler() {