fixes bug 29006: provide info of the pressed button in client side validations
authorCarlos Aristu <carlos.aristu@openbravo.com>
Mon, 24 Apr 2017 10:25:52 +0200
changeset 31976 b4e2c3368a10
parent 31975 9c529a8c8b8d
child 31977 9b4f2a32e438
fixes bug 29006: provide info of the pressed button in client side validations
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Fri Apr 21 14:28:27 2017 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Mon Apr 24 10:25:52 2017 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2016 Openbravo SLU
+ * All portions are Copyright (C) 2012-2017 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -316,7 +316,7 @@
 
   doProcess: function (btnValue) {
     var i, tmp, view = this,
-        grid, allProperties, selection, len, allRows, params, tab, actionHandlerCall, clientSideValidationFail, selectedRecords, recordIds;
+        grid, allProperties, selection, len, allRows, params, tab, actionHandlerCall, clientSideValidationFail, selectedRecords, recordIds, additionalInfo;
 
     if (this.button && this.button.multiRecord) {
       selectedRecords = this.buttonOwnerView.viewGrid.getSelectedRecords();
@@ -363,7 +363,9 @@
       clientSideValidationFail = function () {
         view.setAllButtonEnabled(view.allRequiredParametersSet());
       };
-      this.clientSideValidation(this, actionHandlerCall, clientSideValidationFail);
+      additionalInfo = {};
+      additionalInfo.buttonValue = allProperties._buttonValue;
+      this.clientSideValidation(this, actionHandlerCall, clientSideValidationFail, additionalInfo);
     } else {
       actionHandlerCall();
     }