From 7938312aaa802122e7740bcd789b8469919bc875 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 13 Jul 2012 14:31:15 -0400
Subject: [PATCH] Show contact photos in mail view and preview

---
 skins/larry/templates/message.html        |    1 +
 skins/larry/images/contactpic_32px.png    |    0 
 skins/larry/mail.css                      |   41 ++++++++++++++++++++++++++++++++++++++---
 skins/larry/templates/messagepreview.html |    1 +
 4 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/skins/larry/images/contactpic_32px.png b/skins/larry/images/contactpic_32px.png
new file mode 100644
index 0000000..276f197
--- /dev/null
+++ b/skins/larry/images/contactpic_32px.png
Binary files differ
diff --git a/skins/larry/mail.css b/skins/larry/mail.css
index 3fe451c..695697f 100644
--- a/skins/larry/mail.css
+++ b/skins/larry/mail.css
@@ -811,7 +811,7 @@
 }
 
 #all-headers {
-    position: relative;
+	position: relative;
 	margin: 0 10px;
 	padding: 0;
 	height: 180px;
@@ -837,7 +837,7 @@
 	position: relative;
 	height: auto;
 	margin: 0 8px 0 0;
-	padding: 0 0 6px 26px;
+	padding: 0 0 6px 72px;
 	border-bottom: 2px solid #f0f0f0;
 }
 
@@ -845,12 +845,47 @@
 	padding: 8px 8px 2px 0;
 }
 
+#messagepreviewheader #contactphoto {
+	display: block;
+	position: absolute;
+	top: 11px;
+	left: 30px;
+	width: 32px;
+	height: 32px;
+	overflow: hidden;
+	background: url(images/contactpic_32px.png) center center no-repeat #fff;
+	border-radius: 3px;
+}
+
+#messagepreviewheader #contactphoto img {
+	width: 32px;
+	height: auto;
+	border-radius: 3px;
+}
+
+#messageheader #contactphoto {
+	display: block;
+	position: absolute;
+	top: 40px;
+	right: 10px;
+	width: 48px;
+	height: 48px;
+	overflow: hidden;
+	border-radius: 4px;
+}
+
+#messageheader #contactphoto img {
+	width: 48px;
+	height: auto;
+	border-radius: 4px;
+}
+
 #messagepreviewheader #countcontrols,
 #messageheader #countcontrols {
 	position: absolute;
 	top: 8px;
 	right: 8px;
-	width: 18em;
+	width: 20em;
 	text-align: right;
 	white-space: nowrap;
 }
diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html
index b66d821..1becd71 100644
--- a/skins/larry/templates/message.html
+++ b/skins/larry/templates/message.html
@@ -46,6 +46,7 @@
 	<roundcube:button command="nextmessage" type="link" class="button nextpage disabled" classAct="button nextpage" classSel="button nextpage pressed" innerClass="inner" title="nextmessage" content="&amp;gt;" />
 </div>
 
+<div id="contactphoto"><roundcube:object name="contactphoto" /></div>
 </div>
 
 <div id="messagecontent" class="uibox">
diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html
index fbca971..b53683e 100644
--- a/skins/larry/templates/messagepreview.html
+++ b/skins/larry/templates/messagepreview.html
@@ -10,6 +10,7 @@
 <h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h3>
 
 <a href="#details" id="previewheaderstoggle"><span class="iconlink"></span></a>
+<div id="contactphoto"><roundcube:object name="contactphoto" /></div>
 
 <table class="headers-table" id="preview-shortheaders"><tbody><tr>
 <roundcube:if condition="env:mailbox == config:drafts_mbox || env:mailbox == config:sent_mbox">

--
Gitblit v1.9.1