details: /erp/devel/pi/rev/87e52d35324f
changeset: 8785:87e52d35324f
user: David Baz Fayos <david.baz <at> openbravo.com>
date: Tue Nov 02 17:53:24 2010 +0100
summary: Added more security in some 'if' statemets to avoid js error in
strange situations
diffstat:
src/org/openbravo/erpCommon/security/Login_F1.html | 2 +-
web/js/messages.js | 8 ++++----
web/js/utils.js | 8 ++++++--
3 files changed, 11 insertions(+), 7 deletions(-)
diffs (60 lines):
diff -r e4676aaa7be3 -r 87e52d35324f
src/org/openbravo/erpCommon/security/Login_F1.html
--- a/src/org/openbravo/erpCommon/security/Login_F1.html Tue Nov 02
15:50:38 2010 +0100
+++ b/src/org/openbravo/erpCommon/security/Login_F1.html Tue Nov 02
17:53:24 2010 +0100
@@ -121,7 +121,7 @@
clearForm();
} catch (e) {}
setWindowElementFocus('firstElement');
- if ((!revisionControl('8784')) || (isOpsInstance() !=
isOpsInstanceCached())) {
+ if ((!revisionControl('8785')) || (isOpsInstance() !=
isOpsInstanceCached())) {
alert(cacheMsg);
}
diff -r e4676aaa7be3 -r 87e52d35324f web/js/messages.js
--- a/web/js/messages.js Tue Nov 02 15:50:38 2010 +0100
+++ b/web/js/messages.js Tue Nov 02 17:53:24 2010 +0100
@@ -41,15 +41,15 @@
if(typeof getFrame === 'function' && getFrame('frameMenu')) {
arrMessages = getFrame('frameMenu').arrMessages;
- arrTypes = getFrame('frameMenu').arrTypes;
+ arrTypes = getFrame('frameMenu').arrTypes;
} else {
- if (parent.frameMenu) {
+ if (parent && parent.frameMenu) {
arrMessages = parent.frameMenu.arrMessages;
arrTypes = parent.frameMenu.arrTypes;
- } else if (top.opener.parent.frameMenu) {
+ } else if (top && top.opener && top.opener.parent &&
top.opener.parent.frameMenu) {
arrMessages = top.opener.parent.frameMenu.arrMessages;
arrTypes = top.opener.parent.frameMenu.arrTypes;
- } else if (top.opener.top.opener.parent.frameMenu) {
+ } else if (top && top.opener && top.opener.top && top.opener.top.opener &&
top.opener.top.opener.parent && top.opener.top.opener.parent.frameMenu) {
arrMessages = top.opener.top.opener.parent.frameMenu.arrMessages;
arrTypes = top.opener.top.opener.parent.frameMenu.arrTypes;
}
diff -r e4676aaa7be3 -r 87e52d35324f web/js/utils.js
--- a/web/js/utils.js Tue Nov 02 15:50:38 2010 +0100
+++ b/web/js/utils.js Tue Nov 02 17:53:24 2010 +0100
@@ -94,7 +94,7 @@
* Return a number that would be checked at the Login screen to know if the
file is cached with the correct version
*/
function getCurrentRevision() {
- var number = '8784';
+ var number = '8785';
return number;
}
@@ -3229,7 +3229,11 @@
}
}
} else {
- targetFrame = getFrame('main').frames[frameName];
+ if (getFrame('main') && getFrame('main').frames[frameName]) {
+ targetFrame = getFrame('main').frames[frameName];
+ } else {
+ targetFrame = null;
+ }
}
return targetFrame;
}
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits