details: https://code.openbravo.com/erp/devel/pi/rev/54a304b3a7ab changeset: 14837:54a304b3a7ab user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Thu Nov 24 11:47:05 2011 +0100 summary: fixed bug 18561: Time reference showed incorrectly in Process Request window
Setting isc.DataSource.serializeTimeAsDatetime=true so time references are sent as complete UTC date time rather than just truncating timezone information. Formatting it properly in the FIC response. details: https://code.openbravo.com/erp/devel/pi/rev/a9240f520945 changeset: 14838:a9240f520945 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Thu Dec 01 10:09:16 2011 +0100 summary: fixed bug 19158: Incorrect processes are not failing in smartbuild -smartbuild detects now processes not in menu -new build validation complains about Standard UI processes without java details: https://code.openbravo.com/erp/devel/pi/rev/f5b8096eafc0 changeset: 14839:f5b8096eafc0 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Thu Dec 01 10:34:43 2011 +0100 summary: fixed bug 11541: Defer button in registration popup has no identifier details: https://code.openbravo.com/erp/devel/pi/rev/27caa9812cd1 changeset: 14840:27caa9812cd1 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Thu Dec 01 10:54:12 2011 +0100 summary: fixed bug 19111: Filters in query widgets shouldn't be shown in workspace diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js | 18 ++++++- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js | 3 +- modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java | 12 +---- modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js | 11 ++-- modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java | 11 +++++ modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js | 2 + src-wad/src/org/openbravo/wad/ActionButton_Relation_data.xsql | 2 - src-wad/src/org/openbravo/wad/validation/WADValidationResult.java | 3 +- src-wad/src/org/openbravo/wad/validation/WADValidator.java | 18 ++++++++ src-wad/src/org/openbravo/wad/validation/WADValidator_data.xsql | 22 ++++++++++ src/org/openbravo/erpCommon/ad_forms/Heartbeat.html | 1 + 11 files changed, 80 insertions(+), 23 deletions(-) diffs (237 lines): diff -r 516b2ef77059 -r 27caa9812cd1 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js Fri Dec 09 20:49:26 2011 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js Thu Dec 01 10:54:12 2011 +0100 @@ -30,16 +30,26 @@ shortTimeFormat: 'HH:MM:SS', long24TimeFormat: 'HH:MM:SS', longTimeFormat: 'HH:MM:SS', + // make sure that the undo/save buttons get enabled, needs to be done like - // this because changeOnKeypress is false + // this because changeOnKeypress is false. Activating changeOnKeypress makes the + // item not editable as it is reformatted on keyStroke, the same happens calling + // from this method form.itemChangeActions keyPress: function(item, form, keyName, characterValue){ + var i, f = this.form, + toolBarButtons = f.view.toolBar.leftMembers; + if (characterValue || keyName === 'Backspace' || keyName === 'Delete') { - if (this.form.itemChangeActions) { - this.form.itemChangeActions(); + f.setHasChanged(true); + f.view.messageBar.hide(); + for (i = 0; i < toolBarButtons.leftMembers.length; i++) { + if (toolBarButtons.leftMembers[i].updateState) { + toolBarButtons.leftMembers[i].updateState(); + } } } - return this.Super('keyPress', arguments); + this.Super('keyPress', arguments); } }); diff -r 516b2ef77059 -r 27caa9812cd1 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Fri Dec 09 20:49:26 2011 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Thu Dec 01 10:54:12 2011 +0100 @@ -899,7 +899,8 @@ } else if (columnValue.value || columnValue.value === 0 || columnValue.value === false) { isDate = field.type && (isc.SimpleType.getType(field.type).inheritsFrom === 'date' || - isc.SimpleType.getType(field.type).inheritsFrom === 'datetime'); + isc.SimpleType.getType(field.type).inheritsFrom === 'datetime' || + isc.SimpleType.getType(field.type).inheritsFrom === 'time'); if (isDate) { this.setItemValue(field.name, isc.Date.parseSchemaDate(columnValue.value)); } else if(columnValue.hasDateDefault){ diff -r 516b2ef77059 -r 27caa9812cd1 modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java --- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java Fri Dec 09 20:49:26 2011 +0100 +++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java Thu Dec 01 10:54:12 2011 +0100 @@ -31,7 +31,7 @@ */ public class TimeUIDefinition extends UIDefinition { private SimpleDateFormat classicFormat = null; - private SimpleDateFormat xmlTimeFormat = JsonUtils.createTimeFormat(); + private SimpleDateFormat xmlTimeFormat = JsonUtils.createJSTimeFormat(); @Override public String getParentType() { @@ -72,15 +72,9 @@ if (value == null || value.length() == 0 || value.equals("null")) { return null; } - // sometimes the default value gets passed which is already in the correct - // format, in that case just use that. - if (value.indexOf(":") == 2 && value.indexOf(":", 3) == 5) { - if (!value.contains("+") && !value.contains("-")) { - return value + "+00:00"; - } - return value; - } + final java.util.Date date = getClassicFormat().parse(value); + return xmlTimeFormat.format(date); } catch (Exception e) { throw new OBException("Exception when handling value " + value, e); diff -r 516b2ef77059 -r 27caa9812cd1 modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js --- a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js Fri Dec 09 20:49:26 2011 +0100 +++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js Thu Dec 01 10:54:12 2011 +0100 @@ -96,13 +96,12 @@ height: '100%', width: '100%', styleName: '' - }), url, params = {}; + }), url, params = {}, + showFilter = this.viewMode === 'maximized'; - if (this.viewMode === 'maximized') { - isc.addProperties(this.gridProperties, { - showFilterEditor: true - }); - } + isc.addProperties(this.gridProperties, { + showFilterEditor: showFilter + }); this.grid = isc.OBQueryListGrid.create(isc.addProperties({ dataSource: this.gridDataSource, diff -r 516b2ef77059 -r 27caa9812cd1 modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java --- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java Fri Dec 09 20:49:26 2011 +0100 +++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java Thu Dec 01 10:54:12 2011 +0100 @@ -70,6 +70,17 @@ } /** + * @return a new instance of the {@link SimpleDateFormat} using a format of yyyy-MM-dd'T'HH:mm:ss + * (see http://www.w3.org/TR/xmlschema-2/#dateTime). The date format has lenient set to + * true. + */ + public static SimpleDateFormat createJSTimeFormat() { + final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); + dateFormat.setLenient(true); + return dateFormat; + } + + /** * Note the formatted date string must be repaired in the timezone to follow the XSD format, see: * {@link #convertToCorrectXSDFormat(String)}. * diff -r 516b2ef77059 -r 27caa9812cd1 modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js --- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js Fri Dec 09 20:49:26 2011 +0100 +++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js Thu Dec 01 10:54:12 2011 +0100 @@ -31,6 +31,8 @@ // NOTE: disabled as now timezone is send from the client to the server // Time.setDefaultDisplayTimezone(0); +isc.DataSource.serializeTimeAsDatetime=true; + isc.Canvas.addProperties({ // make sure that the datasources are also destroyed diff -r 516b2ef77059 -r 27caa9812cd1 src-wad/src/org/openbravo/wad/ActionButton_Relation_data.xsql --- a/src-wad/src/org/openbravo/wad/ActionButton_Relation_data.xsql Fri Dec 09 20:49:26 2011 +0100 +++ b/src-wad/src/org/openbravo/wad/ActionButton_Relation_data.xsql Thu Dec 01 10:54:12 2011 +0100 @@ -138,14 +138,12 @@ <![CDATA[ SELECT count(*) as total FROM AD_PROCESS P, - AD_MENU M, AD_SYSTEM_INFO SI WHERE P.isactive = 'Y' AND (P.PROCEDURENAME IS NOT NULL OR P.IsJasper = 'Y' OR (P.UIPattern = 'S' AND (P.IsJasper = 'N' AND P.PROCEDURENAME IS NULL))) - and P.ad_process_id = m.ad_process_id and (p.UPDATED>SI.LAST_BUILD or exists (Select 1 from AD_Process_Para pp diff -r 516b2ef77059 -r 27caa9812cd1 src-wad/src/org/openbravo/wad/validation/WADValidationResult.java --- a/src-wad/src/org/openbravo/wad/validation/WADValidationResult.java Fri Dec 09 20:49:26 2011 +0100 +++ b/src-wad/src/org/openbravo/wad/validation/WADValidationResult.java Thu Dec 01 10:54:12 2011 +0100 @@ -49,7 +49,8 @@ SQL("SQL"), MISSING_IDENTIFIER("Missing Identifier"), MISSING_KEY("Missing Key Column"), MODEL_OBJECT( "Model Object"), MODEL_OBJECT_MAPPING("HTML Mapping"), COLUMN_NAME("Column Naming"), AUXILIARINPUT( "Auxiliary Input Name"), MULTIPLE_KEYS("Multiple Key Columns in Table"), BASEREFERENCE_WITH_PARENT( - "Base Reference with Parent Reference"); + "Base Reference with Parent Reference"), PROCESS_WITHOUT_CLASS( + "Standard UI Processes without class"); private String description; diff -r 516b2ef77059 -r 27caa9812cd1 src-wad/src/org/openbravo/wad/validation/WADValidator.java --- a/src-wad/src/org/openbravo/wad/validation/WADValidator.java Fri Dec 09 20:49:26 2011 +0100 +++ b/src-wad/src/org/openbravo/wad/validation/WADValidator.java Thu Dec 01 10:54:12 2011 +0100 @@ -63,6 +63,7 @@ validateColumnNaming(result); validateAuxiliarInput(result); validateReferences(result); + validateProcessWithoutClass(result); return result; } @@ -192,4 +193,21 @@ } + /** + * Validates all UI Standard processes define a process class to execute + * + * @param result + */ + private void validateProcessWithoutClass(WADValidationResult result) { + try { + WADValidatorData data[] = WADValidatorData.checkProcessClasses(conn, modules, checkAll); + for (WADValidatorData issue : data) { + result.addError(issue.moduleid, issue.modulename, WADValidationType.PROCESS_WITHOUT_CLASS, + issue.objectname + " process does not define a Java class to implement it."); + } + } catch (Exception e) { + result.addWarning(WADValidationType.SQL, + "Error when executing query for validating references: " + e.getMessage()); + } + } } diff -r 516b2ef77059 -r 27caa9812cd1 src-wad/src/org/openbravo/wad/validation/WADValidator_data.xsql --- a/src-wad/src/org/openbravo/wad/validation/WADValidator_data.xsql Fri Dec 09 20:49:26 2011 +0100 +++ b/src-wad/src/org/openbravo/wad/validation/WADValidator_data.xsql Thu Dec 01 10:54:12 2011 +0100 @@ -300,4 +300,26 @@ <Parameter name="checkAll"/> </SqlMethod> + <SqlMethod name="checkProcessClasses" type="preparedStatement" return="multiple"> + <Sql> + <![CDATA[ + select p.name as objectName, m.name as moduleName, m.ad_module_id as moduleId + from ad_process p, ad_module m + where p.isactive='Y' + and p.UIPattern = 'S' + and (p.IsJasper = 'N' AND p.PROCEDURENAME IS NULL) + and m.ad_module_id = p.ad_module_id + and (m.javapackage in ('1') or to_char('Y')=to_char(?)) + and not exists (select 1 + from ad_model_object mo + where p.ad_process_id = mo.ad_process_id + and mo.isactive = 'Y' + and mo.action = 'P' + and mo.isdefault = 'Y') + ]]> + </Sql> + <Parameter name="module" optional="true" type="replace" after="m.javapackage in (" text="'1'"/> + <Parameter name="checkAll"/> + </SqlMethod> + </SqlClass> diff -r 516b2ef77059 -r 27caa9812cd1 src/org/openbravo/erpCommon/ad_forms/Heartbeat.html --- a/src/org/openbravo/erpCommon/ad_forms/Heartbeat.html Fri Dec 09 20:49:26 2011 +0100 +++ b/src/org/openbravo/erpCommon/ad_forms/Heartbeat.html Thu Dec 01 10:54:12 2011 +0100 @@ -201,6 +201,7 @@ <td class="Button_LeftAlign_ContentCell"> <div id="deferButton"> <button type="button" + id="buttonDefer" class="ButtonLink" onclick="deferDecline('DEFER');return false;" onfocus="buttonEvent('onfocus', this); window.status='Later'; return true;" ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits