From b3bbb281002386f6cedf5b6f007074ecbfc96f5b Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 27 Jan 2013 07:16:54 -0500
Subject: [PATCH] Add addressbook widget on compose page in classic skin

---
 skins/classic/templates/compose.html |   84 +++++++++++++++++++++++++++++-------------
 1 files changed, 58 insertions(+), 26 deletions(-)

diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html
index f764d6b..6ca5e2c 100644
--- a/skins/classic/templates/compose.html
+++ b/skins/classic/templates/compose.html
@@ -9,9 +9,9 @@
 <script type="text/javascript" src="/functions.js"></script>
 <script type="text/javascript" src="/splitter.js"></script>
 <style type="text/css">
-#compose-attachments { width: <roundcube:exp expression="!empty(cookie:composesplitterv) ? cookie:composesplitterv-5 : 175" />px; }
-#compose-container { left: <roundcube:exp expression="!empty(cookie:composesplitterv) ? cookie:composesplitterv+5 : 185" />px;
-<roundcube:exp expression="browser:ie ? ('width: expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:composesplitterv) ? cookie:composesplitterv+5 : 180).')+\\'px\\');') : ''" />
+#compose-contacts { width: <roundcube:exp expression="!empty(cookie:composesplitterv1) ? cookie:composesplitterv1-5 : 195" />px; }
+#compose-container { left: <roundcube:exp expression="!empty(cookie:composesplitterv1) ? cookie:composesplitterv1+5 : 205" />px;
+<roundcube:exp expression="browser:ie ? ('width: expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:composesplitterv1) ? cookie:composesplitterv1+5 : 200).')+\\'px\\');') : ''" />
 }
 </style>
 </head>
@@ -23,8 +23,6 @@
 <roundcube:include file="/includes/taskbar.html" />
 <roundcube:include file="/includes/header.html" />
 <roundcube:endif />
-
-<form name="form" action="./" method="post">
 
 <div id="messagetoolbar">
 <roundcube:if condition="env:extwin" />
@@ -46,22 +44,40 @@
     <roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_popup('composemenu', true);return false" content=" " />
 </div>
 
+<form name="form" action="./" method="post">
+
 <div id="mainscreen">
 
-<div id="compose-attachments">
-<div class="boxtitle"><roundcube:label name="attachments" /></div>
+<div id="compose-contacts">
+<div class="boxtitle"><roundcube:label name="contacts" /></div>
 <div class="boxlistcontent">
-    <roundcube:object name="composeAttachmentList" id="attachmentslist" loadingIcon="/images/display/loading_blue.gif" />
+    <div id="quicksearchbar">
+        <img id="searchmenulink" src="/images/icons/glass.png" width="16" height="16" />
+        <roundcube:object name="searchform" id="quicksearchbox" form="true" tabindex="13" />
+        <roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" width="13" height="13" />
+    </div>
+    <roundcube:object name="addressbooks" id="directorylist" />
+    <roundcube:object name="addresslist" id="contacts-table" class="records-table" cellspacing="0" noheader="true" />
 </div>
 <div class="boxfooter">
-  <roundcube:button name="uploadmenulink" id="uploadmenulink" type="link" title="addattachment" class="button addgroup" onclick="rcmail_ui.show_popup('uploadmenu', true);return false" content=" " />
+    <div id="abookactions" class="pagenav">
+        <roundcube:button command="add-recipient" prop="to" type="link" title="to" class="button disabled" classAct="button" content="To &amp;raquo;" />
+        <roundcube:button command="add-recipient" prop="cc" type="link" title="cc" class="button disabled" classAct="button" content="Cc &amp;raquo;" />
+        <roundcube:button command="add-recipient" prop="bcc" type="link" title="bcc" class="button disabled" classAct="button" content="Bcc &amp;raquo;" />
+    </div>
+    <div id="abookcountbar" class="pagenav">
+        <roundcube:button command="firstpage" type="link" class="buttonPas firstpage" classAct="button firstpage" classSel="button firstpageSel" title="firstpage" content=" " />
+        <roundcube:button command="previouspage" type="link" class="buttonPas prevpage" classAct="button prevpage" classSel="button prevpageSel" title="previouspage" content=" " />
+        <span style="float:left">&nbsp;</span>
+        <roundcube:button command="nextpage" type="link" class="buttonPas nextpage" classAct="button nextpage" classSel="button nextpageSel" title="nextpage" content=" " />
+        <roundcube:button command="lastpage" type="link" class="buttonPas lastpage" classAct="button lastpage" classSel="button lastpageSel" title="lastpage" content=" " />
+    </div>
 </div>
 </div>
-<roundcube:object name="fileDropArea" id="compose-attachments" />
 
 <script type="text/javascript">
-  var composesplitv = new rcube_splitter({id:'composesplitterv', p1: 'compose-attachments', p2: 'compose-container', orientation: 'v', relative: true, start: 175});
-  rcmail.add_onload('composesplitv.init()');
+  var composesplitv1 = new rcube_splitter({id:'composesplitterv1', p1: 'compose-contacts', p2: 'compose-container', orientation: 'v', relative: true, start: 200});
+  rcmail.add_onload('composesplitv1.init()');
 </script>
 
 <div id="compose-container">
@@ -119,23 +135,39 @@
         </table>
     </div>
     <div id="compose-div">
-        <div class="boxlistcontent" style="overflow: hidden; top: 0">
-            <roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex="9" />
-        </div>
-        <div class="boxfooter">
-            <div id="compose-buttons">
-                <roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="10" />
-                <roundcube:button type="input" command="list" class="button" label="cancel" tabindex="11" />
+        <div id="compose-body-div">
+            <div class="boxlistcontent" style="overflow: hidden; top: 0">
+                <roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex="9" />
             </div>
-            <div id="compose-editorfooter">
-                <roundcube:if condition="!in_array('htmleditor', (array)config:dont_override)" />
-                <span>
-                    <label><roundcube:label name="editortype" /></label>
-                    <roundcube:object name="editorSelector" editorid="compose-body" tabindex="12" />
-                </span>
-                <roundcube:endif />
+            <div class="boxfooter">
+                <div id="compose-buttons">
+                    <roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="10" />
+                    <roundcube:button type="input" command="list" class="button" label="cancel" tabindex="11" />
+                </div>
+                <div id="compose-editorfooter" class="pagenav">
+                    <roundcube:if condition="!in_array('htmleditor', (array)config:dont_override)" />
+                    <span>
+                        <label><roundcube:label name="editortype" /></label>
+                        <roundcube:object name="editorSelector" editorid="compose-body" tabindex="12" />
+                    </span>
+                    <roundcube:endif />
+                </div>
             </div>
         </div>
+<script type="text/javascript">
+  var composesplitv2 = new rcube_splitter({id:'composesplitterv2', p1: 'compose-body-div', p2: 'compose-attachments', orientation: 'v', relative: true, start: $('#compose-headers-div').width() - 175});
+  rcmail.add_onload('composesplitv2.init()');
+</script>
+        <div id="compose-attachments">
+            <div class="boxtitle"><roundcube:label name="attachments" /></div>
+            <div class="boxlistcontent">
+                <roundcube:object name="composeAttachmentList" id="attachmentslist" loadingIcon="/images/display/loading_blue.gif" />
+            </div>
+            <div class="boxfooter">
+                <roundcube:button name="uploadmenulink" id="uploadmenulink" type="link" title="addattachment" class="button addgroup" onclick="rcmail_ui.show_popup('uploadmenu', true);return false" content=" " />
+            </div>
+        </div>
+        <roundcube:object name="fileDropArea" id="compose-attachments" />
     </div>
 </div>
 

--
Gitblit v1.9.1