fixed hour and minutes viewer

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@133398 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-10-22 14:05:40 +00:00
parent bd85d7b595
commit ce389ed195
2 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,6 @@ import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Widget;
@SuppressWarnings("deprecation")
public class DataTimeBox extends Composite{
private static DataTimeBoxUiBinder uiBinder = GWT
@ -26,7 +25,7 @@ public class DataTimeBox extends Composite{
private static final String MINOR_HYPHEN = "-";
private static final String COLON = ":";
private static final String INSERT_DATE_INSTANT_LABEL = "Insert a date";
private static final String INSERT_TIME_INSTANT_LABEL = "Insert hour and minutes";
private static final String INSERT_TIME_INSTANT_LABEL = "Hour and minutes";
private static final String INSERT_DATE_START_LABEL = "Insert a start date";
private static final String INSERT_DATE_END_LABEL = "Insert an end date";
private static final DateTimeFormat formatDate = DateTimeFormat.getFormat("yyyy/MM/dd");
@ -51,16 +50,15 @@ public class DataTimeBox extends Composite{
initWidget(uiBinder.createAndBindUi(this));
this.isRange = isRange;
startRangeDate.setPlaceholder(INSERT_DATE_INSTANT_LABEL);
singleDataEnd.setWidth("50%");
startRangeTime.setPlaceholder(INSERT_TIME_INSTANT_LABEL);
if(isRange){
singleDataEnd.setVisible(true);
singleDataEnd.setWidth("50%");
singleDataStart.setWidth("50%");
startRangeDate.setPlaceholder(INSERT_DATE_START_LABEL);
endRangeDate.setPlaceholder(INSERT_DATE_END_LABEL);
endRangeTime.setPlaceholder(INSERT_TIME_INSTANT_LABEL);
}
startRangeTime.setPlaceholder(INSERT_TIME_INSTANT_LABEL);
endRangeTime.setPlaceholder(INSERT_TIME_INSTANT_LABEL);
startRangeDate.setValue(null);
startRangeTime.setValue(null);
endRangeDate.setValue(null);

View File

@ -14,14 +14,16 @@
<b3:DateBox format="yyyy/mm/dd" autoClose="true"
language="en" ui:field="startRangeDate" width="40%" />
<b2:DateTimeBox format="hh:ii" autoClose="true"
language="en" width="15%" ui:field="startRangeTime" />
maxView="HOUR" startView="HOUR" highlightToday="false" language="en"
width="15%" ui:field="startRangeTime" />
</g:FlowPanel>
<g:FlowPanel ui:field="singleDataEnd" visible="false"
styleName="{style.flow-panel-style}">
<b3:DateBox format="yyyy/mm/dd" autoClose="true" width="40%"
language="en" ui:field="endRangeDate" />
<b2:DateTimeBox format="hh:ii" autoClose="true"
language="en" width="15%" ui:field="endRangeTime" />
maxView="HOUR" startView="HOUR" highlightToday="false" language="en"
width="15%" ui:field="endRangeTime" />
</g:FlowPanel>
</g:FlowPanel>
</g:HTMLPanel>