From 3bc6ae04ae11a2e84a457a80a3892d6072bcc334 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Wed, 17 Oct 2012 17:32:08 -0400
Subject: [PATCH] Adapt classic skin to new extwin feature

---
 skins/classic/mail.css                      |   19 ++++++++++++++++++-
 skins/classic/common.css                    |    5 +++++
 skins/classic/templates/message.html        |    7 +++++++
 skins/classic/templates/compose.html        |   10 +++++++++-
 skins/larry/mail.css                        |    5 +++++
 skins/classic/includes/messagetoolbar.html  |    6 ++++--
 skins/classic/templates/messagepreview.html |    2 +-
 7 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/skins/classic/common.css b/skins/classic/common.css
index 735a736..8f5daee 100644
--- a/skins/classic/common.css
+++ b/skins/classic/common.css
@@ -156,6 +156,11 @@
   left: 20px;
 }
 
+.extwin #mainscreen
+{
+  top: 43px;
+}
+
 body > #logo
 {
   margin-left: 12px;
diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html
index 302e950..eebb557 100644
--- a/skins/classic/includes/messagetoolbar.html
+++ b/skins/classic/includes/messagetoolbar.html
@@ -1,10 +1,12 @@
 <div id="messagetoolbar">
-<roundcube:if condition="template:name == 'message'" />
+<roundcube:if condition="template:name == 'message' && env:extwin" />
+<roundcube:button command="close" type="link" class="button back" classAct="button back" classSel="button backSel" title="close" content=" " />
+<roundcube:elseif condition="template:name == 'message'" />
 <roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " />
 <roundcube:else />
 <roundcube:button command="checkmail" type="link" class="button checkmail" classAct="button checkmail" classSel="button checkmailSel" title="checkmail" content=" " />
-<roundcube:endif />
 <roundcube:button command="compose" type="link" class="button compose" classAct="button compose" classSel="button composeSel" title="writenewmessage" content=" " />
+<roundcube:endif />
 <roundcube:button command="reply" type="link" class="buttonPas reply" classAct="button reply" classSel="button replySel" title="replytomessage" content=" " />
 <span class="dropbutton">
 <roundcube:button command="reply-all" type="link" class="buttonPas replyAll" classAct="button replyAll" classSel="button replyAllSel" title="replytoallmessage" content=" " />
diff --git a/skins/classic/mail.css b/skins/classic/mail.css
index 4b54f22..08d1266 100644
--- a/skins/classic/mail.css
+++ b/skins/classic/mail.css
@@ -13,6 +13,12 @@
 /*  border: 1px solid #cccccc; */
 }
 
+.extwin #messagetoolbar
+{
+  top: 5px;
+  left: 20px;
+}
+
 #messagetoolbar a,
 #messagetoolbar select
 {
@@ -1041,6 +1047,11 @@
   z-index: 1;
 }
 
+.extwin #messageframe
+{
+	left: 0;
+}
+
 div.messageheaderbox
 {
   margin: -14px 8px 0px 8px;
@@ -1245,7 +1256,7 @@
   color: #333333;
 }
 
-#messageviewlink
+#openextwinlink
 {
   position: absolute;
   top: 8px;
@@ -1255,6 +1266,12 @@
   border: 0;
 }
 
+#compose-headers #openextwinlink
+{
+	top: 4px;
+	right: 2px;
+}
+
 #full-headers
 {
   color: #666666;
diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html
index 1e1403e..985e62e 100644
--- a/skins/classic/templates/compose.html
+++ b/skins/classic/templates/compose.html
@@ -15,15 +15,22 @@
 }
 </style>
 </head>
+<roundcube:if condition="env:extwin" />
+<body class="extwin" onload="rcube_init_mail_ui()">
+<roundcube:else />
 <body onload="rcube_init_mail_ui()">
-
 <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" />
+    <roundcube:button command="close" type="link" class="button back" classAct="button back" classSel="button backSel" title="close" content=" " />
+<roundcube:else />
     <roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " />
+<roundcube:endif />
     <roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " />
 <roundcube:if condition="config:enable_spellcheck" />
     <span class="dropbutton">
@@ -64,6 +71,7 @@
             <td class="editfield formlinks">
                 <roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" />
                 <a href="#identities" onclick="return rcmail.command('identities')"><roundcube:label name="editidents" /></a>
+                <roundcube:button command="extwin" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="openextwinlink" condition="!env:extwin" />
             </td>
         </tr><tr>
             <td class="title top"><label for="_to"><roundcube:label name="to" /></label></td>
diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html
index c03376e..9b7cb9f 100644
--- a/skins/classic/templates/message.html
+++ b/skins/classic/templates/message.html
@@ -12,13 +12,19 @@
 }
 </style>
 </head>
+<roundcube:if condition="env:extwin" />
+<body class="extwin" onload="rcube_init_mail_ui()">
+<roundcube:else />
 <body onload="rcube_init_mail_ui()">
 
 <roundcube:include file="/includes/taskbar.html" />
 <roundcube:include file="/includes/header.html" />
+<roundcube:endif />
+
 <roundcube:include file="/includes/messagetoolbar.html" />
 
 <div id="mainscreen">
+<roundcube:if condition="!env:extwin" />
 <div id="mailleftcontainer">
 <div id="mailboxlist-container">
 <div id="mailboxlist-title" class="boxtitle"><roundcube:label name="mailboxlist" /></div>
@@ -28,6 +34,7 @@
 <div class="boxfooter"></div>
 </div>
 </div>
+<roundcube:endif />
 
 <div id="messageframe">
 <div class="boxlistcontent" style="top:0; overflow-x:auto">
diff --git a/skins/classic/templates/messagepreview.html b/skins/classic/templates/messagepreview.html
index a606311..78b2306 100644
--- a/skins/classic/templates/messagepreview.html
+++ b/skins/classic/templates/messagepreview.html
@@ -7,7 +7,7 @@
 <body class="iframe">
 
 <div class="messageheaderbox">
-<roundcube:button command="permaurl" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="messageviewlink" target="_blank" />
+<roundcube:button command="extwin" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="openextwinlink" />
 <roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/silhouette.png" summary="Message headers" />
 <roundcube:object name="messageFullHeaders" id="full-headers" />
 <roundcube:object name="messageAttachments" id="attachment-list" />
diff --git a/skins/larry/mail.css b/skins/larry/mail.css
index b819e77..3ec325b 100644
--- a/skins/larry/mail.css
+++ b/skins/larry/mail.css
@@ -1174,6 +1174,11 @@
 	z-index: 100;
 }
 
+#composebuttons a.button.extwin {
+	padding: 2px 3px;
+	margin-top: -3px;
+}
+
 .compose-headers {
 	width: 99%;
 	margin: 4px 0;

--
Gitblit v1.9.1