X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_divSelectBox.inc;h=4ddc3fba594c3b22bea5bc6edec6c34a082686bf;hb=f107cfc45df17284b0fc42fd4aed4ed08d0c137e;hp=8942e96c93cedbb372d3bcb960b3629cfae8243f;hpb=fd487dc150e5b1c4b210ca76a887b9f1a3f603da;p=gosa.git diff --git a/include/class_divSelectBox.inc b/include/class_divSelectBox.inc index 8942e96c9..4ddc3fba5 100644 --- a/include/class_divSelectBox.inc +++ b/include/class_divSelectBox.inc @@ -3,39 +3,19 @@ class divSelectBox { var $a_entries; - var $a_header; - var $b_displayPageNums; var $summary; var $cols; // Members for page managment - var $i_currentPage; - var $i_entriesPerPage; - - var $width= 300; var $height=200; // Added php 4 constructor function divSelectBox(){ - - $this->i_currentPage = 0; - $this->i_entriesPerPage = 10; $this->s_summary = ""; $this->a_entries = array(); - $this->a_header = array(); - $this->b_displayPageNums= true; $this->cols = 0; - - } - - function __destruct(){ - } - function setWidth($w){ - $this->width=$w; - } - function setHeight($h){ $this->height=$h; } @@ -45,20 +25,24 @@ class divSelectBox { } function DrawList(){ - $s_return = " -
". - "\n
height."px;width:".($this->width)."px;\">"; - $s_return.= ""; - + $s_return = ""; + $s_return .= "
\n"; + $s_return .= "
height.";width:100%\">\n"; + $s_return .= "
height)."px;\">\n"; + $s_return .= "
\n"; $s_return.=$this->_generatePage(); $s_return.= "
"; - return ($s_return); } @@ -76,16 +60,13 @@ class divSelectBox { $s_value = ""; $s_key = ""; $s_return = ""; - $i_alternate=0; + $str = ""; /* If divlist is empty, append a single white entry */ if(count($this->a_entries)==0){ - $str = ""; - for($i = 0 ; $i < count($this->a_header[0]); $i++){ - $str.=" "; - } - $str .=""; + $str.=" "; return($str); } @@ -99,12 +80,11 @@ class divSelectBox { $i_alternate=1; } - $s_return .= "\n"; + $s_return .= "\n"; $cnt = 0; - + foreach($s_value as $s_key2 => $s_value2 ){ - $this->cols = count($s_value) ; $cnt++; @@ -120,18 +100,18 @@ class divSelectBox { $style = " ".$s_value2['attach']." " ; } - $s_return .= "\n"; + $s_return .= "\n"; $s_return .= $s_value2['string']; $s_return .= ""; } - + $s_return.="\n"; } - $s_return.=""; + $s_return.="\n"; for($i = 0 ; $i < ($this->cols) ; $i ++){ if($i >= ($this->cols-1)){ - $s_return .= ""; + $s_return .= "
 
"; }else{ - $s_return .= ""; + $s_return .= "
 
"; } }