* Mail - add a new preference for preview pane to stay there, even when no mail is selected for previewing

This commit is contained in:
nathangray 2017-03-23 10:28:20 -06:00
parent c450438583
commit 1edf937ec0
8 changed files with 60 additions and 7 deletions

View File

@ -347,10 +347,11 @@ class mail_hooks
'help' => 'Show/Hide preview pane in mail list view', 'help' => 'Show/Hide preview pane in mail list view',
'name' => 'previewPane', 'name' => 'previewPane',
'values' => array( 'values' => array(
'0' => lang('show'), 'expand' => lang('show & expand'),
'1' => lang('hide') 'fixed' => lang('show fixed'),
'hide' => lang('hide')
), ),
'default' => '0' 'default' => 'expand'
), ),
); );
if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']); if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']);

View File

@ -589,8 +589,11 @@ class mail_ui
self::callWizard($e->getMessage().($e->details?', '.$e->details:''),(isset($this->mail_bo)?false:true), 'error',false); self::callWizard($e->getMessage().($e->details?', '.$e->details:''),(isset($this->mail_bo)?false:true), 'error',false);
//return false; //return false;
} }
// Check preview pane is enabled, then show splitter // Check preview pane is enabled, then show splitter - preference used to be '1', now 'hide'
if ($this->mail_bo->mailPreferences['previewPane']) $etpl->setElementAttribute('splitter', 'template', 'mail.index.nosplitter'); if ($this->mail_bo->mailPreferences['previewPane'] == '1' || $this->mail_bo->mailPreferences['previewPane'] == 'hide')
{
$etpl->setElementAttribute('splitter', 'template', 'mail.index.nosplitter');
}
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

@ -167,7 +167,7 @@ app.classes.mail = AppJS.extend(
}); });
var nm = this.et2.getWidgetById(this.nm_index); var nm = this.et2.getWidgetById(this.nm_index);
this.mail_isMainWindow = true; this.mail_isMainWindow = true;
this.mail_disablePreviewArea(true); this.mail_disablePreviewArea(this.egw.preference('previewPane', 'mail') !== 'fixed');
//Get initial folder status //Get initial folder status
this.mail_refreshFolderStatus(undefined,undefined,false); this.mail_refreshFolderStatus(undefined,undefined,false);
@ -918,11 +918,26 @@ app.classes.mail = AppJS.extend(
}, 50); }, 50);
}; };
// Show / hide 'Select something' in preview
var blank = this.et2.getWidgetById('blank');
if(blank)
{
blank.set_disabled(true);
}
if (attachmentArea && typeof _id != 'undefined' && _id !='' && typeof dataElem !== 'undefined') if (attachmentArea && typeof _id != 'undefined' && _id !='' && typeof dataElem !== 'undefined')
{ {
// If there is content to show recalculate the size // If there is content to show recalculate the size
set_prev_iframe_top(); set_prev_iframe_top();
} }
else if (this.egw.preference('previewPane', 'mail') == 'fixed')
{
if(blank)
{
blank.set_disabled(false);
}
this.mail_disablePreviewArea(false);
if (!egwIsMobile())return;
}
else else
{ {
// Leave if we're here and there is nothing selected, too many, or no data // Leave if we're here and there is nothing selected, too many, or no data

View File

@ -422,6 +422,7 @@ saving of message %1 succeeded. check folder %2. mail de Speichern der Nachricht
saving the rule failed: mail de Speichern der Regel ist fehlgeschlagen: saving the rule failed: mail de Speichern der Regel ist fehlgeschlagen:
see attachments for content of the orignial mail mail de Die Original Nachricht wurde als Anhang an diese e-Mail angehängt see attachments for content of the orignial mail mail de Die Original Nachricht wurde als Anhang an diese e-Mail angehängt
select all mail de Alle Auswählen select all mail de Alle Auswählen
select an item to read mail de Wählen Sie ein zu lesendes Element aus
select an existing entry in order to append mail content to it mail de Bestehendes Ticket auswählen, zu dem die Mail als Kommentar hinzugefügt werden soll. select an existing entry in order to append mail content to it mail de Bestehendes Ticket auswählen, zu dem die Mail als Kommentar hinzugefügt werden soll.
select file to attach to message mail de Wählen Sie die Dateien aus, die Sie an diese Nachricht anhängen möchten. select file to attach to message mail de Wählen Sie die Dateien aus, die Sie an diese Nachricht anhängen möchten.
select file to import into folder mail de Wählen Sie ein E-Mail als Datei aus, damit Sie in ein Ordner importiert werden kann. select file to import into folder mail de Wählen Sie ein E-Mail als Datei aus, damit Sie in ein Ordner importiert werden kann.
@ -445,6 +446,8 @@ set it as default: mail de als Vorgabe speichern
should new messages show up on the home page mail de Wie sollen Nachrichten auf der Startseite angezeigt werden? should new messages show up on the home page mail de Wie sollen Nachrichten auf der Startseite angezeigt werden?
should signature be inserted after (standard) or before a reply or inline forward, and should signature be visible and changeable during compose. mail de Soll die Signatur nach (Standard) oder vor dem zitierten Text eingefügt werden und diese bearbeitbar sein? should signature be inserted after (standard) or before a reply or inline forward, and should signature be visible and changeable during compose. mail de Soll die Signatur nach (Standard) oder vor dem zitierten Text eingefügt werden und diese bearbeitbar sein?
show mail de anzeigen show mail de anzeigen
show & expand mail de Anzeigen & erweitern
show fixed mail de Feste anzeigen
show all addresses mail de alle Adressaten anzeigen show all addresses mail de alle Adressaten anzeigen
show all attachments mail de alle Anhänge anzeigen show all attachments mail de alle Anhänge anzeigen
show all folders mail de Anzeige aller Ordner show all folders mail de Anzeige aller Ordner

View File

@ -421,6 +421,7 @@ saving of message %1 succeeded. check folder %2. mail en Saving of message %1 su
saving the rule failed: mail en Saving the rule failed: saving the rule failed: mail en Saving the rule failed:
see attachments for content of the orignial mail mail en See Attachments for Content of the Orignial Mail see attachments for content of the orignial mail mail en See Attachments for Content of the Orignial Mail
select all mail en Select all select all mail en Select all
select an item to read mail en Select an item to read
select an existing entry in order to append mail content to it mail en Select an existing entry in order to append mail content to it select an existing entry in order to append mail content to it mail en Select an existing entry in order to append mail content to it
select file to attach to message mail en Select file to attach to message select file to attach to message mail en Select file to attach to message
select file to import into folder mail en Select file to import into Folder select file to import into folder mail en Select file to import into Folder
@ -444,6 +445,8 @@ set it as default: mail en set it as default:
should new messages show up on the home page mail en Should new messages show up on the Home page should new messages show up on the home page mail en Should new messages show up on the Home page
should signature be inserted after (standard) or before a reply or inline forward, and should signature be visible and changeable during compose. mail en Should signature be inserted after (standard) or before a reply or inline forward, and should signature be visible and changeable during compose. should signature be inserted after (standard) or before a reply or inline forward, and should signature be visible and changeable during compose. mail en Should signature be inserted after (standard) or before a reply or inline forward, and should signature be visible and changeable during compose.
show mail en show show mail en show
show & expand mail en Show & expand
show fixed mail en Show fixed
show all addresses mail en Show all Addresses show all addresses mail en Show all Addresses
show all attachments mail en Show all attachments show all attachments mail en Show all attachments
show all folders mail en show all Folders show all folders mail en show all Folders

View File

@ -295,6 +295,18 @@ pre {
.mail-index_vacation > div > span { .mail-index_vacation > div > span {
color: red; color: red;
} }
#mail-index_blank {
width: 100%;
height: 100%;
position: absolute;
background-color: white;
z-index: 10;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 200%;
}
.mail_DisplayNone { .mail_DisplayNone {
display: none !important; display: none !important;
} }

View File

@ -6,6 +6,10 @@
<split dock_side="bottomDock" id="mailSplitter" orientation="h"> <split dock_side="bottomDock" id="mailSplitter" orientation="h">
<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">
<image src="mail"/>
<description value="Select an item to read"/>
</box>
<hbox width="100%" id="mailPreviewHeadersFrom" class="mailPreviewHeaders"> <hbox width="100%" id="mailPreviewHeadersFrom" class="mailPreviewHeaders">
<description value="From"/> <description value="From"/>
<url-email id="previewFromAddress" contact_plus = "true" readonly="true"/> <url-email id="previewFromAddress" contact_plus = "true" readonly="true"/>

View File

@ -291,6 +291,18 @@ pre {
.mail-index_vacation > div > span { .mail-index_vacation > div > span {
color: red; color: red;
} }
#mail-index_blank {
width: 100%;
height: 100%;
position: absolute;
background-color: white;
z-index: 10;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 200%;
}
.mail_DisplayNone { .mail_DisplayNone {
display: none !important; display: none !important;
} }
@ -805,7 +817,7 @@ blockquote blockquote blockquote blockquote blockquote blockquote {
display: inline-block; display: inline-block;
} }
div.mail_extraEmails + img.et2_button.et2_button_icon.ui-button.et2_clickable { div.mail_extraEmails + img.et2_button.et2_button_icon.ui-button.et2_clickable {
display: none; display: none !important;
} }
.et2_email:after { .et2_email:after {
content: " | "; content: " | ";