From 1563f9d43ab139851adbe9476aa7f47b2630af1b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 2 Sep 2015 13:00:35 +0000 Subject: [PATCH] * Mail/preferences: Add Preview Pane option into mail preferences in order to be able to show/hide mail preview pane (split panel) --- mail/inc/class.mail_hooks.inc.php | 11 +++ mail/inc/class.mail_ui.inc.php | 3 + mail/js/app.js | 7 -- mail/lang/egw_de.lang | 4 ++ mail/lang/egw_en.lang | 4 ++ mail/templates/default/index.xet | 108 ++++++++++++++++-------------- 6 files changed, 79 insertions(+), 58 deletions(-) diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 1b5dc6ff6a..9faef387c0 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -408,6 +408,17 @@ class mail_hooks 'admin' => False, 'default'=> 'text', ), + 'previewPane' => array( + 'type' => 'select', + 'label' => 'Preview pane', + 'help' => 'Show/Hide preview pane in mail list view', + 'name' => 'previewPane', + 'values' => array( + '0' => lang('show'), + '1' => lang('hide') + ), + 'default' => '0' + ), ); 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 1959e7c931..20eb70c975 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -722,6 +722,9 @@ class mail_ui { self::callWizard($e->getMessage(),true, 'error'); } + // Check preview pane is enabled, then show spliter + if ($this->mail_bo->mailPreferences['previewPane']) $etpl->setElementAttribute('mail.index.spliter', 'template', 'mail.index.nospliter'); + return $etpl->exec('mail.mail_ui.index',$content,$sel_options,$readonlys,$preserv); } diff --git a/mail/js/app.js b/mail/js/app.js index 82064bf1fb..398fd93e5e 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -656,17 +656,10 @@ app.classes.mail = AppJS.extend( var splitter = this.et2.getWidgetById('mailSplitter'); // return if there's no splitter we maybe in mobile mode if (typeof splitter == 'undefined' || splitter == null) return; - var splitterDN = splitter.getDOMNode(); - if(splitter.isDocked()) { this.mail_previewAreaActive = false; } - - //this.et2.getWidgetById('mailPreviewHeadersFrom').set_disabled(_value); - //this.et2.getWidgetById('mailPreviewHeadersTo').set_disabled(_value); - //this.et2.getWidgetById('mailPreviewHeadersDate').set_disabled(_value); - //this.et2.getWidgetById('mailPreviewHeadersSubject').set_disabled(_value); this.et2.getWidgetById('mailPreview').set_disabled(_value); //Dock the splitter always if we are browsing with mobile if (_value==true) diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index 3d5751b3da..6671d08e69 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -209,6 +209,7 @@ get acl rights failed from imap server! mail de Die Zugriffskontrollrechte konnt greater than mail de größer als header mail de Kopfzeilen header lines mail de Kopfzeilen anzeigen +hide mail de ausblenden hold %1 to drag files to your computer mail de %1 halten um Dateien auf Ihren Computer zu ziehen home page folders mail de Darstellung von E-Mails auf der Startseite hostname or ip mail de Hostname oder IP @@ -330,6 +331,7 @@ prevent managing filters mail de Zugriff auf Filterregeln deaktivieren prevent managing folders mail de Zugriff auf die Ordnerverwaltung deaktivieren prevent managing notifications mail de Zugriff auf Benachrichtigungen deaktivieren prevent managing vacation notice mail de Zugriff auf die Abwesenheitsbenachrichtigung deaktivieren +preview pane mail de Mailvorschau primary profile mail de Primäres Profil printview mail de Druckansicht processing of file %1 failed. failed to meet basic restrictions. mail de Das Verarbeiten der Datei %1 ist fehlgeschlagen. Grundlegende Voraussetzungen wurden nicht erfüllt. @@ -413,11 +415,13 @@ set / remove labels mail de Schlagworte setzen / entfernen 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 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 (gemäß Standard) oder vor dem zitierten Text einer email eingefügt werden und soll diese bearbeitbar sein? +show mail de anzeigen show all folders mail de Darstellung aller E-Mail Ordner show all folders, (subscribed and unsubscribed) in main screen folder pane mail de Zeige alle Ordner, die in Ihrem Postfach eingerichtet sind. Expliziere Deaktivierung der Abonnement-Funktion des E-Mail Programms. Dies kann sich negativ auf die Performance Ihrer EGroupware auswirken. show new messages on home page mail de Anzeigen von neuen E-Mails auf der Startseite show test connection section and control the level of info displayed? mail de Zeige Verbindungstest Link an und spezifiziere das Ausmaß der angezeigten Information? show test connection section and control the level of info displayed?? mail de Soll der Verbindungstest und die dazugehörigen Informationen angezeigt werden? +show/hide preview pane in mail list view mail de Mailvorschau anzeigen oder ausblenden sieve mail de Sieve sieve connection status mail de Sieve Verbindungsstatus sieve not activated mail de Sieve nicht aktiviert diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index 1c99a968cd..234f24f96e 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -209,6 +209,7 @@ get acl rights failed from imap server! mail en Get ACL rights failed from IMAP greater than mail en greater than header mail en Header header lines mail en Header lines +hide mail en hide hold %1 to drag files to your computer mail en Hold %1 to drag files to your computer home page folders mail en home page folders hostname or ip mail en Hostname or IP @@ -330,6 +331,7 @@ prevent managing filters mail en Prevent managing filters prevent managing folders mail en Prevent managing folders prevent managing notifications mail en Prevent managing notifications prevent managing vacation notice mail en Prevent managing vacation notice +preview pane mail en Preview pane primary profile mail en Primary Profile printview mail en printview processing of file %1 failed. failed to meet basic restrictions. mail en Processing of file %1 failed. Failed to meet basic restrictions. @@ -413,11 +415,13 @@ set / remove labels mail en Set / Remove Labels 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 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 all folders mail en show all Folders show all folders, (subscribed and unsubscribed) in main screen folder pane mail en show all folders, (subscribed AND unsubscribed) in Main Screen Folder Pane show new messages on home page mail en show new messages on home page show test connection section and control the level of info displayed? mail en Show Test Connection section and control the level of info displayed? show test connection section and control the level of info displayed?? mail en Show Test Connection section and control the level of info displayed?? +show/hide preview pane in mail list view mail en Show/Hide preview pane in mail list view sieve mail en Sieve sieve connection status mail en Sieve Connection Status sieve not activated mail en Sieve not activated diff --git a/mail/templates/default/index.xet b/mail/templates/default/index.xet index 46d7ee43af..5618e41ba6 100644 --- a/mail/templates/default/index.xet +++ b/mail/templates/default/index.xet @@ -2,57 +2,7 @@ - -