From 543ccbb328b37d5d5f3ef8d982fdfadc350f3bb6 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Mon, 02 Jan 2012 08:33:04 -0500
Subject: [PATCH] Add toggle for all-headers display

---
 skins/larry/styles.css          |   11 +++--
 skins/larry/images/messages.png |    0 
 skins/larry/images/buttons.png  |    0 
 skins/larry/mail.css            |   58 ++++++++++++++++++++++++++++
 skins/larry/ui.js               |    3 +
 5 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png
index 3e8dbb2..155148f 100644
--- a/skins/larry/images/buttons.png
+++ b/skins/larry/images/buttons.png
Binary files differ
diff --git a/skins/larry/images/messages.png b/skins/larry/images/messages.png
index a5b1eb1..5144a66 100644
--- a/skins/larry/images/messages.png
+++ b/skins/larry/images/messages.png
Binary files differ
diff --git a/skins/larry/mail.css b/skins/larry/mail.css
index efee660..f5cf752 100644
--- a/skins/larry/mail.css
+++ b/skins/larry/mail.css
@@ -664,6 +664,61 @@
 	height: 13px;
 }
 
+#full-headers {
+	position: relative;
+	color: #666;
+	text-align: center;
+	background-color: #EBEBEB;
+}
+
+div.more-headers {
+	cursor: pointer;
+	height: 10px;
+	background: url(images/buttons.png) center -1539px no-repeat;
+}
+
+div.hide-headers {
+	background-position: center -1549px;
+}
+
+#all-headers {
+	position: absolute;
+	top: 11px;
+	left: 10px;
+	right: 10px;
+	height: 180px;
+	z-index: 500;
+	border: 1px solid #bbb;
+	border-top: 0;
+	border-radius: 0 0 4px 4px;
+	-webkit-box-shadow: 0px 3px 4px 0px rgba(80, 80, 80, 0.6);
+	-moz-box-shadow: 0px 3px 4px 0px rgba(80, 80, 80, 0.6);
+	box-shadow: 0px 3px 4px 0px rgba(80, 80, 80, 0.6);
+	background: #fff;
+	background: -moz-linear-gradient(top, #f3f3f3 0%, #fff 8px, #fff 100%);
+	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f3f3f3), color-stop(8px,#fff), color-stop(100%,#fff));
+	background: -o-linear-gradient(top, #f3f3f3 0%, #fff 8px, #fff 100%);
+	background: -ms-linear-gradient(top, #f3f3f3 0%, #fff 8px, #fff 100%);
+	background: linear-gradient(top,  #f3f3f3 0%, #fff 8px, #fff 100%);
+}
+
+#all-headers .ui-resizable-s {
+	bottom: -2px;
+}
+
+#headers-source {
+	display: none;
+	position: absolute;
+	top: 8px;
+	left: 0;
+	right: 0;
+	bottom: 8px;
+	padding: 0 10px;
+	overflow: auto;
+	text-align: left;
+	color: #333;
+}
+
 #messagepreviewheader {
 	margin: 0 8px;
 	padding-bottom: 8px;
@@ -730,8 +785,9 @@
 	color: #960;
 	border: 1px solid #ffdf0e;
 	background-color: #fef893;
-	background-position: 5px -24px;
+	background-position: 5px -85px;
 	padding: 6px 12px 4px 30px;
+	white-space: normal;
 }
 
 #message-objects div a.button,
diff --git a/skins/larry/styles.css b/skins/larry/styles.css
index 412e5c3..198d647 100644
--- a/skins/larry/styles.css
+++ b/skins/larry/styles.css
@@ -65,6 +65,9 @@
 	padding: 2px 4px;
 }
 
+.bold {
+	font-weight: bold;
+}
 
 /*** buttons ***/
 
@@ -395,7 +398,7 @@
 
 #message div.warning {
 	color: #960;
-	background-position: 0 -25px;
+	background-position: 0 -86px;
 }
 
 #message div.error {
@@ -405,7 +408,7 @@
 
 #message div.confirmation {
 	color: #093;
-	background-position: 0 -86px;
+	background-position: 0 -25px;
 }
 
 #message div.loading {
@@ -1225,12 +1228,12 @@
 	top: 0;
 	height: 42px;
 	width: 18px;
-	background: url(images/buttons.png) -24px -1255px no-repeat;
+	background: url(images/buttons.png) 0 -1255px no-repeat;
 	cursor: pointer;
 }
 
 .dropbutton .dropbuttontip:hover {
-	background-position: 0 -1255px;
+	background-position: -26px -1255px;
 }
 
 .toolbar a.button.back {
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index c1bbfad..08cce32 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -61,7 +61,6 @@
     if (rcmail.env.task == 'mail') {
       rcmail.addEventListener('menu-open', show_listoptions);
       rcmail.addEventListener('menu-save', save_listoptions);
-      rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 100); });
 
       var dragmenu = $('#dragmessagemenu');
       if (dragmenu.length) {
@@ -76,8 +75,10 @@
 
       if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
         layout_messageview();
+        $("#all-headers").resizable({ handles: 's', minHeight: 50 });
       }
       else if (rcmail.env.action == 'compose') {
+        rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 100); });
         rcmail.addEventListener('aftersend-attachment', show_uploadform);
         layout_composeview();
 

--
Gitblit v1.9.1