css fixed

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@129830 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-07-04 09:50:49 +00:00
parent f00498b4b0
commit f0ab36c234
3 changed files with 41 additions and 15 deletions

View File

@ -84,7 +84,7 @@
Tags:
</b:ControlLabel>
<b:Controls>
<b:TextBox alternateSize="LARGE"
<b:TextBox width="70%"
placeholder="Enter one or more tag for the product" b:id="tags"
ui:field="tagsEnterTextBox" />
<span style="float:right; width:256px; color: #aaaaaa;">

View File

@ -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);
}
}

View File

@ -1,20 +1,41 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
<ui:style>
.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;
}
</ui:style>
<g:HTMLPanel>
<b:ControlGroup>
<b:ControlLabel>
<font color="red" ui:field="mandatorySymbol">*</font>
<!-- Name goes here -->
<span ui:field="name"></span>
<span ui:field="name"></span>
</b:ControlLabel>
<b:Controls>
<!-- Listbox or Checkbox or Textbox according to isBoolean field -->
<g:SimplePanel ui:field="elementPanel" ></g:SimplePanel>
<span style="float:right; width:256px; color: #aaaaaa;" ui:field="noteFieldContainer" display="none">
<b:Icon type="INFO_SIGN" size="TWO_TIMES"/>
<span ui:field="noteField" visible="false"></span>
</span>
<g:FlowPanel width="90%">
<g:SimplePanel ui:field="elementPanel" styleName="{style.element-panel}" width="80%">
<!-- Listbox or Checkbox or Textbox according to isBoolean field -->
</g:SimplePanel>
<g:FlowPanel ui:field="noteFieldContainer" styleName="{style.note-container}">
<b:Icon type="INFO_SIGN" size="TWO_TIMES" />
<g:InlineLabel ui:field="noteField" styleName="{style.note-field-text}"></g:InlineLabel>
</g:FlowPanel>
</g:FlowPanel>
</b:Controls>
</b:ControlGroup>
</g:HTMLPanel>