From 25048087bde8fa8ae0817afce0cd009a8d8aa328 Mon Sep 17 00:00:00 2001 From: janw Date: Wed, 8 Mar 2006 14:54:23 +0000 Subject: [PATCH] Scrolltables now have dynamic height. Need to test... (Testes with Firefox and Konqueror) git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2824 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/include/focus.js | 13 ++++++++++++- html/themes/default/style.css | 6 +++--- include/class_divlist.inc | 16 +++++++--------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/html/include/focus.js b/html/include/focus.js index 0e3923713..cce26f4ef 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -22,7 +22,7 @@ function keyPress(DnEvents) { if(typeof(nextfield)!='undefined') { if(nextfield == 'login') { return true; // submit, we finished all fields - } else { // we're not done yet, send focus to next box + } else { // we are not done yet, send focus to next box eval('document.mainform.' + nextfield + '.focus()'); return false; } @@ -195,4 +195,15 @@ function js_check(form) { form.javascript.value = 'true'; } +window.onload = register; +window.onresize = register; + +function register(e) { + if (!e) e=window.event; + var px_height= window.innerHeight-220; + if(px_height >= 480) { + document.getElementById("d_scrollbody").style.height=px_height+"px"; + } + return true; +} // vim:ts=2:syntax diff --git a/html/themes/default/style.css b/html/themes/default/style.css index da84c56c5..24d62ff39 100644 --- a/html/themes/default/style.css +++ b/html/themes/default/style.css @@ -51,15 +51,15 @@ td.listheader#properties7 { width:136px; } -td.listheader#8properties { +td.listheader#properties8 { width:152px; } -td.listheader#9properties { +td.listheader#properties9 { width:168px; } -td.listheader#10properties { +td.listheader#properties10 { width:186px; } diff --git a/include/class_divlist.inc b/include/class_divlist.inc index ab1efecae..62a4dd31e 100644 --- a/include/class_divlist.inc +++ b/include/class_divlist.inc @@ -8,7 +8,7 @@ class divlist { var $summary; var $cols; var $pageid; - + // Members for page managment var $i_currentPage; var $i_entriesPerPage; @@ -20,13 +20,12 @@ class divlist { $this->i_entriesPerPage = 10; $this->s_height = "500"; $this->s_width = "600"; - $this->s_summary = ""; - $this->a_entries = array(); - $this->a_header = array(); + $this->s_summary = ""; + $this->a_entries = array(); + $this->a_header = array(); $this->b_displayPageNums= true; - $this->cols = 0; - $this->pageid = $pageid ; - + $this->cols = 0; + $this->pageid = $pageid; } function __destruct(){ @@ -132,8 +131,7 @@ class divlist { if($this->i_entriesPerPage == 0) { // We need to construct a "body"-table that is width-of-scrollbar thinner than the "head"-table. - $s_return .= "\n
"; - + $s_return .= "\n
"; $s_return .= ""; } -- 2.30.2