]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1086 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Jun 2007 22:06:32 +0000 (22:06 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Jun 2007 22:06:32 +0000 (22:06 +0000)
UI/MailerUI/UIxMailListView.m
UI/Templates/MailerUI/UIxMailListView.wox
UI/WebServerResources/MailerUI.css
UI/WebServerResources/MailerUI.js

index de669d916bcd160f4a584503efd01268aa588888..86844b86152180dc9b3a1e9b170f6b12dcb3ff3a 100644 (file)
@@ -128,7 +128,7 @@ static int attachmentFlagSize = 8096;
   return [[[self message] valueForKey:@"uid"] stringValue];
 }
 
-- (NSString *) messageCellStyleClass 
+- (NSString *) messageRowStyleClass 
 {
   return [self isMessageDeleted]
     ? @"mailer_listcell_deleted"
@@ -137,11 +137,9 @@ static int attachmentFlagSize = 8096;
 
 - (NSString *) messageSubjectCellStyleClass 
 {
-  return [NSString stringWithFormat: @"%@ %@",
-                  [self messageCellStyleClass],
-                  ([self isMessageRead]
-                   ? @"mailer_readmailsubject"
-                   : @"mailer_unreadmailsubject")];
+  return ([self isMessageRead]
+         ? @"mailer_readmailsubject"
+         : @"mailer_unreadmailsubject");
 }
 
 - (BOOL) hasMessageAttachment 
index 55c320c854eaab5dfe5690658fa2516c9c1e881c..55d2d69abb947d5bd46ce373379bcc432e455a06 100644 (file)
@@ -5,7 +5,7 @@
     xmlns:const="http://www.skyrix.com/od/constant"
     xmlns:rsrc="OGo:url"
     xmlns:label="OGo:label">
-    <tbody>
+    <thead>
       <tr class="tableview"
         ><td class="tbtv_headercell messageFlagColumn"
           ><var:entity const:name="nbsp" /></td
             const:isDefault="YES"
             /></td
           ></tr>
-      <var:if condition="showsAllMessages" const:negate="YES"
-        ><tr class="tableview"
-          ><td colspan="6" class="tbtv_navcell"
-            ><var:if condition="hasPrevious">
-              <a href="#"
-                idx="1"><var:string label:value="first"/></a> |
-              <a href="#"
-                var:idx="prevFirstMessageNumber"
-                ><var:string label:value="previous"/></a> |
-            </var:if>
-            <var:string value="firstMessageNumber" />
-            <var:string label:value="msgnumber_to" />
-            <var:string value="lastMessageNumber" />
-            <var:string label:value="msgnumber_of" />
-            <var:string value="sortedUIDs.count" />
+      <tr class="tableview"
+       ><td colspan="6" class="tbtv_navcell"
+         ><var:if condition="hasPrevious">
+           <a href="#"
+             idx="1"><var:string label:value="first"/></a> |
+           <a href="#"
+             var:idx="prevFirstMessageNumber"
+             ><var:string label:value="previous"/></a> |
+         </var:if>
+         <var:string value="firstMessageNumber" />
+         <var:string label:value="msgnumber_to" />
+         <var:string value="lastMessageNumber" />
+         <var:string label:value="msgnumber_of" />
+         <var:string value="sortedUIDs.count" />
             <var:if condition="hasNext"
-              >| <a href="#"
-                var:idx="nextFirstMessageNumber"
-                ><var:string label:value="next" /></a>
-            </var:if
-              ></td
-            ></tr
-          ></var:if>
+           >| <a href="#"
+             var:idx="nextFirstMessageNumber"
+             ><var:string label:value="next" /></a>
+         </var:if
+           ></td
+         ></tr
+          >
+    </thead>
+    <tbody>
       <var:foreach list="messages" item="message"
-        ><tr class="tableview" var:id="msgRowID"
-          ><td></td
-            ><td><var:if condition="hasMessageAttachment"
+        ><tr var:class="messageRowStyleClass" var:id="msgRowID"
+          ><td class="messageFlagColumn"><var:entity name="nbsp"/></td
+            ><td class="messageFlagColumn"
+           ><var:if condition="hasMessageAttachment"
               ><img rsrc:src="title_attachment_14x14.png"
                 /></var:if
               ></td
@@ -86,8 +88,7 @@
               formatter="context.mailSubjectFormatter"
               /></td
 
-            ><td
-            var:class="messageCellStyleClass"
+            ><td class="messageAddressColumn"
             ><var:if condition="showToAddress" const:negate="YES"
               ><var:string value="message.envelope.from"
                 formatter="context.mailEnvelopeAddressFormatter"
@@ -98,7 +99,7 @@
                 /></var:if
               ></td
             
-            ><td var:class="messageCellStyleClass"
+            ><td class="messageFlagColumn"
             ><var:if condition="isMessageRead"
               ><img rsrc:src="icon_read.gif"
                 class="mailerReadIcon"
                 /></var:if
               ></td
             
-            ><td var:class="messageCellStyleClass"
+            ><td class="messageDateColumn"
             ><span class="mailer_datefield"
               ><var:string value="message.envelope.date" 
                 formatter="context.mailDateFormatter"
index 014e08dd0bb0a27f5efab039687e227847642501..d1ff0109c3921dfaee63c1b4887fe0a8223e49b7 100644 (file)
@@ -49,7 +49,7 @@ DIV#mailboxContent
 { background-color: #fff;
   position: absolute;
   width: 100%;
-  height: 18em;
+  height: 15.5em;
   left: 0px;
   top: 2.5em;
   right: 0px; }
@@ -251,12 +251,12 @@ td.mailer_unreadmailsubject a
   text-decoration: none;
 }
 
-td.mailer_listcell_deleted
+tr.mailer_listcell_deleted td
 {
   text-decoration: line-through;
 }
 
-td.mailer_listcell_regular a
+tr.mailer_listcell_regular td a
 {
   color: black;
   text-decoration: none;
@@ -477,34 +477,37 @@ TABLE#messageList
   width: 100%;
   left: 0px;
   right: 0px;
-  top: 0px;
-  bottom: 0px;
+  top: 3.25em;
+  bottom: 1px;
   overflow: auto;
-  overflow-x: hidden;
-}
+  overflow-x: hidden; }
 
-TABLE#messageList TBODY
-{
+TABLE#messageList THEAD
+{ position: fixed;
+  margin-top: 1px;
+  top: 7.5em;
   right: 0px;
-  left: 0px;
-  bottom: 3em;
-  width: 100%;
-  background: #fff;
-  color: #000;
-}
+  left: 15.5em;
+  height: 2em; }
 
 TABLE#messageList TD
-{ 
-  height: 1.2em;  
-}
+{ height: 1.2em; }
 
-TABLE#messageList TD.tbtv_subject_headercell
+TABLE#messageList TD.messageFlagColumn
+{ width: 1em;
+  text-align: center; }
+
+TABLE#messageList TD.tbtv_subject_headercell,
+TABLE#messageList td.mailer_unreadmailsubject,
+TABLE#messageList td.mailer_readmailsubject
 { width: 40%; }
 
-TABLE#messageList TD.tbtv_from_headercell
+TABLE#messageList TD.tbtv_from_headercell,
+TABLE#messageList TD.messageAddressColumn
 { width: 35%; }
 
-TABLE#messageList TD.tbtv_date_headercell
+TABLE#messageList TD.tbtv_date_headercell,
+TABLE#messageList TD.messageDateColumn
 { width: 25%; }
 
 TABLE#messageList TR._selected TD
@@ -536,8 +539,3 @@ DIV#rightDragHandle
   right: 0px;
   height: 5px;
 }
-
-TD.messageFlagColumn
-{
-  width: 1em !important;
-}
index 8dc1cb303c37ca7a1d4118ac383338b352cc533a..a88ec830d01a5c308c3f9e970c55232bcc35568b 100644 (file)
@@ -937,36 +937,33 @@ var messageListData = function(type) {
 function configureMessageListEvents() {
    var messageList = $("messageList");
    if (messageList) {
-      Event.observe(messageList, "mousedown", onMessageSelectionChange.bindAsEventListener(messageList));
-      var rows = messageList.tBodies[0].rows;
-      var start = 0;
-      if (rows.length > 1) {
-        if ($(rows[start].cells[0]).hasClassName("tbtv_headercell"))
-           start++;
-        if ($(rows[start].cells[0]).hasClassName("tbtv_navcell")) {
-           var anchors = $(rows[start].cells[0]).childNodesWithTag("a");
-           for (var i = 0; i < anchors.length; i++)
-              Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i]));
-           start++;
-        }
-        for (var i = start; i < rows.length; i++) {
-           Event.observe(rows[i], "mousedown", onRowClick);
-           Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
-           
-           rows[i].dndTypes = function() { return new Array("mailRow"); };
-           rows[i].dndGhost = messageListGhost;
-           rows[i].dndDataForType = messageListData;
-           document.DNDManager.registerSource(rows[i]);
-           
-           for (var j = 0; j < rows[i].cells.length; j++) {
-              var cell = rows[i].cells[j];
-              Event.observe(cell, "mousedown", listRowMouseDownHandler);
-              if (j == 2 || j == 3 || j == 5)
-                 Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell));
-              else if (j == 4) {
-                 var img = cell.childNodesWithTag("img")[0];
-                 Event.observe(img, "click", mailListMarkMessage);
-              }
+      Event.observe(messageList, "mousedown",
+                   onMessageSelectionChange.bindAsEventListener(messageList));
+      var cell = messageList.tHead.rows[1].cells[0];
+      if ($(cell).hasClassName("tbtv_navcell")) {
+        var anchors = $(cell).childNodesWithTag("a");
+        for (var i = 0; i < anchors.length; i++)
+           Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i]));
+      }
+
+      rows = messageList.tBodies[0].rows;
+      for (var i = 0; i < rows.length; i++) {
+        Event.observe(rows[i], "mousedown", onRowClick);
+        Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
+        
+        rows[i].dndTypes = function() { return new Array("mailRow"); };
+        rows[i].dndGhost = messageListGhost;
+        rows[i].dndDataForType = messageListData;
+        document.DNDManager.registerSource(rows[i]);
+        
+        for (var j = 0; j < rows[i].cells.length; j++) {
+           var cell = rows[i].cells[j];
+           Event.observe(cell, "mousedown", listRowMouseDownHandler);
+           if (j == 2 || j == 3 || j == 5)
+              Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell));
+           else if (j == 4) {
+              var img = cell.childNodesWithTag("img")[0];
+              Event.observe(img, "click", mailListMarkMessage);
            }
         }
       }