Add ability to force message list refresh
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 5 Jan 2008 11:19:29 +0000 (11:19 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 5 Jan 2008 11:19:29 +0000 (11:19 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12857 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/preview_pane/templates/default_advanced/empty_frame.tpl

index 85233cd..95098fa 100644 (file)
@@ -21,3 +21,15 @@ extract($t);
 
 
 ?><body>
+<?php
+
+    global $data_dir, $username;
+    $use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
+    $show_preview_pane = checkForJavascript() && $use_previewPane;
+
+// do a conditional refresh of message list if needed
+// "pp_rr" = "preview pane read refresh" (this itself is irrelevant here)
+// "pp_rr_force" = force pp_rr even if this is not the first time the message has been read
+    if ($show_preview_pane && sqGetGlobalVar('pp_rr_force', $pp_rr_force, SQ_FORM))
+        echo "<script language=\"JavaScript\" type=\"text/javascript\">\n<!--\nif (self.name == 'bottom' && typeof(parent.right.pp_refresh) != 'undefined') { parent.right.pp_refresh(); }\n// -->\n</script>\n";
+