From 6c92cf97aa33f0c7b8deea84f7b56cca2d2eb724 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 23 Jun 2017 15:36:31 +0200 Subject: [PATCH] * Mail: implement preference to switch between horizontal and vertical preview pane --- mail/inc/class.mail_hooks.inc.php | 11 +++++++++++ mail/inc/class.mail_ui.inc.php | 4 ++++ mail/templates/default/index.xet | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index eea68b02c5..fcc93f97d0 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -367,6 +367,17 @@ class mail_hooks ), 'default' => 'expand' ), + 'splitterOrientation' => array( + 'type' => 'select', + 'label' => 'Preview pan orientation', + 'help' => 'Switch preview pane between vertical and horizontal views', + 'name' => 'splitterOrientation', + 'values' => array( + 'h' => lang('Horizontal'), + 'v' => lang('Vertical') + ), + 'default' => 'h' + ) ); if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']); return $settingsArray; diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 6046489ac2..ed432e0426 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -594,6 +594,10 @@ class mail_ui { $etpl->setElementAttribute('splitter', 'template', 'mail.index.nosplitter'); } + elseif ($this->mail_bo->mailPreferences['splitterOrientation']) + { + $etpl->setElementAttribute('mailSplitter', 'orientation', $this->mail_bo->mailPreferences['splitterOrientation']); + } return $etpl->exec('mail.mail_ui.index',$content,$sel_options,$readonlys,$preserv); } diff --git a/mail/templates/default/index.xet b/mail/templates/default/index.xet index 8406218a0e..cf9368c3ef 100644 --- a/mail/templates/default/index.xet +++ b/mail/templates/default/index.xet @@ -3,7 +3,7 @@