From 26f5b0935ef4d8bc01e2b8581f7d7ed3c4508fc2 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 22 Aug 2008 06:37:48 -0400
Subject: [PATCH] Fix keyboard control of the list widgets and prevent Safari from scrolling (#1485279)

---
 skins/default/mail.css |  269 +++++++++++++++++++++++++++++------------------------
 1 files changed, 146 insertions(+), 123 deletions(-)

diff --git a/skins/default/mail.css b/skins/default/mail.css
index 0e2466c..2f83578 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -6,7 +6,7 @@
   position: absolute;
   top: 45px;
   left: 200px;
-  right: 250px;
+  right: 200px;
   height: 35px;
   white-space: nowrap;
 /*  border: 1px solid #cccccc; */
@@ -41,6 +41,49 @@
   padding-left: 2px;
 }
 
+#markmessagemenu
+{
+  position: absolute;
+  top: 32px;
+  left: 90px;
+  width: auto;
+  visibility: hidden;
+  background-color: #F9F9F9;
+  border: 1px solid #CCC;
+  padding: 1px;
+  opacity: 0.9;
+  z-index: 240;
+}
+
+ul.toolbarmenu
+{
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+
+ul.toolbarmenu li
+{
+  font-size: 11px;
+  white-space: nowrap;
+  min-width: 130px;
+  width: auto !important;
+  width: 130px;
+}
+
+ul.toolbarmenu li a
+{
+  display: block;
+  color: #a0a0a0;
+  padding: 2px 8px 3px 12px;
+  text-decoration: none;
+}
+
+ul.toolbarmenu li a.active:hover
+{
+  background-color: #ddd;
+}
+
 #listcontrols
 {
   position: absolute;
@@ -56,7 +99,9 @@
 #listcontrols a:visited,
 #mailboxcontrols a,
 #mailboxcontrols a:active,
-#mailboxcontrols a:visited
+#mailboxcontrols a:visited,
+td.formlinks a,
+td.formlinks a:visited
 {
   color: #999999;
   font-size: 11px;
@@ -68,7 +113,12 @@
 #listcontrols a.active:visited,
 #mailboxcontrols a.active,
 #mailboxcontrols a.active:active,
-#mailboxcontrols a.active:visited
+#mailboxcontrols a.active:visited,
+ul.toolbarmenu li a.active,
+ul.toolbarmenu li a.active:active,
+ul.toolbarmenu li a.active:visited,
+td.formlinks a,
+td.formlinks a:visited
 {
   color: #CC0000;
 }
@@ -83,7 +133,7 @@
 {
   position: absolute;
   bottom: 16px;
-  right: 30px;
+  right: 20px;
   width: 300px;
   height: 20px;
   text-align: right;
@@ -103,6 +153,9 @@
   left: 20px;
   right: 20px;
   bottom: 20px;
+  /* css hack for IE */
+  width: expression((parseInt(document.documentElement.clientWidth)-40)+'px');
+  height: expression((parseInt(document.documentElement.clientHeight)-100)+'px');
 }
 
 #mailcontframe
@@ -110,13 +163,13 @@
   position: absolute;
   top: 85px;
   left: 200px;
-  right: 30px;
+  right: 20px;
   bottom: 40px;
   border: 1px solid #999999;
   background-color: #F9F9F9;
   overflow: auto;
   /* css hack for IE */
-  width: expression((parseInt(document.documentElement.clientWidth)-230)+'px');
+  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px');
   height: expression((parseInt(document.documentElement.clientHeight)-125)+'px');
 }
 
@@ -125,40 +178,31 @@
   position: absolute;
   top: 305px;
   left: 200px;
-  right: 30px;
+  right: 20px;
   bottom: 40px;
   border: 1px solid #999999;
   background-color: #F9F9F9;
   /* css hack for IE */
-  width: expression((parseInt(document.documentElement.clientWidth)-230)+'px');
+  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px');
   height: expression((parseInt(document.documentElement.clientHeight)-135-document.getElementById('mailcontframe').offsetHeight)+'px');
 }
 
 #messagecontframe
-{
-  width: 100%;
-  height: 100%;
-  border: 0;
-}
-
-/*\*/
-html>body*#messagecontframe
-{
-  [height: 40%;
-  height: 40%;
-  ]height: 100%;
-}
-/**/
-
-#messagepartframe
 {
   position: absolute;
   top: 0px;
   left: 0px;
   right: 0px;
   bottom: 0px;
-  width: auto;
-  height: auto;
+  /* css hack for IE */
+  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px');
+  height: expression((parseInt(document.documentElement.clientHeight)-135-document.getElementById('mailcontframe').offsetHeight)+'px');
+}
+
+#messagepartframe
+{
+  width: 100%;
+  height: 100%;
   border: 1px solid #999999;
   background-color: #F9F9F9;
 }
@@ -169,7 +213,10 @@
   position: absolute;
   top: 10px;
   left: 220px;
+  right: 20px;
   height: 40px;
+  /* css hack for IE */
+  width: expression((parseInt(document.documentElement.clientWidth)-240)+'px');
 }
 
 #partheader table td
@@ -191,16 +238,13 @@
 
 #mailboxlist-header
 {
-  position: absolute;
-  top: 85px;
-  left: 20px;
-  width: 140px !important;
-/*  width: 162px; */
-  height: 13px;
-  padding: 3px 10px 2px 10px;
+  display: block;
+  height: 12px;
+  margin: 0;
+  padding: 3px 10px 4px 10px;
   background-color: #EBEBEB;
   background-image: url(images/listheader_aqua.gif); 
-  border: 1px solid #CCCCCC;
+  border-bottom: 1px solid #999;
   color: #333333;
   font-size: 11px;
   font-weight: bold;  
@@ -209,15 +253,15 @@
 #mailboxlist-container
 {
   position: absolute;
-  top: 105px;
+  top: 85px;
   left: 20px;
-  width: 160px;
+  width: 170px;
   bottom: 40px;
-  border: 1px solid #CCCCCC;
+  border: 1px solid #999;
   background-color: #F9F9F9;
   overflow: auto;
   /* css hack for IE */
-  height: expression((parseInt(document.documentElement.clientHeight)-145)+'px');
+  height: expression((parseInt(document.documentElement.clientHeight)-125)+'px');
 }
 
 #mailboxlist
@@ -234,12 +278,10 @@
 
 #mailboxlist li
 {
- /* height: 18px; */
   font-size: 11px;
   background: url(images/icons/folder-closed.png) no-repeat;
-  background-position: 10px 1px;
+  background-position: 5px 1px;
   border-bottom: 1px solid #EBEBEB;
-/* IE 5.5  margin-left: -16px; */
 }
 
 #mailboxlist li.inbox
@@ -270,15 +312,10 @@
 #mailboxlist li a
 {
   display: block;
-  padding-left: 32px;
+  padding-left: 25px;
   padding-top: 2px;
   padding-bottom: 2px;
   text-decoration: none;
-}
-
-#mailboxlist li, #mailboxlist li.unread
-{  
- /* background-image: url(images/mailbox_list.gif); */
 }
 
 #mailboxlist li.unread
@@ -286,13 +323,14 @@
   font-weight: bold;
 }
 
-#mailboxlist li.selected
+#mailboxlist li.selected,
+#mailboxlist li.droptarget li.selected
 {
   background-color: #929292;
-  border-bottom: 1px solid #898989;
 }
 
-#mailboxlist li.selected a
+#mailboxlist li.selected > a,
+#mailboxlist li.droptarget li.selected a
 {
   color: #FFF;
   font-weight: bold;
@@ -309,27 +347,10 @@
   padding: 0;
   margin:0;
   border-top: 1px solid #EBEBEB;  
-}
-
-#mailboxlist ul li {
   padding-left: 15px;
   background-position: 25px 1px;
-}
-
-#mailboxlist li.selected li {
   background-color: #F9F9F9;
-}
-
-#mailboxlist li.unread li {
-  font-weight: normal;
-}
-
-#mailboxlist li.unread li.unread {
-  font-weight: bold;
-}
-
-#mailboxlist li.selected li a{
-  color: black;
+  color: blue;
   font-weight: normal;
 }
 
@@ -338,7 +359,7 @@
 {
   position: absolute;
   left: 20px;
-  width: 160px;
+  width: 185px;
   bottom: 20px;
   height: 16px;
   overflow: hidden;
@@ -360,8 +381,12 @@
   display: table;
   table-layout: fixed;
   /* css hack for IE */
-  width: expression(document.getElementById('mailcontframe').clientWidth);
+  width: expression(parseInt(document.getElementById('mailcontframe').clientWidth)+'px');
 }
+
+/* safari hack \*/
+html>body*#messagelist[id$="messagelist"]:not([class="none"]) { table-layout: auto; }
+/**/
 
 #messagelist thead tr td
 {
@@ -421,6 +446,7 @@
 {
   color: #000;
   text-decoration: none;
+  white-space: nowrap;
 }
 
 #messagelist col
@@ -430,7 +456,8 @@
   vertical-align: middle;
 }
 
-#messagelist tr td.icon
+#messagelist tr td.icon,
+#messagelist tr td.flag
 {
   width: 16px;
   vertical-align: middle;
@@ -444,7 +471,7 @@
 
 #messagelist tr td.size
 {
-  width: 60px;
+  width: 70px;
   text-align: right;
   vertical-align: middle;
 }
@@ -536,14 +563,14 @@
   position: absolute;
   top: 85px;
   left: 200px;
-  right: 30px;
+  right: 20px;
   bottom: 40px;
-  border: 1px solid #cccccc;
-  background-color: #FFFFFF;
+  border: 1px solid #999;
+  background-color: #FFF;
   overflow: auto;
   /* css hack for IE */
   /* margin-bottom: 10px; */
-  width: expression((parseInt(document.documentElement.clientWidth)-240)+'px');
+  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px');
   height: expression((parseInt(document.documentElement.clientHeight)-125)+'px');
 }
 
@@ -593,13 +620,13 @@
 #attachment-list
 {
   margin: 0px;
-  padding: 0px 0px 0px 68px;
-  min-height: 18px;
+  padding: 0px 0px 0px 72px;
+  min-height: 16px;
   list-style-image: none;
   list-style-type: none;
-  background: url(images/icons/attachment.png) 52px 1px no-repeat #DFDFDF;
-  /* css hack for IE */
-  height: expression(Math.min(18, parseInt(this.clientHeight))+'px');
+  background: url(images/icons/attachment.png) 60px 2px no-repeat #DFDFDF;
+  /* IE6 hack */    
+  _height: expression(Math.min(16, parseInt(document.documentElement.clientHeight))+'px');
 }
 
 #attachment-list:after
@@ -617,7 +644,8 @@
   float: left;
   height: 18px;
   font-size: 11px;
-  padding: 2px 10px 0px 10px;
+  padding: 2px 0px 0px 15px;
+  white-space: nowrap;
 }
 
 #attachment-list li a
@@ -634,19 +662,24 @@
 {
   position:relative;
   min-height: 300px;
-  padding-top: 10px;
   padding-bottom: 10px;
   background-color: #FFFFFF;
 }
 
 div.message-part
 {
-  padding: 8px;
-  padding-top: 10px;
-  overflow: hidden;
+  padding: 10px 8px;
+  border-top: 1px solid #ccc;
+/*  overflow: hidden; */
 }
 
-div.message-part a
+#messagebody div:first-child
+{
+  border-top: 0;
+}
+
+div.message-part a,
+div.message-htmlpart a
 {
   color: #0000CC;
 }
@@ -655,8 +688,10 @@
 {
   margin: 0px;
   padding: 0px;
-  white-space: pre;
   font-family: monospace;
+  white-space: -moz-pre-wrap !important;
+  white-space: pre;
+  word-wrap: break-word; /* IE (and Safari) */
 }
 
 div.message-part blockquote
@@ -683,13 +718,22 @@
   border-right: 2px solid #bb0000;
 }
 
+body.iframe div.message-htmlpart
+{
+  margin: 8px;
+}
+
+div.message-htmlpart div.rcmBody
+{
+  margin: 8px;
+}
+
 #remote-objects-message
 {
   display: none;
-  height: 20px;
+  margin: 8px;
   min-height: 20px;
-  margin: 8px 8px 0px 8px;
-  padding: 10px 10px 6px 46px;  
+  padding: 10px 10px 6px 46px;
 }
 
 #remote-objects-message a
@@ -706,18 +750,10 @@
 
 /** message compose styles */
 
-#priority-selector
-{
-  position: absolute;
-  left: 280px;
-  top: 10px;
-}
-
+#priority-selector,
 #receipt-selector
 {
-  position: absolute;
-  left: 450px;
-  top: 10px;
+  padding-left: 30px;
 }
 
 #compose-container
@@ -725,12 +761,12 @@
   position: absolute;
   top: 90px;
   left: 200px;
-  right: 40px;
-  bottom: 40px;
+  right: 25px;
+  bottom: 30px;
   padding: 0px;
   margin: 0px;
   /* css hack for IE */
-  width: expression(document.documentElement.clientWidth-240);
+  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px');
   height: expression((parseInt(document.documentElement.clientHeight)-130)+'px');
 }
 
@@ -782,29 +818,17 @@
   white-space: nowrap;
 }
 
-#compose-headers td.add-button
+#compose-body,
+#compose-headers td textarea,
+#compose-headers td input
 {
-  width: 40px !important;
-  text-align: right;
-  vertical-align: bottom;
-}
-
-#compose-headers td.add-button a
-{
-  color: #666666;
-  font-size: 11px;
-  text-decoration: none;
+  width: 100%;
+  width: expression('99%');
 }
 
 #compose-headers td textarea
 {
-  width: 100%;
-  height: 40px;
-}
-
-#compose-headers td input
-{
-  width: 100%;
+  height: 38px;
 }
 
 #compose-cc,
@@ -818,7 +842,6 @@
 {
   margin-top: 5px;
   margin-bottom: 10px;
-  width: 99%;
   height: 90%;
   min-height: 280px;
   font-size: 9pt;

--
Gitblit v1.9.1