Code

Some changes for scrolling again
[gosa.git] / test.php
index c3ff99321e0e080e269ca75cffaaa01b2c7cee60..6588fd79754387bf5867a572460286b1f68f4d14 100644 (file)
--- a/test.php
+++ b/test.php
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-       "http://www.w3.org/TR/html4/transitional.dtd">
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html>
 <head>
 <style type="text/css">
-       
-.ObjectListViewport_Headline_Table {
-       background-color: #FF0000;
+
+.ObjectListViewport {
        width:100%;
-       height:20px;
-       border-collapse:collapse;
-}
-.ObjectListViewport_Headline_Cell {
-       border: 1px solid #000000;
 }
+
+.ObjectListViewport_Header_Table {
+       width:100%;
+       border: 0px;
+       border-collapse:collapse;
+}      
+       
 .ObjectListViewport_Entry_Table {
-       background-color: #00FF00;
        width:100%;
+       border: 0px;
        border-collapse:collapse;
 }
-.ObjectListViewport_Entry_Cell {
-       border: 1px solid #000000;
+
+.ObjectListViewport_Entry_Cover{
+
+       border: 0px;
+       margin:0px;
+       padding:0px;
 }
+
 .ObjectListViewport_Footer_Table {
-       background-color: #0000FF;
-       height:20px;
-       width:100%;
+    width:100%;
+    border: 0px;
+    border-collapse:collapse;
+}
+
+
+.ObjectListViewport_Table {
        border-collapse:collapse;
+    width:100%;
+       border: 0px;
+}
+
+.ObjectListViewport_TD_Header {
+       height:20px;
+       background-color: #CCCCCC;
+       vertical-align:middle;
+       border: 0px;
+       margin:0px;
+       padding:0px;
 }
-.ObjectListViewport_Footer_Cell {
-       border: 1px solid #000000;
+.ObjectListViewport_TD_Entries {
+       background-color: #009900;
+       vertical-align:middle;
+       border: 0px;
+       margin:0px;
+       padding:0px;
 }
+.ObjectListViewport_TD_Footer {
+       height:20px;
+       background-color: #CCCCCC;
+       vertical-align:middle;
+       border: 0px;
+       margin:0px;
+       padding:0px;
+}
+td {
+       border-left: solid 1px;
+       border-right: solid 1px;
+       font-size:1em;
+       height:22px;
+}
+
 </style>
 <script type="text/javascript">
+window.onload = setHeight;
+window.onresize = setHeight;
+
        function setHeight() {
-       //      document.getElementById("tolletable").style.height=document.defaultView.getComputedStyle(document.getElementById("tolletable"),"").getPropertyValue("height"))+"px";
-               alert(document.getElementById("tolletable").style.height());
+               dbg = document.getElementById('debug');
+
+               OVP = getComputedStyle(document.getElementById('ObjectListViewport'),"").height;
+               OVP_h = parseInt(OVP.replace(/px/,''));
+
+               table             = getComputedStyle(document.getElementById('ObjectListViewport_Table'),"").height;
+               table_header  = getComputedStyle(document.getElementById('ObjectListViewport_TD_Header'),"").height;
+               table_entries = getComputedStyle(document.getElementById('ObjectListViewport_TD_Entries'),"").height;
+               table_footer  = getComputedStyle(document.getElementById('ObjectListViewport_TD_Footer'),"").height;
+
+               table_h                 = parseInt(table.replace(/px/,''));
+               table_header_h  = parseInt(table_header.replace(/px/,''));
+               table_entries_h = parseInt(table_entries.replace(/px/,'')); 
+               table_footer_h  = parseInt(table_footer.replace(/px/,''));
+                       
+               calc = (OVP_h  - ( table_header_h + table_footer_h ));
+               document.getElementById('ObjectListViewport_Entry_Cover').style.height= calc + 'px' ;
+
+               OVP_T = getComputedStyle(document.getElementById('ObjectListViewport_Table'),"").width;
+               OVP_T_w = parseInt(OVP_T.replace(/px/,'',OVP_T));
+               
+               document.getElementById('ObjectListViewport_Entry_Table').style.width = (OVP_T_w - 16) + 'px';
        }
 </script>
 </head>
-<body>
-
-<table onmouseover="setHeight();" id="tolletable" style='height:50%;background-color: #00FF00;'><tr><td></td></tr></table>
-
-<table style='height:30px; width:50%; background-color:#FF0000;'>
-<tr>
-<td>
-<?php
-echo passthru("./test");
-?>
-</td>
-</tr>
-</table>
-</div>
+<body style="height:100%;position:relative" id='body'>
+<input type='text' id='debug' value="" style='width:100%;'>
+       <table style='height:100%;width:100%;background-color:#6788FF;border: solid 5px #000000;'>
+               <tr>
+                       <td style='width:30%;height:20%;background-color:#AAA006;'>
+                               hallo<br>
+                               hallo<br>
+                               hallo<br>
+                               hallo<br>
+                               hallo<br>
+                               hallo<br>
+                       </td>
+                       <td style='background-color:#660099;'>
+                               <?php
+                               echo passthru("./test");
+                               ?>
+                       </td>
+               </tr>
+               <tr>
+                       <td style='background-color:#999777;'>
+                               hallo<br>
+                               hallo<br>
+                       </td>
+                       <td style='background-color:#AAA006;'>
+                               hallo<br>
+                               hallo<br>
+                       </td>
+               </tr>
+       </table>
+<script type="text/javascript">
+//     document.getElementById('ObjectListViewport_Entry_Cover').style.height= document.getElementById('ObjectListViewport').height;
+//             document.getElementById('body').style.height = getComputedStyle(document.getElementById('body'),"").height;
+       document.getElementById('ObjectListViewport_Entry_Cover').style.height= "200px";
+</script>
 </body>
 </html>