X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_divlist.inc;h=52eaecce87fb642fae430ec7c3afbf368377b0d6;hb=8ed10a962338dacc357d1aee6eb1d70729b9f4b6;hp=d8ee0fb80bb7427bac07a0b60d2e9695e9301393;hpb=d62ed7cb69f480b64aa4f5098d2b8bd851afbeee;p=gosa.git diff --git a/include/class_divlist.inc b/include/class_divlist.inc index d8ee0fb80..52eaecce8 100644 --- a/include/class_divlist.inc +++ b/include/class_divlist.inc @@ -5,9 +5,12 @@ class divlist { var $a_entries; var $a_header; var $b_displayPageNums; - var $summary; + var $s_summary; var $cols; var $pageid; + //FIXME: Ignoring the fact, that they were missing - height and width are numeric... + var $s_height; + var $s_width; // Members for page managment var $i_currentPage; @@ -18,7 +21,7 @@ class divlist { $this->i_currentPage = 0; $this->i_entriesPerPage = 10; - $this->s_height = "500"; + $this->s_height = "450"; $this->s_width = "600"; $this->s_summary = ""; $this->a_entries = array(); @@ -58,7 +61,9 @@ class divlist { function DrawList(){ $s_return = ""; - $s_return.= ""; + $s_return.= "
"; $s_return.= $this->_generateHeader(); $s_return.=$this->_generatePage(); @@ -71,30 +76,29 @@ class divlist { function _numpages(){ $cnt = count($this->a_entries); - $tmp = $cnt % $this->i_entriesPerPage; $pages = (int) ($cnt / $this->i_entriesPerPage); - if($tmp) $pages ++; + if($cnt % $this->i_entriesPerPage){ + $pages++; + } return $pages; } function _numentries(){ - $cnt = count($this->a_entries); - return $cnt; + return count($this->a_entries); } function _generateHeader(){ - $s_return = ""; $s_value = ""; $s_key = ""; // Using scrolltable? if($this->i_entriesPerPage == 0) { - $s_return .= "\n"; } - $s_return .= "\n"; + $s_return.= "\n"; return $s_return; } @@ -150,7 +154,7 @@ class divlist { /* If divlist is empty, append a single white entry */ if(count($this->a_entries)==0){ $str = $s_return.""; - $str.=""; + $str.=""; $str.=""; if($this->i_entriesPerPage == 0) { $str.="
"; + $s_return.= "\n"; + $s_return.= "\n"; + $s_return.= "\n
"; } - $s_return .= "\n"; + $s_return.= "\n"; foreach($this->a_header[0] as $s_key => $s_value ){ if(!isset($s_value['attach'])){ @@ -111,11 +115,11 @@ class divlist { // Attach a 13px-wide column (used as scrollbar space in body-table), // but do this only if we are really using scrolltables. if($this->i_entriesPerPage == 0) { - $s_return .= "\n"; - $s_return .= "\n
 
 
  
"; @@ -158,6 +162,7 @@ class divlist { return($str); } else { + //FIXME: Ahrg. I'd like to read this code without wasting my time. if ($this->i_entriesPerPage > 0) { while($start > $this->_numentries()){ $start = $start - $this->i_entriesPerPage; @@ -176,7 +181,7 @@ class divlist { if($i_alternate) $i_alternate=0; else $i_alternate=1; - $s_return .= "\n"; + $s_return .= "\n"; $cnt = 0; @@ -241,7 +246,7 @@ class divlist { $i_alternate=1; } - $s_return .= "\n"; + $s_return .= "\n"; $cnt = 0; @@ -262,7 +267,7 @@ class divlist { $style = " ".$s_value2['attach']." " ; } - $s_return .= "\n"; + $s_return .= "\n"; $s_return .= $s_value2['string']; $s_return .= ""; } @@ -271,6 +276,7 @@ class divlist { } // if fewer than 22 Entries (list not full), print row to fill empty space + //FIXME: Why 22? Isn't the size dynamic if($this->_numEntries()<=22){ $fill= ""; for ($i= 1; $i <= $this->cols; $i++){ @@ -290,5 +296,6 @@ class divlist { } } } + // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>