* Fix some IE (mainly IE6) overflow issues
authorMatt <matt@uncensored.citadel.org>
Sun, 1 Feb 2009 06:14:51 +0000 (06:14 +0000)
committerMatt <matt@uncensored.citadel.org>
Sun, 1 Feb 2009 06:14:51 +0000 (06:14 +0000)
webcit/static/summaryview.js
webcit/static/wclib.js
webcit/static/webcit.css

index e628a6c66c8de6861fce6abbeb52b10f055da1ad..0b0e1e405e019094800f5173ed627e8427a8ad5e 100644 (file)
@@ -127,7 +127,8 @@ function loadMessages(transport) {
       var x=j;
       if (x==4) x=3;
       var classStmt = "col"+x;
-      tdElement.setAttribute("class", classStmt);
+      //tdElement.setAttribute("class", classStmt);
+      tdElement.className = classStmt;
        } catch (e) {
          WCLog("Error on #"+msgId +" col"+j+":"+e);
        }
@@ -144,7 +145,7 @@ function loadMessages(transport) {
   var delta = end.getTime() - start.getTime();
     WCLog("loadMessages construct: " + delta);
   } catch (e) {
-    window.alert(e);
+    //window.alert(e+"|"+e.description);
   }
   if (currentSortMode == null) {
   if (sortmode.length < 1) {
index 6566a1985621000c94dce9b496e7790964c36e6d..5d530d56681c11c3b4b868ddc504c432d54ffeb4 100644 (file)
@@ -28,6 +28,8 @@ var ns6=document.getElementById&&!document.all;
 Event.observe(window, 'load', ToggleTaskDateOrNoDateActivate);
 Event.observe(window, 'load', taskViewActivate);
 Event.observe(window, 'load', fixbanner);
+Event.observe(window, 'load', resizeViewport);
+Event.observe(window, 'resize', resizeViewport);
 //document.observe("dom:loaded", setupPrefEngine);
 document.observe("dom:loaded", setupIconBar);
 document.observe('dom:loaded', function() { if (!!document.getElementById("ib_chat_launch")) { $('ib_chat_launch').observe('click', launchChat); } });
@@ -807,3 +809,25 @@ function fixOffsetBanner() {
     contentDiv.style.width = newContentWidth+"px";
   }
 }
+/** Attempt to stop overflowing in x-axis in IE */
+function resizeViewport() {
+  var documentWidth = 0;
+  var viewportWidth = document.viewport.getWidth();
+  var iconbar = $('iconbar');
+  var global = $('global');
+  if (typeof window.offsetWidth != 'undefined') {
+    documentWidth = window.offsetWidth;
+  } else {
+    documentWidth = document.documentElement.offsetWidth;
+  }
+  if (documentWidth > viewportWidth) {
+    WCLog("resizeViewport");
+    document.documentElement.style.width = viewportWidth+"px";
+    document.documentElement.style.overflowX = "hidden";
+    //viewportWidth = 0.98 * viewportWidth;
+    var newIconBarSize = 0.16 * viewportWidth;
+    var newContentSize = viewportWidth - newIconBarSize;
+    iconbar.style.width = newIconBarSize+"px";
+    global.style.width = newContentSize+"px";
+  }
+}
index 172adbc1240f62f1e20f7997825b2b33b2c26196..269b4dfdacac40825d4c06704c5d8eca0d661a72 100644 (file)
@@ -592,12 +592,13 @@ body, #global {
 #summary_view {
        height: 100px;
        overflow-y: scroll;
+    overflow-x: hidden;
        cursor: pointer;
 }
 #message_list_body {
     background-color: white !important;
 }
-#message_list_body > tr > td {
+#message_list_body tr td {
     overflow-y: hidden;
     overflow-x: hidden; /* stop long subjects overflowing */
 }
@@ -1094,7 +1095,10 @@ dt { clear: both; }
 .imsg {
        text-align: center;
 }
-#summary_view > table {
+#summary_view table {
+    table-layout: fixed; /* stops long subjects overflowing */
+}
+#summary_view > table { /* hide from IE6 */
     width: 100%;
 }
 colgroup.entity {