details:   https://code.openbravo.com/erp/devel/pi/rev/935c3e3fe26d
changeset: 13926:935c3e3fe26d
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue Oct 04 11:33:18 2011 +0200
summary:   Fixes issue 18592: Yes/No filter combo shows double values after 
filtering
AddUnknownValues is set to false, need to override implement isUnknownValue 
method in that case

diffstat:

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

diffs (23 lines):

diff -r a07becfb0865 -r 935c3e3fe26d 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
       Mon Oct 03 18:54:10 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-yesno.js
       Tue Oct 04 11:33:18 2011 +0200
@@ -37,6 +37,19 @@
     }
   },
   
+  // is needed because addUnknownValues is false
+  isUnknownValue: function(enteredValue) {
+    var i, vm = this.getValueMap();
+    if (vm !== null) {
+      for (i = 0; i < vm.length; i++) {
+        if (enteredValue === this.mapValueToDisplay(vm[i])) {
+          return false;
+        }
+      }
+    }
+    return this.Super('isUnknownValue', arguments);
+  },
+  
   mapValueToDisplay: function(value, a, b, c){
     return OB.Utilities.getYesNoDisplayValue(value);
   },

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to