From 1a82544ec0b87bcf3638384468a97297eb6c8bbb Mon Sep 17 00:00:00 2001
From: Hadi Nategh <hn@stylite.de>
Date: Wed, 22 Oct 2014 11:52:57 +0000
Subject: [PATCH] Adjust mail preview header part according to its content

---
 mail/templates/default/app.css   |  6 ++++++
 mail/templates/default/index.xet |  6 +++---
 mail/templates/pixelegg/app.css  | 10 ++++++++--
 mail/templates/pixelegg/app.less |  4 ++--
 4 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/mail/templates/default/app.css b/mail/templates/default/app.css
index 16a9569191..ff31479230 100644
--- a/mail/templates/default/app.css
+++ b/mail/templates/default/app.css
@@ -502,6 +502,12 @@ div.mail-compose_fileselector {
 	left: 3px;
 	right: 0;
 }
+#mail-index_mailPreviewContainer.previewNoAttachment {
+	top: 51px;
+}
+#mail-index_mailPreviewContainer.previewNoAttachmentButCC{
+	top: 67px;
+}
 #mail-index_previewAttachmentArea {
 	background-color:#f0f0f0;
 	max-height: 1.6em;
diff --git a/mail/templates/default/index.xet b/mail/templates/default/index.xet
index fa38fb9e4f..4a6b153665 100644
--- a/mail/templates/default/index.xet
+++ b/mail/templates/default/index.xet
@@ -109,9 +109,9 @@
 					<buttononly class="et2_button ui-button" label="Show all attachments" image="foldertree_nolines_plus" onclick="app.mail.showAllHeader"/>
 				</hbox>
 				<toolbar id="toolbar" class="mailPreviewIcons"/>
-				<box id="mailPreviewContainer">
-					<iframe frameborder="1" id="messageIFRAME" scrolling="auto"/>
-				</box>
+					<box id="mailPreviewContainer">
+						<iframe frameborder="1" id="messageIFRAME" scrolling="auto"/>
+					</box>
 			</vbox>
 		</split>
 		<iframe frameborder="1" height="100%" id="extra_iframe" scrolling="auto" width="100%" disabled="true"/>
diff --git a/mail/templates/pixelegg/app.css b/mail/templates/pixelegg/app.css
index 883f7fbe7b..0226c8b39c 100755
--- a/mail/templates/pixelegg/app.css
+++ b/mail/templates/pixelegg/app.css
@@ -502,6 +502,12 @@ div.mail-compose_fileselector {
   left: 3px;
   right: 0;
 }
+#mail-index_mailPreviewContainer.previewNoAttachment {
+  top: 51px;
+}
+#mail-index_mailPreviewContainer.previewNoAttachmentButCC {
+  top: 67px;
+}
 #mail-index_previewAttachmentArea {
   background-color: #f0f0f0;
   max-height: 1.6em;
@@ -840,7 +846,7 @@ div#mail-index div#mail-index_mailPreview div#mail-index_mailPreviewHeadersTo {
 div#mail-index div#mail-index_mailPreview div#mail-index_mailPreviewHeadersDate {
   position: absolute;
   right: 0px;
-  margin: 25px 5px 0 0;
+  margin: 3px 5px 0 0;
 }
 div#mail-index div#mail-index_mailPreview div#mail-index_mailPreviewHeadersSubject {
   width: 58%;
@@ -2299,7 +2305,7 @@ input[type=button] {
 #mail-index_mailPreviewContainer {
   position: absolute;
   border: 1px solid .color_10_gray;
-  top: 97px;
+  top: 113px;
   bottom: 0;
   left: 3px;
   right: 0;
diff --git a/mail/templates/pixelegg/app.less b/mail/templates/pixelegg/app.less
index 051c4f6439..e0bfb8a3d5 100755
--- a/mail/templates/pixelegg/app.less
+++ b/mail/templates/pixelegg/app.less
@@ -175,7 +175,7 @@ div#mail-index{
             div#mail-index_mailPreviewHeadersDate{
                                 position: absolute;
 				right: 0px;
-				margin: 25px 5px 0 0;
+				margin: 3px 5px 0 0;
             }
 
             // Subject
@@ -1568,7 +1568,7 @@ input[type=button] {
 #mail-index_mailPreviewContainer {
     position: absolute;
     border: 1px solid .color_10_gray;
-    top: 97px;
+    top: 113px;
     bottom: 0;
     left: 3px;
     right: 0;