details: /erp/devel/pi/rev/0f3b101fd40c
changeset: 12431:0f3b101fd40c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed May 25 13:38:21 2011 +0200
summary: Fixes issue 17352: Expand and collapse More Information section,
turns the form into Editing in some cases
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
| 2 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 2 +-
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
| 11 ++++++++++
3 files changed, 13 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r 4ca58960e91f -r 0f3b101fd40c
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Wed May 25 13:23:07 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Wed May 25 13:38:21 2011 +0200
@@ -998,7 +998,7 @@
inBlur: false,
// compare while ignoring milli difference
- compareValues : function (value1, value2) {
+ compareValues: function (value1, value2) {
// not a date let the super class do it
if (!isc.isA.Date(value1) || !isc.isA.Date(value2)) {
return this.Super('compareValues', arguments);
diff -r 4ca58960e91f -r 0f3b101fd40c
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Wed May 25 13:23:07 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Wed May 25 13:38:21 2011 +0200
@@ -858,7 +858,7 @@
}
this.setValue(fldName + '_textualValue', textValue);
},
-
+
// called explicitly onblur and when non-editable fields change
handleItemChange: function(item){
// is used to prevent infinite loops during save
diff -r 4ca58960e91f -r 0f3b101fd40c
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
Wed May 25 13:23:07 2011 +0200
+++
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Wed May 25 13:38:21 2011 +0200
@@ -78,6 +78,17 @@
this._original_init();
},
+ // overridden to not make a difference between undefined and null
+ _original_compareValues: isc.FormItem.getPrototype().compareValues,
+ compareValues: function (value1, value2) {
+ var undef, val1NullOrUndefined = (value1 === null || value1 === undef ||
value1 === ''),
+ val2NullOrUndefined = (value2 === null || value2 === undef || value2 ===
'');
+ if (val1NullOrUndefined && val2NullOrUndefined) {
+ return true;
+ }
+ return this._original_compareValues(value1, value2);
+ },
+
_handleTitleClick: isc.FormItem.getPrototype().handleTitleClick,
handleTitleClick: function() {
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits