Fixes issue 19830: message shown when using enter key to exit an invalid row
authorAugusto Mauch <augusto.mauch@openbravo.com>
Thu, 13 Sep 2012 15:54:51 +0200
changeset 17941 163c8afae1d7
parent 17940 32b2e7f42f70
child 17942 05beb7bb79c2
Fixes issue 19830: message shown when using enter key to exit an invalid row

When a row was saved by pushing the Enter key while editing it, the validation of the form was not being done. This has been fixed by doing the validation in the cellEditEnd function when the editCompletionEvent is 'enter'
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Sep 11 18:33:05 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Thu Sep 13 15:54:51 2012 +0200
@@ -2207,6 +2207,11 @@
       return;
     }
 
+    if (enterKey) {
+      // See issue https://issues.openbravo.com/view.php?id=19830
+      this.view.standardWindow.getDirtyEditForm().validateForm();
+    }
+
     this._leavingCell = true;
 
     if (newValue) {