details: /erp/devel/pi/rev/8d880348b69e
changeset: 12686:8d880348b69e
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jun 03 07:07:20 2011 +0200
summary: Fixes issue 17482: Readonly logic does not result in disabling of
fields
details: /erp/devel/pi/rev/2687297908b4
changeset: 12687:2687297908b4
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jun 03 07:10:23 2011 +0200
summary: Fixes issue 17483: Focus is not placed in edit field if there are
read only fields dynamically disabled
details: /erp/devel/pi/rev/e001e3c8176c
changeset: 12688:e001e3c8176c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Fri Jun 03 07:11:12 2011 +0200
summary: Fixes issue 17134: The Datasource seems to be sending dates without
correct time zone information, Fixes issue 17189: Time stamp attachment
incorrect
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
| 13 +++++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 8 ++--
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
| 16 +--------
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
| 4 +-
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
| 6 +---
modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
| 8 ++--
modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
| 4 +-
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
| 5 +-
8 files changed, 30 insertions(+), 34 deletions(-)
diffs (186 lines):
diff -r a24916c2b2be -r e001e3c8176c
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
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
Fri Jun 03 07:11:12 2011 +0200
@@ -29,6 +29,17 @@
short24TimeFormat: 'HH:MM:SS',
shortTimeFormat: 'HH:MM:SS',
long24TimeFormat: 'HH:MM:SS',
- longTimeFormat: '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
+ keyPress: function(item, form, keyName, characterValue){
+ if (characterValue || keyName === 'Backspace' || keyName === 'Delete') {
+ if (this.form.itemChangeActions) {
+ this.form.itemChangeActions();
+ }
+ }
+ return this.Super('keyPress', arguments);
+ }
});
diff -r a24916c2b2be -r e001e3c8176c
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
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Fri Jun 03 07:11:12 2011 +0200
@@ -317,14 +317,14 @@
var errorFld = this.getFirstErrorItem();
if (errorFld && errorFld.isFocusable()) {
- this.setFocusInItem(errorFld, true);
+ this.setFocusInItem(errorFld, this.view.isActiveView());
return;
}
if (this.forceFocusedField) {
item = this.getItem(this.forceFocusedField);
if(item && item.isFocusable()) {
- this.setFocusInItem(item, true);
+ this.setFocusInItem(item, this.view.isActiveView());
delete this.forceFocusedField;
return;
}
@@ -334,7 +334,7 @@
if (this.firstFocusedField) {
item = this.getItem(this.firstFocusedField);
if(item && item.isFocusable()) {
- this.setFocusInItem(item);
+ this.setFocusInItem(item, this.view.isActiveView());
return;
}
}
@@ -356,7 +356,7 @@
if (!nextItem && item === startItem) {
nextItem = true;
} else if (nextItem && item.isFocusable()) {
- this.setFocusInItem(item);
+ this.setFocusInItem(item, this.view.isActiveView());
return;
}
}
diff -r a24916c2b2be -r e001e3c8176c
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Fri Jun 03 07:11:12 2011 +0200
@@ -1661,19 +1661,9 @@
},
convertContextValue: function(value, type) {
- if (isc.isA.Date(value)) {
- var ret, isTime = type && isc.SimpleType.getType(type).inheritsFrom ===
'time';
- if (isTime) {
- return value.getUTCHours() + ':' + value.getUTCMinutes() + ':' +
value.getUTCSeconds();
- } else {
- // this prevents strange timezone issues, the result is a timezoneless
- // string
- var oldXMLSchemaMode = isc.Comm.xmlSchemaMode;
- isc.Comm.xmlSchemaMode = true;
- ret = value.toSerializeableDate();
- isc.Comm.xmlSchemaMode = oldXMLSchemaMode;
- return ret;
- }
+ var isTime = isc.isA.Date(value) && type &&
isc.SimpleType.getType(type).inheritsFrom === 'time';
+ if (isTime) {
+ return value.getUTCHours() + ':' + value.getUTCMinutes() + ':' +
value.getUTCSeconds();
}
return value;
},
diff -r a24916c2b2be -r e001e3c8176c
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
Fri Jun 03 07:11:12 2011 +0200
@@ -825,10 +825,8 @@
// >30 days: months
var now = new Date(),
- // created is in gmt
- /// our local date has a time zone difference, correct for it
msCreated = created.getTime(),
- msNow = now.getTime() + (-1 * now.getTimezoneOffset() * 60000),
+ msNow = now.getTime(),
n;
// time difference in days
diff -r a24916c2b2be -r e001e3c8176c
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
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
Fri Jun 03 07:11:12 2011 +0200
@@ -72,9 +72,6 @@
if (value == null || value.length() == 0 || value.equals("null")) {
return null;
}
- if (value.contains("T")) {
- return value;
- }
// 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) {
@@ -84,8 +81,7 @@
return value;
}
final java.util.Date date = getClassicFormat().parse(value);
- // always return in gmt
- return xmlTimeFormat.format(date) + "+00:00";
+ return xmlTimeFormat.format(date);
} catch (Exception e) {
throw new OBException("Exception when handling value " + value, e);
}
diff -r a24916c2b2be -r e001e3c8176c
modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
---
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
Fri Jun 03 07:11:12 2011 +0200
@@ -233,11 +233,11 @@
final Class<?> clz = property.getPrimitiveObjectType();
if (Date.class.isAssignableFrom(clz)) {
if (property.getDomainType() instanceof TimestampDomainType) {
- // always assume gmt for times
- return xmlTimeFormat.format(value) + "+00:00";
+ final String formattedValue = xmlTimeFormat.format(value);
+ return JsonUtils.convertToCorrectXSDFormat(formattedValue);
} else if (property.isDatetime() ||
Timestamp.class.isAssignableFrom(clz)) {
- // always assume gmt for times
- return xmlDateTimeFormat.format(value) + "+00:00";
+ final String formattedValue = xmlDateTimeFormat.format(value);
+ return JsonUtils.convertToCorrectXSDFormat(formattedValue);
} else {
return xmlDateFormat.format(value);
}
diff -r a24916c2b2be -r e001e3c8176c
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
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
Fri Jun 03 07:11:12 2011 +0200
@@ -64,7 +64,7 @@
* date format has lenient set to true.
*/
public static SimpleDateFormat createTimeFormat() {
- final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
+ final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ssZZZZZ");
dateFormat.setLenient(true);
return dateFormat;
}
@@ -79,7 +79,7 @@
public static SimpleDateFormat createDateTimeFormat() {
// Note users of this method will also use the convertToCorrectXSDFormat
// method
- final SimpleDateFormat dateFormat = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+ final SimpleDateFormat dateFormat = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZZZZZ");
dateFormat.setLenient(true);
return dateFormat;
}
diff -r a24916c2b2be -r e001e3c8176c
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
Thu Jun 02 21:20:24 2011 +0200
+++
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Fri Jun 03 07:11:12 2011 +0200
@@ -28,7 +28,8 @@
// We have dates/times in the database without timezone, we assume GMT
therefore
// for all our date/times we use GMT on both the server and the client
// NOTE: causes issue https://issues.openbravo.com/view.php?id=16014
-Time.setDefaultDisplayTimezone(0);
+// NOTE: disabled as now timezone is send from the client to the server
+// Time.setDefaultDisplayTimezone(0);
//Let the click on an ImgButton and Button fall through to its action method
isc.ImgButton.addProperties({
@@ -149,7 +150,7 @@
this.canFocus = false;
return true;
}
- var disabled = this.form.readOnly || this.readonly;
+ var disabled = this.form.readOnly || this.readonly || this.disabled;
// allow focus if all items are disabled
// note: see the ob-view-form.js resetCanFocus method
this.canFocus = this.form.allItemsDisabled || !disabled;
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits