Author: xlawrence
Date: Thu Aug 17 11:34:40 2006
New Revision: 14929

URL: https://svndev.jahia.net/websvn/listing.php?sc=1&rev=14929&repname=jahia
Log:
always automatically close the work_in_progress window if it stays open for 15 
seconds

Modified:
    trunk/core/src/webapp/jsp/jahia/administration/work_in_progress.html

Modified: trunk/core/src/webapp/jsp/jahia/administration/work_in_progress.html
URL: 
https://svndev.jahia.net/websvn/diff.php?path=/trunk/core/src/webapp/jsp/jahia/administration/work_in_progress.html&rev=14929&repname=jahia
==============================================================================
--- trunk/core/src/webapp/jsp/jahia/administration/work_in_progress.html 
(original)
+++ trunk/core/src/webapp/jsp/jahia/administration/work_in_progress.html Thu 
Aug 17 11:34:40 2006
@@ -7,6 +7,9 @@
         window.onerror = function(){
             window.close();
         }
+
+        var currentTime = 0;
+
         function checkWorkInProgress() {
             try {
                 if (! window.opener) window.close();
@@ -20,6 +23,7 @@
         }
 
         function waitForCloseOpener() {
+            if (currentTime >= 15000) window.close();
             try {
                 if (! window.opener) window.close();
                 if (! window.opener.location) window.close();
@@ -30,7 +34,8 @@
                     if (window.opener.document.mainForm.go && 
window.opener.document.mainForm.go.value == "close") {
                         window.close();
                     }
-                    var timer = setTimeout( "waitForCloseOpener()", 100 );
+                    currentTime += 100;
+                    setTimeout( "waitForCloseOpener()", 100 );
                 } else {
                     window.close();
                 }

Reply via email to