Related to issue 21697: Numeric filters are executed when they lose the focus
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 28 Sep 2012 10:09:48 +0200
changeset 18068 e3837a02a9d5
parent 18067 35d251a9e659
child 18069 fe3bcfb01f48
Related to issue 21697: Numeric filters are executed when they lose the focus

Now, the numeric filter will be applied not only when the Enter key is pressed, but also when the focus leaves the filter.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Thu Sep 27 17:13:54 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Fri Sep 28 10:09:48 2012 +0200
@@ -577,6 +577,12 @@
     return ret;
   },
 
+  // If the filter has not been applied yet, apply it when it loses the focus
+  blur: function () {
+    this.form.grid.performAction();
+    return this.Super('blur', arguments);
+  },
+
   convertToStringValue: function (value) {
     var type = this.typeInstance;
     if (!isc.isA.String(value)) {