details:   https://code.openbravo.com/erp/devel/pi/rev/dc59e523d1cb
changeset: 22844:dc59e523d1cb
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Tue Apr 08 16:15:40 2014 +0200
summary:   fixed bug 26189: filter typed in drop down is cleared

diffstat:

 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
     |  12 ++++++++++
 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
 |   5 ++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diffs (37 lines):

diff -r b0829884d505 -r dc59e523d1cb 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
--- 
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Tue Apr 08 15:32:57 2014 +0200
+++ 
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Tue Apr 08 16:15:40 2014 +0200
@@ -438,6 +438,18 @@
     }
   },
 
+  filterComplete: function () {
+    var ret;
+
+    // Prevents validation of this item while filtering because real value is
+    // not yet set. This also caused form item to be redrawn removing typed 
+    // text for filtering (see issue #26189)
+    this.preventValidation = true;
+    ret = this.Super('filterComplete', arguments);
+    delete this.preventValidation;
+    return ret;
+  },
+
   hidePickListOnBlur: function () {
     // when the form gets redrawn the focus may not be in
     // the item but it is still the item which gets the focus
diff -r b0829884d505 -r dc59e523d1cb 
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
  Tue Apr 08 15:32:57 2014 +0200
+++ 
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
  Tue Apr 08 16:15:40 2014 +0200
@@ -540,6 +540,11 @@
     if (this.form && this.form.grid && this.form.grid._showingEditor) {
       return;
     }
+
+    if (this.preventValidation) {
+      return;
+    }
+
     return this._original_validate();
   },
 

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to