From: Matt Date: Sun, 1 Feb 2009 06:14:51 +0000 (+0000) Subject: * Fix some IE (mainly IE6) overflow issues X-Git-Tag: v7.86~1515 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=1e3745a84de11cb5c546d72c27eeee06764ac4f1 * Fix some IE (mainly IE6) overflow issues --- diff --git a/webcit/static/summaryview.js b/webcit/static/summaryview.js index e628a6c66..0b0e1e405 100644 --- a/webcit/static/summaryview.js +++ b/webcit/static/summaryview.js @@ -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) { diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 6566a1985..5d530d566 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -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"; + } +} diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index 172adbc12..269b4dfda 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -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 {