X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fstatic%2Fwclib.js;h=6566a1985621000c94dce9b496e7790964c36e6d;hb=cd965b7e2a4e76ebe30b4c3155920e97b1350109;hp=f7db14842e728dd7565401bed530cba5f38dd655;hpb=e6e1bf8f54aa65daad568557e7c9fdfebc1988a8;p=citadel.git diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index f7db14842..6566a1985 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -147,7 +147,7 @@ function setupIconBar() { } } var online_users = document.getElementById("online_users"); - if (online_users.offsetParent != null) { + if (online_users.offsetParent != null && online_users.offsetTop > 0) { new Ajax.PeriodicalUpdater('online_users', 'do_template?template=wholist_section', {method: 'get', frequency: 30}); } } @@ -789,6 +789,21 @@ function fixMissingCSSTable(elems) { } } function fixbanner() { + // Use prototype api methods here var elems = [$('room_banner'),$('actiondiv')]; fixMissingCSSTable(elems); + var banner = $('banner'); + if (banner != null) { + } +} + +function fixOffsetBanner() { + var banner = document.getElementById("banner"); + if (banner.offsetLeft > 0) { + var viewportWidth = document.viewport.getWidth(); + var iconbarWidth = document.getElementById("iconbar").offsetWidth; + var contentDiv = document.getElementById("content"); + var newContentWidth = viewportWidth-iconbarWidth; + contentDiv.style.width = newContentWidth+"px"; + } }