Code

Scrolltables now have dynamic height.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 8 Mar 2006 14:54:23 +0000 (14:54 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 8 Mar 2006 14:54:23 +0000 (14:54 +0000)
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
html/themes/default/style.css
include/class_divlist.inc

index 0e39237130db623a201504f85b7af6600061bc73..cce26f4efedd62e56e15326f863d38d76db6d949 100644 (file)
@@ -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
index da84c56c555d07d771d2d84cbc0e5c22b252e0f8..24d62ff39830af14727b5429ccac6814f7d481b6 100644 (file)
@@ -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;
 }
 
index ab1efecae1dafe496775fc9a27529bfd445fca6d..62a4dd31e322a2e6341916e3f7e5798e9cc4bc86 100644 (file)
@@ -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<tr><td colspan='".$this->cols."' class='scrollbody'><div style='width:".$this->s_width."px;height:".($this->s_height-20)."px;' class='scrollbody'>";
-
+      $s_return .= "\n<tr><td colspan='".$this->cols."' class='scrollbody'><div style='width:".$this->s_width."px;height:".($this->s_height-20)."px;' id='d_scrollbody' class='scrollbody'>";
       $s_return .= "<table summary='' style='height:100%;width:581px;' cellspacing='0'>";
        }