+
+
diff --git a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties
index 104f33cd0b4..a668534beec 100644
--- a/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties
+++ b/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/i18n/Messages.properties
@@ -478,6 +478,9 @@ Choices.columnAlign.right=right
#59. dateTimeFormat
Choices.dateTimeFormat.unformatted=Unformatted
+Choices.dateTimeFormat.datePicker.mediumDate=Date Picker, Medium Date
+Choices.dateTimeFormat.datePicker.shortTime=Date Picker, Short Time
+Choices.dateTimeFormat.datePicker.mediumTime=Date Picker, Medium Time
Choices.dateTimeFormat.generalDate=General Date
Choices.dateTimeFormat.longDate=Long Date
Choices.dateTimeFormat.mediumDate=Medium Date
@@ -489,6 +492,7 @@ Choices.dateTimeFormat.custom=Custom
#59. dateFormat
Choices.dateFormat.unformatted=Unformatted
+Choices.dateFormat.datePicker.mediumDate=Date Picker, Medium Date
Choices.dateFormat.generalDate=General Date
Choices.dateFormat.longDate=Long Date
Choices.dateFormat.mediumDate=Medium Date
@@ -497,6 +501,8 @@ Choices.dateFormat.custom=Custom
#59. timeFormat
Choices.timeFormat.unformatted=Unformatted
+Choices.timeFormat.timePicker.shortTime=Time Picker, Short Time
+Choices.timeFormat.timePicker.mediumTime=Time Picker, Medium Time
Choices.timeFormat.longTime=Long Time
Choices.timeFormat.mediumTime=Medium Time
Choices.timeFormat.shortTime=Short Time
diff --git a/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/ProjectAnalysis.java b/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/ProjectAnalysis.java
index 9abf17de26d..dddb497001f 100644
--- a/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/ProjectAnalysis.java
+++ b/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/ProjectAnalysis.java
@@ -208,7 +208,7 @@ void buildStyles() throws SemanticException {
StyleHandle style4 = elementFactory.newStyle("Date");
style4.setDateTimeFormat("MM-dd-yyyy");
- style4.setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ style4.setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
designHandle.getStyles().add(style1);
designHandle.getStyles().add(style2);
@@ -644,7 +644,7 @@ void buildBodyGrid() throws SemanticException {
row4Cell4Data.setStyleName("Date");
row4Cell4Data.setProperty(StyleHandle.FONT_FAMILY_PROP, "Georgia");
row4Cell4Data.setProperty(StyleHandle.FONT_SIZE_PROP, DesignChoiceConstants.FONT_SIZE_SMALLER);
- row4Cell4Data.getPrivateStyle().setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ row4Cell4Data.getPrivateStyle().setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
row4Cell4Data.getPrivateStyle().setDateTimeFormat("$###,###.00");
row4Cell4Data.setValueExpr("row[\"Value\"]");
@@ -708,7 +708,7 @@ void buildBodyGrid() throws SemanticException {
row5Cell4Data.setStyleName("Date");
row5Cell4Data.setProperty(StyleHandle.FONT_FAMILY_PROP, "Georgia");
row5Cell4Data.setProperty(StyleHandle.FONT_SIZE_PROP, DesignChoiceConstants.FONT_SIZE_SMALLER);
- row5Cell4Data.getPrivateStyle().setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ row5Cell4Data.getPrivateStyle().setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
row5Cell4Data.getPrivateStyle().setDateTimeFormat("$###,###.00");
row5Cell4Data.setValueExpr("row[\"Billing\"]");
diff --git a/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/Sample2.java b/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/Sample2.java
index 47a82825aaf..0d2b5ac3331 100644
--- a/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/Sample2.java
+++ b/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/APISamples/Sample2.java
@@ -816,17 +816,17 @@ void buildTheme() throws SemanticException {
// style "year"
SharedStyleHandle year = libraryFactory.newStyle("year");
year.setDateTimeFormat("yyyy");
- year.setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ year.setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
// style "Month"
SharedStyleHandle month = libraryFactory.newStyle("month");
month.setDateTimeFormat("MM");
- month.setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ month.setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
// style "day"
SharedStyleHandle day = libraryFactory.newStyle("day");
day.setDateTimeFormat("dd");
- day.setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ day.setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
// style "TransactionType"
SharedStyleHandle transaction = libraryFactory.newStyle("TransactionType");
diff --git a/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/api/DynamicParameterTest.java b/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/api/DynamicParameterTest.java
index 19333db46da..a82ff4bd3ed 100644
--- a/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/api/DynamicParameterTest.java
+++ b/testsuites/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/api/DynamicParameterTest.java
@@ -104,8 +104,8 @@ public void testPropertiesOfDynamicParameter() throws Exception {
handle.setDefaultValue("10/15/2005");
assertEquals("10/15/2005", handle.getDefaultValue());
- handle.setCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE);
- assertEquals(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE, handle.getCategory());
+ handle.setCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_LONG_DATE);
+ assertEquals(DesignChoiceConstants.DATETIME_FORMAT_TYPE_LONG_DATE, handle.getCategory());
handle.setListlimit(20);
assertEquals(20, handle.getListlimit());
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
index f24fe0fed95..6cf1dc90358 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
+++ b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
@@ -1082,6 +1082,8 @@ private static ParameterDefinition convertScalarParameter(IScalarParameterDefn e
long id = scalarParamHandle != null ? scalarParamHandle.getID() : 0L;
String pattern = scalarParamHandle == null ? "" //$NON-NLS-1$
: scalarParamHandle.getPattern();
+ String category = scalarParamHandle == null ? "" //$NON-NLS-1$
+ : scalarParamHandle.getCategory();
String displayFormat = engineParam.getDisplayFormat();
String displayName = engineParam.getDisplayName();
String helpText = engineParam.getHelpText();
@@ -1102,7 +1104,8 @@ private static ParameterDefinition convertScalarParameter(IScalarParameterDefn e
isMultiValue = DesignChoiceConstants.SCALAR_PARAM_TYPE_MULTI_VALUE
.equalsIgnoreCase(scalarParamHandle.getParamType());
}
- ParameterDefinition param = new ParameterDefinition(id, name, pattern, displayFormat, displayName, helpText,
+ ParameterDefinition param = new ParameterDefinition(id, name, category, pattern, displayFormat, displayName,
+ helpText,
promptText, dataType, valueExpr, controlType, hidden, allowNull, allowBlank, isRequired, mustMatch,
concealValue, distinct, isMultiValue, group, null);
return param;
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/api/ParameterDefinition.java b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/api/ParameterDefinition.java
index ee0a35ecd5f..059d170308b 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/api/ParameterDefinition.java
+++ b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/api/ParameterDefinition.java
@@ -50,6 +50,8 @@ public class ParameterDefinition {
private String name;
+ private String category;
+
private String pattern;
private String displayFormat;
@@ -86,12 +88,14 @@ public class ParameterDefinition {
private Collection selectionList;
- public ParameterDefinition(long id, String name, String pattern, String displayFormat, String displayName,
+ public ParameterDefinition(long id, String name, String category, String pattern, String displayFormat,
+ String displayName,
String helpText, String promptText, int dataType, String valueExpr, int controlType, boolean hidden,
boolean allowNull, boolean allowBlank, boolean isRequired, boolean mustMatch, boolean concealValue,
boolean distinct, boolean isMultiValue, ParameterGroupDefinition group, Collection selectionList) {
this.id = id;
this.name = name;
+ this.category = category;
this.pattern = pattern;
this.displayFormat = displayFormat;
this.displayName = displayName;
@@ -123,6 +127,10 @@ public String getName() {
return name;
}
+ public String getCategory() {
+ return category;
+ }
+
public String getPattern() {
return pattern;
}
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/DataUtil.java b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/DataUtil.java
index e17efd04839..62e8b180529 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/DataUtil.java
+++ b/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/DataUtil.java
@@ -286,7 +286,7 @@ public static Object validateWithLocale(String dataType, String format, String v
} else if (DesignChoiceConstants.PARAM_TYPE_TIME.equalsIgnoreCase(dataType)) {
format = ParameterValidationUtil.DISPLAY_TIME_FORMAT;
} else if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equalsIgnoreCase(dataType)) {
- format = DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTED;
+ format = DesignChoiceConstants.DATETIME_FORMAT_TYPE_UNFORMATTED;
}
}
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/index.jsp b/viewer/org.eclipse.birt.report.viewer/birt/index.jsp
index 63aa5aee974..526df03b33b 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/index.jsp
+++ b/viewer/org.eclipse.birt.report.viewer/birt/index.jsp
@@ -1,4 +1,4 @@
-
+
Eclipse BIRT Home
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtParameterDialog.js b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtParameterDialog.js
index f83c6c75729..ff348966025 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtParameterDialog.js
+++ b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtParameterDialog.js
@@ -1276,6 +1276,7 @@ BirtParameterDialog.prototype = Object.extend( new AbstractParameterDialog( ),
var temp = Event.element( event );
var oInput = temp.parentNode.getElementsByTagName( "input" );
var oSelect = temp.parentNode.getElementsByTagName( "select" );
+ var aInputTextTypes = ["text", "password", "date", "datetime", "datetime-local", "time"];
// check if current parameter is cascading parameter
var oCascadeFlag = false;
@@ -1294,7 +1295,7 @@ BirtParameterDialog.prototype = Object.extend( new AbstractParameterDialog( ),
var element = oInput[i - 1];
if( !oInput[i].checked ) {
- if(element && ( element.type == "text" || element.type == "password" ) )
+ if(element && aInputTextTypes.includes(element.type))
{
element.disabled = false;
element.focus( );
@@ -1316,7 +1317,7 @@ BirtParameterDialog.prototype = Object.extend( new AbstractParameterDialog( ),
}
}
} else {
- if( element && ( element.type == "text" || element.type == "password" ) )
+ if( element && aInputTextTypes.includes(element.type))
{
element.disabled = true;
// if cascading parameter, clear value
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/layout/FramesetFragment.jsp b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/layout/FramesetFragment.jsp
index 273602aad3f..1fbe78f1fb4 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/layout/FramesetFragment.jsp
+++ b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/layout/FramesetFragment.jsp
@@ -37,13 +37,14 @@
<%-----------------------------------------------------------------------------
Viewer root fragment
-----------------------------------------------------------------------------%>
-
+
<%= ParameterAccessor.htmlEncode( attributeBean.getReportTitle( ) ) %>
+
<%
if( attributeBean.isRtl() )
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/parameter/TextBoxParameterFragment.jsp b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/parameter/TextBoxParameterFragment.jsp
index 9b592e3de4d..fc32256e3d5 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/parameter/TextBoxParameterFragment.jsp
+++ b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/pages/parameter/TextBoxParameterFragment.jsp
@@ -12,7 +12,8 @@
<%@ page session="false" buffer="none" %>
<%@ page import="org.eclipse.birt.report.utility.ParameterAccessor,
org.eclipse.birt.report.context.BaseAttributeBean,
- org.eclipse.birt.report.context.ScalarParameterBean"
+ org.eclipse.birt.report.context.ScalarParameterBean,
+ org.eclipse.birt.report.service.api.ParameterDefinition"
%>
<%-----------------------------------------------------------------------------
@@ -49,8 +50,41 @@
">
- "
+
+ TYPE="date"
+ <%
+ } else if ( parameterBean.getParameter().getDataType() == ParameterDefinition.TYPE_DATE_TIME
+ && parameterBean.getParameter().getCategory().startsWith("Date Picker") ) {
+ %>
+ TYPE="datetime-local"
+ <% if (parameterBean.getParameter().getCategory().contains("Medium Time")) { %>
+ step="1"
+ <%} %>
+ <%
+ } else if ( parameterBean.getParameter().getDataType() == ParameterDefinition.TYPE_TIME
+ && parameterBean.getParameter().getCategory().startsWith("Time Picker") ) {
+ %>
+ TYPE="time"
+ <% if (parameterBean.getParameter().getCategory().contains("Medium Time")) { %>
+ step="1"
+ <%} %>
+ <%
+ } else if ( parameterBean.isValueConcealed() ) {
+ %>
+ TYPE="password"
+ <%
+ } else {
+ %>
+ TYPE="text"
+ <%
+ }
+ %>
NAME="<%= encodedParameterName %>"
ID="<%= encodedParameterName %>"
TITLE="<%= parameterBean.getToolTip( ) %>"
diff --git a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/styles/style.css b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/styles/style.css
index 7c6734fb2e8..7604f5e9a09 100644
--- a/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/styles/style.css
+++ b/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/styles/style.css
@@ -36,7 +36,7 @@
.BirtViewer_parameter_dialog_Input
{
font-family: Arial;
- font-size: 8pt;
+ font-size: 8.5pt;
width: 68%;
padding: 4px 4px;
margin: 4px 0;
@@ -48,7 +48,7 @@
.birtviewer_parameter_dialog_Select
{
font-family: Arial;
- font-size: 8pt;
+ font-size: 8.5pt;
width: 68%;
padding: 4px 4px;
margin: 4px 0;
@@ -60,7 +60,7 @@
.birtviewer_parameter_dialog_Label
{
font-family: Arial;
- font-size: 8pt;
+ font-size: 8.5pt;
}
@@ -309,7 +309,7 @@ input[type="text"]:focus {
width: 100%;
height: 100%;
font-family: Arial;
- font-size: 8pt;
+ font-size: 8.5pt;
}
.birtviewer_dialog_button
diff --git a/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/editors/model/CrosstabAdaptUtil.java b/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/editors/model/CrosstabAdaptUtil.java
index 9f3bf4c68ed..e8355950142 100644
--- a/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/editors/model/CrosstabAdaptUtil.java
+++ b/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/editors/model/CrosstabAdaptUtil.java
@@ -182,7 +182,7 @@ public static DataItemHandle createColumnBindingAndDataItem(ReportItemHandle own
levelHandle.getName(), LevelAttribute.DATE_TIME_ATTRIBUTE_NAME));
dataHandle.getPrivateStyle()
- .setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ .setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
dataHandle.getPrivateStyle().setDateTimeFormat(levelHandle.getDateTimeFormat());
}
}
@@ -228,7 +228,7 @@ public static DataItemHandle createColumnBindingAndDataItem(ReportItemHandle own
if (LevelAttribute.DATE_TIME_ATTRIBUTE_NAME.equals(levelAttrHandle.getName())) {
bindingHandle.setDataType(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME);
- dataHandle.getPrivateStyle().setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ dataHandle.getPrivateStyle().setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
dataHandle.getPrivateStyle().setDateTimeFormat(levelHandle.getDateTimeFormat());
} else {
bindingHandle.setDataType(levelAttrHandle.getDataType());
diff --git a/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/util/CrosstabUIHelper.java b/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/util/CrosstabUIHelper.java
index ff36a625904..aba87beb04a 100644
--- a/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/util/CrosstabUIHelper.java
+++ b/xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/util/CrosstabUIHelper.java
@@ -206,7 +206,7 @@ public static DataItemHandle createColumnBindingAndDataItemForSubTotal(ReportIte
levelHandle.getName(), LevelAttribute.DATE_TIME_ATTRIBUTE_NAME));
dataHandle.getPrivateStyle()
- .setDateTimeFormatCategory(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM);
+ .setDateTimeFormatCategory(DesignChoiceConstants.DATETIME_FORMAT_TYPE_CUSTOM);
dataHandle.getPrivateStyle().setDateTimeFormat(levelHandle.getDateTimeFormat());
}
}
|