Fixes issue 18337: Standard (UI Pattern) process definition does not allow collecting record,
authorJavier Etxarri <javier.echarri@openbravo.com>
Thu, 01 Sep 2011 16:46:56 +0200
changeset 13649 db224c38b097
parent 13648 0af160c34527
child 13650 aec4c4f24da5
Fixes issue 18337: Standard (UI Pattern) process definition does not allow collecting record,
id-s of multiple selection (grid view).Now, button are only visible if you have only one record selected.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Thu Sep 01 14:34:57 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Thu Sep 01 16:46:56 2011 +0200
@@ -1007,6 +1007,7 @@
     // This is needed to prevent JSLint complaining about "Don't make functions within a loop.
     var callbackHandler = function (currentContext, me) {
       return function(response, data, request) {
+        var noneOrMultipleRecordsSelected = currentContext.viewGrid.getSelectedRecords().length !== 1 && !isNew;
         var sessionAttributes = data.sessionAttributes, auxInputs = data.auxiliaryInputValues, attachmentExists = data.attachmentExists, prop;
         if (sessionAttributes) {
           currentContext.viewForm.sessionAttributes = sessionAttributes;