* Mail: implement preference to switch between horizontal and vertical preview pane

This commit is contained in:
Hadi Nategh 2017-06-23 15:36:31 +02:00
parent a44bdb99f9
commit 6c92cf97aa
3 changed files with 16 additions and 1 deletions

View File

@ -367,6 +367,17 @@ class mail_hooks
), ),
'default' => 'expand' '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']); if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']);
return $settingsArray; return $settingsArray;

View File

@ -594,6 +594,10 @@ class mail_ui
{ {
$etpl->setElementAttribute('splitter', 'template', 'mail.index.nosplitter'); $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); return $etpl->exec('mail.mail_ui.index',$content,$sel_options,$readonlys,$preserv);
} }

View File

@ -3,7 +3,7 @@
<!-- $Id$ --> <!-- $Id$ -->
<overlay> <overlay>
<template id="mail.index.splitter" height="100%" template="" lang="" group="0" version="1.9.001"> <template id="mail.index.splitter" height="100%" template="" lang="" group="0" version="1.9.001">
<split dock_side="bottomDock" id="mailSplitter" orientation="h"> <split dock_side="bottomDock" id="mailSplitter">
<nextmatch id="nm" onselect="app.mail.mail_preview" template="mail.index.rows" header_left="mail.index.add" header_right="mail.index.header_right"/> <nextmatch id="nm" onselect="app.mail.mail_preview" template="mail.index.rows" header_left="mail.index.add" header_right="mail.index.header_right"/>
<vbox id="mailPreview" width="100%"> <vbox id="mailPreview" width="100%">
<box id="blank" disabled="false"> <box id="blank" disabled="false">