details:   https://code.openbravo.com/erp/devel/pi/rev/8d78c37391b6
changeset: 17848:8d78c37391b6
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Mon Sep 03 14:24:49 2012 +0200
summary:   Fixes issue 21491: Callout called even when entering the complete 
list option

If a list option was entered completely using the keyboard (i.e. entering 'EUR' 
in the steps to reproduce example), the callout was not called because the 
change was not detected. This is solved by resetting the _value attribute in 
the function called when a list option is picked.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
 |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r be0721cf3497 -r 8d78c37391b6 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
        Mon Sep 03 13:50:57 2012 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
        Mon Sep 03 14:24:49 2012 +0200
@@ -63,6 +63,11 @@
   // is overridden to keep track that a value has been explicitly picked
   pickValue: function (value) {
     this._pickedValue = true;
+    // force the update of the list
+    // if the user has entered with the keyboard the exact content of a list 
option,
+    // its callout would not be called because the change would not be detected
+    // see issue https://issues.openbravo.com/view.php?id=21491
+    this._value = '';
     this.Super('pickValue', arguments);
     delete this._pickedValue;
     if (this.moveFocusOnPickValue && this.form.focusInNextItem) {

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to