Fixes issue 27017: Callouts of combos on manual forms does not work properly
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 04 Aug 2014 14:10:59 +0200
changeset 24156 4f449d9a56f7
parent 24155 28068c12e140
child 24157 4882d76b8d6a
Fixes issue 27017: Callouts of combos on manual forms does not work properly

The original problem was that the response of the callout was not being applied to the proper iFrame. To solve this, the activeFrame attribute was created to know which frame is active at any given time, in order to apply the callout response in that frame.

The problem of this issue is that the activeFrame was not being stored properly when opening a new manual window.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js	Mon Aug 04 11:24:21 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js	Mon Aug 04 14:10:59 2014 +0200
@@ -354,7 +354,9 @@
       while (parentFrame.name !== '') {
         parentFrame = parentFrame.parent;
       }
-      parentFrame.activeFrame = iFrame;
+      if (parentFrame.parent) {
+        parentFrame.parent.activeFrame = iFrame;
+      }
     }
   }
 });