xlawrence 2005/12/15 16:18:27 CET
Modified files:
core/src/webapp/jsp/jahia/administration work_in_progress.html
Log:
avoid javascript errors print in the console
Revision Changes Path
1.8 +23 -14
jahia/core/src/webapp/jsp/jahia/administration/work_in_progress.html
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/administration/work_in_progress.html.diff?r1=1.7&r2=1.8&f=h
Index: work_in_progress.html
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/webapp/jsp/jahia/administration/work_in_progress.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- work_in_progress.html 15 Dec 2005 14:51:05 -0000 1.7
+++ work_in_progress.html 15 Dec 2005 15:18:27 -0000 1.8
@@ -8,25 +8,33 @@
window.close();
}
function checkWorkInProgress() {
- if (! window.opener) window.close();
- if (! window.opener.location) window.close();
- if (! window.opener.document.mainForm) window.close();
- work_in_progress_oldUrl = window.opener.location.href;
- waitForCloseOpener();
+ try {
+ if (! window.opener) window.close();
+ if (! window.opener.location) window.close();
+ if (! window.opener.document.mainForm) window.close();
+ work_in_progress_oldUrl = window.opener.location.href;
+ waitForCloseOpener();
+ } catch (ex) {
+ window.close();
+ }
}
function waitForCloseOpener() {
- if (! window.opener) window.close();
- if (! window.opener.location) window.close();
- if (! window.opener.document.mainForm) window.close();
+ try {
+ if (! window.opener) window.close();
+ if (! window.opener.location) window.close();
+ if (! window.opener.document.mainForm) window.close();
- var newUrl = window.opener.location.href
- if (newUrl == work_in_progress_oldUrl) {
- if (window.opener.document.mainForm.go &&
window.opener.document.mainForm.go.value == "close") {
+ var newUrl = window.opener.location.href
+ if (newUrl == work_in_progress_oldUrl) {
+ if (window.opener.document.mainForm.go &&
window.opener.document.mainForm.go.value == "close") {
+ window.close();
+ }
+ var timer = setTimeout( "waitForCloseOpener()", 100 );
+ } else {
window.close();
}
- var timer = setTimeout( "waitForCloseOpener()", 100 );
- } else {
+ } catch (ex) {
window.close();
}
} // end WaitForCloseOpener
@@ -35,7 +43,8 @@
</script>
</head>
-<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0" onload="javascript:checkWorkInProgress();">
+<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0"
+ onload="javascript:checkWorkInProgress();">
<center>
<img border="0" src="../engines/images/work_in_progress.gif" width="200"
height="200" alt="">
</center>