details: https://code.openbravo.com/erp/devel/pi/rev/3afb79bd3730 changeset: 15642:3afb79bd3730 user: David Baz Fayos <david.baz <at> openbravo.com> date: Wed Feb 29 00:35:04 2012 +0100 summary: Related to issue 19854: Clarification comment added
diffstat: src/org/openbravo/base/secureApp/PopUp_Response.html | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diffs (29 lines): diff -r 1ac5c5ca6841 -r 3afb79bd3730 src/org/openbravo/base/secureApp/PopUp_Response.html --- a/src/org/openbravo/base/secureApp/PopUp_Response.html Tue Feb 28 17:46:59 2012 +0100 +++ b/src/org/openbravo/base/secureApp/PopUp_Response.html Wed Feb 29 00:35:04 2012 +0100 @@ -1,6 +1,6 @@ <!-- ************************************************************************************ - * Copyright (C) 2001-2011 Openbravo S.L.U. + * Copyright (C) 2001-2012 Openbravo S.L.U. * Licensed under the Apache Software License version 2.0 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software distributed @@ -22,11 +22,16 @@ var process, layoutMDI, classicMode = false; + // If the function is invoked from a 3.0 environment where this html is executed in a modal + // popup, and the application has been opened trough a link, top.opener could cause a browser + // security exception if the opener link was in a different host. The only way to avoid this is + // situation and let the flow continue, is trough a try-catch try { if (top && top.opener && top.opener.submitCommandForm) { classicMode = true; } - } catch (e) {} + } catch (e) {} // No need to do anything here, if the try fails because the previous described + // situation, it means that we are in 3.0 and we already have "classicMode = false" if (classicMode) { // 2.50 popup process ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
