details:   https://code.openbravo.com/erp/devel/pi/rev/cae716b1b753
changeset: 22870:cae716b1b753
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Mon Apr 14 14:38:22 2014 +0200
summary:   Fixed issue 26243: The time inserted in abs time field is not 
changed anymore
if the input lose the focus when the current DST is different than 1-1-1970

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
 |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 7b986e0bf0ef -r cae716b1b753 
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
        Mon Apr 14 18:00:50 2014 +0530
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
        Mon Apr 14 14:38:22 2014 +0200
@@ -93,14 +93,20 @@
       value = isc.Time.parseInput(value);
     }
     if (value && isc.isA.Date(value)) {
+      if (this.isAbsoluteTime) {
+        value = OB.Utilities.Date.addTimezoneOffset(value);
+      }
       this.setTodaysDate(value);
+      if (this.isAbsoluteTime) {
+        value = OB.Utilities.Date.substractTimezoneOffset(value);
+      }
     }
     return this.Super('setValue', arguments);
   },
 
   getValue: function () {
     var value = this.Super('getValue', arguments);
-    if (value && isc.isA.Date(value)) {
+    if (value && isc.isA.Date(value) && !this.isAbsoluteTime) {
       this.setTodaysDate(value);
     }
     return value;

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to