details:   https://code.openbravo.com/erp/devel/pi/rev/942524b9dfc0
changeset: 21401:942524b9dfc0
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Wed Oct 30 12:50:08 2013 +0530
summary:   Fixes Issue 0024783: Time fields are not refreshed on value change 
through an event handler

The time fields were not updated when updated through event handlers.
Used the formSaved event to check the fields current value and the data 
returned value and setting the new field value from data.

diffstat:

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

diffs (17 lines):

diff -r 2ee927aad7a2 -r 942524b9dfc0 
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
        Tue Oct 29 17:52:39 2013 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
        Wed Oct 30 12:50:08 2013 +0530
@@ -147,7 +147,12 @@
       this.timeGrid.updatePosition();
     }
     return this.Super('moved', arguments);
-  }
+  },
+  formSaved: function (request, response, data) {
+    if (this.getValue() && data[this.name] && this.getValue() !== 
data[this.name]) {
+      this.setValue(data[this.name]);
+    }
+  },
 });
 
 

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to