From: hickert Date: Wed, 7 Nov 2007 14:27:26 +0000 (+0000) Subject: Enabled resizing for IE too X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=07fbc1b0ac6d41bdbf8e1f694e8f1f1b4b28745d;p=gosa.git Enabled resizing for IE too git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7745 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/test.php b/test.php index 718e51269..fa833cf1a 100644 --- a/test.php +++ b/test.php @@ -81,7 +81,15 @@ window.onresize = updateObjectListViewportSize; function updateObjectListViewportSize() { - dbg = document.getElementById('debug'); + var dbg = document.getElementById('debug'); + + /* Somehow IE do not need to be resized + * So skip the following part if the client uses ie + */ + if(document.all){ + document.getElementById('ObjectListViewport_Entry_Cover').style.height= "100%"; + return; + } /* Set Viewport to min height, to ensure * that resize will work correctly in konqueror @@ -90,35 +98,38 @@ window.onresize = updateObjectListViewportSize; document.getElementById('ObjectListViewport_Entry_Cover').style.display= "none"; document.getElementById('ObjectListViewport_Entry_Cover').style.display= "block"; + /* Get values of displayed header and footer heights to be * able to recalculate the Viewport */ - viewport = getObjectHeight('ObjectListViewport_Table'); - header = getObjectHeight('ObjectListViewport_TD_Header'); - footer = getObjectHeight('ObjectListViewport_TD_Footer'); + var viewport = getObjectHeight('ObjectListViewport_Table'); + var header = getObjectHeight('ObjectListViewport_TD_Header'); + var footer = getObjectHeight('ObjectListViewport_TD_Footer'); /* Calculate the new visible entry part height. */ - calc = (viewport - ( header + footer )); - document.getElementById('ObjectListViewport_Entry_Cover').style.height= calc + 'px' ; + var calc = (viewport - ( header + footer )); + calc = 200; + document.getElementById('ObjectListViewport_Entry_Cover').style.height = calc; /* Reduce width of entry list, we need some space to * display the scrollbar without breaking the layout */ - viewport_ = getObjectWidth('ObjectListViewport_Table'); - document.getElementById('ObjectListViewport_Entry_Table').style.width = (OVP_T_w - 16) + 'px'; + var viewport = getObjectWidth('ObjectListViewport_Table'); + document.getElementById('ObjectListViewport_Entry_Table').style.width = (viewport - 16) + 'px'; } + /* Return integer value of style attribute width for specified ID */ function getObjectWidth(obj){ obj = getComputedStyle(document.getElementById(obj),"").width; - return(parseInt(obj.replace(/px/,''))); + return(parseInt(obj.replace(/px/,''))); } /* Return integer value of style attribute height for specified ID */ function getObjectHeight(obj){ obj = getComputedStyle(document.getElementById(obj),"").height; return(parseInt(obj.replace(/px/,''))); - } + }