minor fixes (also changed the go to product button to a link)

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@133400 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-10-22 15:51:43 +00:00
parent f2f25b9a0a
commit 3bf7b03a4b
4 changed files with 12 additions and 9 deletions

View File

@ -805,11 +805,13 @@ public class CreateDatasetForm extends Composite{
// show the go to dataset button
final String datasetUrl = createdDatasetBean.getSource();
goToDatasetButton.setVisible(true);
goToDatasetButton.setText(datasetUrl);
goToDatasetButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Window.Location.assign(datasetUrl);
Window.open(datasetUrl, "_blank", "");
//Window.Location.assign(datasetUrl);
}
});

View File

@ -360,8 +360,8 @@
block="true">Go
Back</b:Button>
<b:Button title="Go to product" ui:field="goToDatasetButton"
block="true" visible="false">Go to Product</b:Button>
<b:Button title="Go to product" ui:field="goToDatasetButton" type="LINK"
block="true" visible="false"></b:Button>
</b:Fieldset>
</b:Form>

View File

@ -41,7 +41,7 @@ public class AddResourceToDataset extends Composite{
// the dataset id
private String datasetId;
// the dataset organization
private String datasetOrg;
@ -62,14 +62,15 @@ public class AddResourceToDataset extends Composite{
// save dataset id (it is needed when we will add resources)
this.datasetId = datasetId;
this.datasetOrg = datasetOrg;
this.datasetOrg = datasetOrg;
goToDatasetButton.setText(datasetUrl);
goToDatasetButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Window.Location.assign(datasetUrl);
Window.open(datasetUrl, "_blank", "");
// Window.Location.assign(datasetUrl);
}
});
}

View File

@ -95,7 +95,7 @@
</b:Fieldset>
</b:Form>
<b:Button title="Go to Product" ui:field="goToDatasetButton"
block="true" visible="true">Go to Product</b:Button>
<b:Button title="Go to Product" ui:field="goToDatasetButton" type="LINK"
block="true" visible="true"></b:Button>
</g:HTMLPanel>
</ui:UiBinder>