From 010ff2057b899fd63dd5fea7af6f3550e6f57d95 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 18 May 2007 11:10:12 +0000 Subject: [PATCH] Update preview pane functionality so it only refreshes message list when viewing a message that has not yet been seen; also small code updates git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12416 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/preview_pane/README | 11 +++++-- plugins/preview_pane/functions.php | 25 ++++++++++------ plugins/preview_pane/setup.php | 4 +-- .../default_advanced/collapse_buttons.tpl | 8 ++--- templates/default_advanced/page_header.tpl | 2 +- templates/default_advanced/read_headers.tpl | 6 ++++ .../default_advanced/read_menubar_nav.tpl | 29 +++++++++++++------ 7 files changed, 58 insertions(+), 27 deletions(-) diff --git a/plugins/preview_pane/README b/plugins/preview_pane/README index ed8c6f9f..3ce89a3e 100644 --- a/plugins/preview_pane/README +++ b/plugins/preview_pane/README @@ -66,10 +66,15 @@ Change Log advanced" template set * Only works with 1.5.2+ - v1.3 2007/01/19 Paul Lesniewski + v1.3 2007/05/17 Paul Lesniewski + * Added ability to close/open the preview pane using buttons below + the "Sign Out" link (Thanks to Edwin Taylor ) + * Added reduced message header functionality (also works even when + preview pane is not turned on) (Thanks to Daniel Watts ) + * Added auto-hide functionality (Thanks to Daniel Watts ) * Introduce slight delay refreshing message list so read messages actually refresh as having been read - * Added 1.4.9 patch; versions between 1.4.3 and 1.4.9 should be + * Added 1.4.9 patch; versions between 1.4.3 and 1.4.10 should be patch-able with the 1.4.3 patch * Added 1.4.9 patch for delete, move, next plugin * Added 1.5.1 patch, then removed it ;-p 1.5.2 supports this @@ -83,6 +88,8 @@ Change Log always 100% reliable. * No longer support replacement source files; patches are more than enough * Fully compatible with Windows plugin, version 1.7+ + * Fully compatible with Sent Confirmation plugin, version 1.7+ (upgrade + required) v1.2 2004/06/08 Paul Lesniewski * Added javascript fix so delete link will work when messages are diff --git a/plugins/preview_pane/functions.php b/plugins/preview_pane/functions.php index 43e139a3..2f9ddab3 100644 --- a/plugins/preview_pane/functions.php +++ b/plugins/preview_pane/functions.php @@ -57,7 +57,7 @@ function preview_pane_show_options_do() 'caption' => _("Always Refresh Message List
When Using Preview Pane"), 'type' => SMOPT_TYPE_BOOLEAN, 'initial_value' => $pp_refresh_message_list, - 'refresh' => SMOPT_REFRESH_ALL, + 'refresh' => SMOPT_REFRESH_NONE, ); } @@ -92,13 +92,13 @@ function preview_pane_open_close_buttons_do() $previewPane_vertical_split = getPref($data_dir, $username, 'previewPane_vertical_split', 0); if ($previewPane_vertical_split) { - $split = 'cols'; + $orientation = 'cols'; $up_arrow = '←'; $down_arrow = '→'; } else { - $split = 'rows'; + $orientation = 'rows'; $up_arrow = '↑'; $down_arrow = '↓'; } @@ -108,7 +108,7 @@ function preview_pane_open_close_buttons_do() $oTemplate->assign('previewPane_size', $previewPane_size); $oTemplate->assign('base_uri', $base_uri); - $oTemplate->assign('split', $split); + $oTemplate->assign('orientation', $orientation); $oTemplate->assign('down_arrow', $down_arrow); $oTemplate->assign('up_arrow', $up_arrow); @@ -154,7 +154,7 @@ function preview_pane_message_list_do() { // sqgetGlobalVar('REQUEST_URI', $request_uri, SQ_SERVER); $request_uri = $PHP_SELF; - $output .= "\n"; + $output .= "\n"; } @@ -171,7 +171,7 @@ function preview_pane_message_list_do() // don't let message list load into preview pane at all // - . "\n diff --git a/templates/default_advanced/page_header.tpl b/templates/default_advanced/page_header.tpl index 70638c1b..90133816 100644 --- a/templates/default_advanced/page_header.tpl +++ b/templates/default_advanced/page_header.tpl @@ -119,7 +119,7 @@ $help_link = makeInternalLink ('src/help.php', $help_str);
-\n"; +} diff --git a/templates/default_advanced/read_menubar_nav.tpl b/templates/default_advanced/read_menubar_nav.tpl index ba76161d..d14e07f5 100644 --- a/templates/default_advanced/read_menubar_nav.tpl +++ b/templates/default_advanced/read_menubar_nav.tpl @@ -70,7 +70,10 @@ if ($show_preview_pane) { ?> - ' . _("Previous"); ?> +echo '">' . _("Previous"); ?> | @@ -122,15 +129,19 @@ echo '>' . _("Previous"); ?> echo _("Next"); } else { ?> - ' . _("Next"); ?> +echo '">' . _("Next"); ?> -- 2.25.1