X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fpreview_pane%2Ffunctions.php;h=3725feef76989fc69a0014ae268409ace2f423de;hb=34aa9765802fd89aa20442283bd1bdcec71dca3f;hp=2f9ddab367863e6f6cc4164c5aafacd4cc002fc1;hpb=010ff2057b899fd63dd5fea7af6f3550e6f57d95;p=squirrelmail.git diff --git a/plugins/preview_pane/functions.php b/plugins/preview_pane/functions.php index 2f9ddab3..3725feef 100644 --- a/plugins/preview_pane/functions.php +++ b/plugins/preview_pane/functions.php @@ -1,22 +1,20 @@ - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - * @version $Id$ - * @package plugins - * @subpackage preview_pane - * - */ + * SquirrelMail Preview Pane Plugin + * + * @copyright 1999-2014 The SquirrelMail Project Team + * @author Paul Lesniewski + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage preview_pane + */ /** - * Build user options for display on "Display Preferences" page - * - */ + * Build user options for display on "Display Preferences" page + */ function preview_pane_show_options_do() { @@ -27,6 +25,7 @@ function preview_pane_show_options_do() $previewPane_vertical_split = getPref($data_dir, $username, 'previewPane_vertical_split', 0); $previewPane_size = getPref($data_dir, $username, 'previewPane_size', 300); $pp_refresh_message_list = getPref($data_dir, $username, 'pp_refresh_message_list', 1); + $previewPane_autohide = getPref($data_dir, $username, 'previewPane_autohide', 0); global $optpage_data; @@ -59,17 +58,23 @@ function preview_pane_show_options_do() 'initial_value' => $pp_refresh_message_list, 'refresh' => SMOPT_REFRESH_NONE, ); + $optpage_data['vals'][1][] = array( + 'name' => 'previewPane_autohide', + 'caption' => _("Automatically Hide Preview Pane
When Not Reading Messages"), + 'type' => SMOPT_TYPE_BOOLEAN, + 'initial_value' => $previewPane_autohide, + 'refresh' => SMOPT_REFRESH_ALL, + ); } /** - * This function determines if the preview pane is in use - * (and JavaScript is available) - * - * @return boolean TRUE if the preview pane should be showing currently. - * - */ + * This function determines if the preview pane is in use + * (and JavaScript is available) + * + * @return boolean TRUE if the preview pane should be showing currently. + */ function show_preview_pane() { global $data_dir, $username; @@ -79,10 +84,9 @@ function show_preview_pane() /** - * Adds preview pane open/close (and clear) buttons next to - * "provider link" - * - */ + * Adds preview pane open/close (and clear) buttons next to + * "provider link" + */ function preview_pane_open_close_buttons_do() { @@ -109,8 +113,8 @@ function preview_pane_open_close_buttons_do() $oTemplate->assign('previewPane_size', $previewPane_size); $oTemplate->assign('base_uri', $base_uri); $oTemplate->assign('orientation', $orientation); - $oTemplate->assign('down_arrow', $down_arrow); - $oTemplate->assign('up_arrow', $up_arrow); + $oTemplate->assign('down_arrow', $down_arrow, FALSE); + $oTemplate->assign('up_arrow', $up_arrow, FALSE); $output = $oTemplate->fetch('plugins/preview_pane/collapse_buttons.tpl'); @@ -120,12 +124,11 @@ function preview_pane_open_close_buttons_do() /** - * Construct button that clears out any preview pane - * contents and inserts JavaScript function used by - * message subject link onclick handler. Also disallows - * the message list to be loaded into the bottom frame. - * - */ + * Construct button that clears out any preview pane + * contents and inserts JavaScript function used by + * message subject link onclick handler. Also disallows + * the message list to be loaded into the bottom frame. + */ function preview_pane_message_list_do() { @@ -206,10 +209,9 @@ function preview_pane_message_list_do() /** - * Points message targets to open in the preview pane - * (and possibly refresh message list as well) - * - */ + * Points message targets to open in the preview pane + * (and possibly refresh message list as well) + */ function preview_pane_change_message_target_do($args) {