* Eliminated the <tbody> from the message summary view. JS now replaces the entire...
authorArt Cancro <ajc@citadel.org>
Sun, 11 Jul 2010 02:23:02 +0000 (02:23 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 11 Jul 2010 02:23:02 +0000 (02:23 +0000)
* I also eliminated the fix_scrollbar_bug div in this view because it is apparently not needed anymore (it was intended to fix a rendering bug in IE5 and IE6).  There is no need to wage an aggressive war on this div, but I will remove it from various places when the opportunity arises.

webcit/static/summaryview.js
webcit/static/t/msg_listview.html
webcit/static/t/summary_header.html
webcit/static/t/summary_trailer.html
webcit/static/webcit.css

index 80ff3414df8fba6e12683b3ff2bf13ba1dffdf6b..a569e68abdc8e69272b762bcb52f9668938f74e0 100644 (file)
@@ -83,7 +83,6 @@ function createMessageView() {
        $('resize_msglist').observe('mousedown', CtdlResizeMouseDown);
        $('m_refresh').observe('click', getMessages);
        document.getElementById('m_refresh').setAttribute("href","#");
-       Event.observe(document.onresize ? document : window, "resize", normalizeHeaderTable);
        Event.observe(document.onresize ? document : window, "resize", sizePreviewPane);
        $('summpage').observe('change', getPage);
        takeOverSearchOMatic();
@@ -188,7 +187,7 @@ function resortAndDisplay(sortMode) {
        var start = new Date();
        var length = msgs.length;
        var compiled = new Array(length+2);
-       compiled[0] = "<tbody xmlns:citadel=\"http://citadel.org\" id=\"message_list_body\" class=\"mailbox_summary\">";
+       compiled[0] = "<table class=\"mailbox_summary\" id=\"summary_headers\" \"cellspacing=0\" style=\"width:100%;-moz-user-select:none;\">";
        for(var x=0; x<length; ++x) {
                try {
                        var currentRow = msgs[x];
@@ -214,7 +213,7 @@ function resortAndDisplay(sortMode) {
                        WCLog("Exception on row " +  x + ":" + e);
                }
        }
-       compiled[length+2] = "</tbody>";
+       compiled[length+2] = "</table>";
        var end = new Date();
        WCLog("iterate: " + (end-start));
        var compile = compiled.join("");
@@ -226,7 +225,6 @@ function resortAndDisplay(sortMode) {
        var delta = end.getTime() - start.getTime();
        WCLog("append: " + delta);
        ApplySorterToggle();
-       normalizeHeaderTable();
 }
 function sortRowsByDateAscending(a, b) {
        var dateOne = a[3];
@@ -519,17 +517,6 @@ function ApplySorterToggle() {
        }
        currentSorterToggle.className = className;
 }
-/** Hack to make the header table line up with the data */
-function normalizeHeaderTable() {
-       var message_list_hdr = document.getElementById("message_list_hdr");
-       var summary_view = document.getElementById("summary_view");
-       var resize_msglist = document.getElementById("resize_msglist");
-       var headerTable = message_list_hdr.getElementsByTagName("table")[0];
-       var dataTable = summary_view.getElementsByTagName("table")[0];
-       var dataTableWidth = dataTable.offsetWidth;
-       headerTable.style.width = dataTableWidth+"px";
-}
-
 function setupPageSelector() {
        var summpage = document.getElementById("summpage");
        var select_page = document.getElementById("selectpage");
index d68d08a475bb9f74a7747a0e6fd107a97586e47a..948096c0d5ebed21e283794c381717f704c138c6 100644 (file)
@@ -14,7 +14,7 @@ var sortmode = ""; /*"<?PREF:ROOM:VALUE("sort")>";*/
        </table>
 </div>
 <div id="summary_view">
-  <table><tbody id="message_list_body" class="mailbox_summary"><tr style="display: none;"><td colspan="4"></td></tr></tbody></table>
+  <table id="message_list_body" class="mailbox_summary"><tr style="display: none;"><td colspan="4"></td></tr></table>
     <div id="loading">
       <p><img src="static/throbber.gif" alt=""></p>
       <p><?_("Loading messages from server, please wait")></p>
index a2ba500f2f04871bad6e9bad3eb47253db8f2ef6..254d0293cf41e1d8551a070e1d16224e0cf83880 100644 (file)
@@ -3,16 +3,14 @@
   document.onkeydown = CtdlMsgListKeyPress;
 </script>
 <div id="message_list_hdr">
-<div class="fix_scrollbar_bug">
-   <table cellspacing=0 style="width:100%%">
- <tr>
- <th width=50%><?_("Subject")><a href="readfwd?startmsg=1&amp;maxmsgs=9999999&amp;is_summary=1&amp;SortOrder=<?SORT:ORDER("subject")>&amp;SortBy=<?SORT:NEXT("subject")>"><img src="<?SORT:ICON("subject")>" /></a> </th>
- <th width=30%><?_("Sender")><a href="readfwd?startmsg=1&amp;maxmsgs=9999999&amp;is_summary=1&amp;SortOrder=<?SORT:ORDER("sender")>&amp;SortBy=<?SORT:NEXT("sender")>"><img src="<?SORT:ICON("sender")>" /></a> </th>
- <th width=20%><?_("Date")><a href="readfwd?startmsg=1&amp;maxmsgs=9999999&amp;is_summary=1&amp;SortOrder=<?SORT:ORDER("date")>&amp;SortBy=<?SORT:NEXT("date")>"><img border="0" src="<?SORT:ICON("date")>" /></a>
-&nbsp; <input type="submit" name="delete_button" id="delbutton" onClick="CtdlDeleteSelectedMessages(event)" value="<?_("Delete")>"></th>
+<table cellspacing=0 style="width:100%%">
+<tr>
+<th class="col1"><?_("Subject")><a href="readfwd?startmsg=1&amp;maxmsgs=9999999&amp;is_summary=1&amp;SortOrder=<?SORT:ORDER("subject")>&amp;SortBy=<?SORT:NEXT("subject")>"><img src="<?SORT:ICON("subject")>" /></a></th>
+<th class="col2"><?_("Sender")><a href="readfwd?startmsg=1&amp;maxmsgs=9999999&amp;is_summary=1&amp;SortOrder=<?SORT:ORDER("sender")>&amp;SortBy=<?SORT:NEXT("sender")>"><img src="<?SORT:ICON("sender")>" /></a></th>
+<th class="col3"><?_("Date")><a href="readfwd?startmsg=1&amp;maxmsgs=9999999&amp;is_summary=1&amp;SortOrder=<?SORT:ORDER("date")>&amp;SortBy=<?SORT:NEXT("date")>"><img border="0" src="<?SORT:ICON("date")>" /></a></th>
 </tr>
-</table></div></div>
+</table>
+</div>
 <div id="message_list">
-<div class="fix_scrollbar_bug">
-<table class="mailbox_summary" id="summary_headers" "cellspacing=0" style="width:100%;-moz-user-select:none;">
+<div id="message_list_body">
 <!-- end summary_header.html -->
index 49e2f2cfa34acca33f6d3eba5a9a8be0ea606288..c5c2827621effbe00dcec8a42636c88d3070cf81 100644 (file)
@@ -1,4 +1,3 @@
-</table>
 </div>
 </div>
 <div id="resize_msglist" onMouseDown="CtdlResizeMsgListMouseDown(event)">
index b3699d78652cc3685564f6bccdcb9f9a013df6e3..7a55b26fa6771597e2e2f518e54509585af445af 100644 (file)
@@ -653,11 +653,13 @@ body, #global {
        cursor: pointer;
 }
 
-#message_list_body {
-       background-color: white !important;
+#summary_headers {
+       background-color: white;
+       width: 100%;
+       table-layout: fixed;
 }
 
-#message_list_body tr td {
+#summary_headers tr td {
        overflow-y: hidden;
        overflow-x: hidden; /* stop long subjects overflowing */
 }