diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml index 41a25ed..93a9c2f 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml @@ -84,7 +84,7 @@ Tags: - diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java index 40dc1f1..0ad833f 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java @@ -14,6 +14,8 @@ import com.google.gwt.dom.client.Style.Display; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.FlowPanel; +import com.google.gwt.user.client.ui.InlineLabel; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; @@ -29,13 +31,13 @@ public class MetaDataFieldSkeleton extends Composite{ @UiField Element mandatorySymbol; @UiField SpanElement name; @UiField SimplePanel elementPanel; - @UiField SpanElement noteFieldContainer; - @UiField SpanElement noteField; + @UiField FlowPanel noteFieldContainer; + @UiField InlineLabel noteField; // the element that holds the value (it could be a checkbox, textbox or listbox) private Widget holder; - // the field this object rapresents + // the field this object represents private MetadataFieldWrapper field; public MetaDataFieldSkeleton(MetadataFieldWrapper field) { @@ -100,15 +102,18 @@ public class MetaDataFieldSkeleton extends Composite{ } } + + // set holder width + holder.setWidth("90%"); // set the notes, if any if(field.getNote() != null && !field.getNote().isEmpty()){ - noteField.setInnerText(field.getNote()); - noteFieldContainer.getStyle().setDisplay(Display.INITIAL); + noteField.setText(field.getNote()); + noteFieldContainer.setVisible(true); }else{ - noteFieldContainer.getStyle().setDisplay(Display.NONE); + noteFieldContainer.setVisible(false); } } diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.ui.xml index 2083b8f..58ad535 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.ui.xml @@ -1,20 +1,41 @@ + + + .note-container { + display: inline-block; + float: right; + width: 20%; + color: #aaaaaa; + } + + .note-field-text { + display: inline; + text-align: justify; + margin-left: 5px; + } + + .element-panel { + display: inline-block; + } + * - - + - - - - - - + + + + + + + + +