details: https://code.openbravo.com/erp/devel/pi/rev/b6e87275bb35
changeset: 24078:b6e87275bb35
user: David Baz Fayos <david.baz <at> openbravo.com>
date: Fri Jul 18 13:21:34 2014 +0200
summary: Fixed issue 12479: Openbravo ERP now can run inside an iframe
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-test-registry.js
| 8 ++++++--
web/js/utils.js
| 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 8994a8efdb5e -r b6e87275bb35
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-test-registry.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-test-registry.js
Fri Jul 18 12:28:40 2014 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-test-registry.js
Fri Jul 18 13:21:34 2014 +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) 2010-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -31,7 +31,11 @@
};
}
- var fullUrl = parent.document.URL;
+ var fullUrl = document.URL;
+ try {
+ // To avoid problems trying to run the ERP inside an iframe. Issue 12479
+ fullUrl = parent.document.URL;
+ } catch (ignore) {}
var queryString = fullUrl.substring(fullUrl.indexOf('?') + 1,
fullUrl.length);
var isTestEnvironment = queryString.indexOf('test=true') !== -1;
if (isTestEnvironment || OB.Application.testEnvironment) {
diff -r 8994a8efdb5e -r b6e87275bb35 web/js/utils.js
--- a/web/js/utils.js Fri Jul 18 12:28:40 2014 +0200
+++ b/web/js/utils.js Fri Jul 18 13:21:34 2014 +0200
@@ -3305,6 +3305,7 @@
try {
targetFrame = parent;
while (targetFrame !== null && targetFrame !== targetFrame.parent
&& !LayoutMDICheck(targetFrame)) {
+ var dummy = targetFrame.parent.document;
targetFrame = targetFrame.parent;
}
} catch (e) {
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits