A few more replacements of Horde_Util::closeWindowJS()
authorChuck Hagenbuch <chuck@horde.org>
Mon, 7 Jun 2010 02:12:41 +0000 (22:12 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Mon, 7 Jun 2010 02:12:41 +0000 (22:12 -0400)
hermes/start.php
trean/add.php
trean/edit.php

index b208f53..32c314d 100644 (file)
@@ -34,7 +34,10 @@ if ($form->validate($vars)) {
                           'time' => $now);
     $prefs->setValue('running_timers', serialize($timers), false);
 
-    Horde_Util::closeWindowJS('alert(\'' . addslashes(sprintf(_("The stop watch \"%s\" has been started and will appear in the sidebar at the next refresh."), $vars->get('description'))) . '\');');
+    echo Horde::wrapInlineScript(array(
+        'alert(\'' . addslashes(sprintf(_("The stop watch \"%s\" has been started and will appear in the sidebar at the next refresh."), $vars->get('description'))),
+        'window.close();'
+    ));
     exit;
 }
 
index 17d108c..9958b12 100644 (file)
@@ -61,7 +61,7 @@ case 'add_bookmark':
         $notification->push(sprintf(_("There was an error adding the bookmark: %s"), $result->getMessage()), 'horde.error');
     } else {
         if (Horde_Util::getFormData('popup')) {
-            Horde_Util::closeWindowJS();
+            echo Horde::wrapInlineScript(array('window.close();'));
         } elseif (Horde_Util::getFormData('iframe')) {
             $notification->push(_("Bookmark Added"), 'horde.success');
             require TREAN_TEMPLATES . '/common-header.inc';
index 4e54ee5..e0a60f2 100644 (file)
@@ -91,7 +91,7 @@ case 'save':
 
     if (Horde_Util::getFormData('popup')) {
         if ($notification->count() <= 1) {
-            Horde_Util::closeWindowJS();
+            echo Horde::wrapInlineScript(array('window.close();'));
         } else {
             $notification->notify();
         }