summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b153ac1)
raw | patch | inline | side by side (parent: b153ac1)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Nov 2005 14:40:10 +0000 (14:40 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Nov 2005 14:40:10 +0000 (14:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1836 594d385d-05f5-0310-b6e9-bd551577e9d8
index 65fc872f2be9b03edede93cf0a37b1f40db2f6f7..f6bc8f9e99c93b4413e02dc0c054d2e753517ca0 100644 (file)
}
function DrawList(){
-
$s_return = "";
-
- $s_return.= "<table summary='".$this->s_summary."' width='600' cellspacing='0'>";
-
+ $s_return.= "<table summary='".$this->s_summary."' width='600' height='500' cellspacing='0'>";
if($this->i_entriesPerPage==0) {
-
- $s_return.= "<thead>".$this->_generateHeader()."</thead>";
-
- // Define an alternate style for IE
- $s_return.= "<!--[if IE]><style type='text/css'>tbody.scrollcontent {overflow-y:scroll;max-height:480px;}</style><![endif]-->";
-
- $s_return.= "<tbody class='scrollcontent'>".$this->_generatePage()."</tbody>";
+ // TODO: Find a more convenient way to use the same functionality in both
+ // MSIE and non-MSIE browsers. ATM we need to manually set entriesPerPage to
+ // a non-zero value, because MSIE won't scroll the tbody properly.
+ if(strpos($_SERVER['HTTP_USER_AGENT'],'MSIE') == 0){
+ $s_return.= "<thead>".$this->_generateHeader()."</thead>";
+ // Define an alternate style for IE (not used ATM)
+ // $s_return.= "<!--[if IE]><style type='text/css'>tbody.scrollcontent {overflow-y:scroll;max-height:480px;}</style><![endif]-->";
+ $s_return.= "<tbody style='max-height:480px;overflow:auto;overflow:-moz-scrollbars-vertical;'>".$this->_generatePage()."</tbody>";
+ } else {
+ // Call ourself with i_entriesPerPage set to a default value
+ $this->SetEntriesPerPage(20);
+ $s_return.=$this->_generateHeader();
+ $s_return.=$this->_generatePage();
+ }
} else {
- $s_return.=$this->_generateHeader();
-
- $s_return.=$this->_generatePage();
+ $s_return.=$this->_generateHeader();
+ $s_return.=$this->_generatePage();
}
//$s_return.= nl2br(htmlentities($this->_generatePage()));
if(!isset($s_value['attach'])){
$s_value['attach'] = "";
}
-
+
if($i_count == 0) {
- $s_return .= "\n<td class='listheader' style='border-right:0px;border-bottom:1px solid #b0b0b0;'".$s_value['attach'].">".$s_value['string']."</td>";
+ $s_return .= "\n<td class='listheader' style='border-right:0px;border-bottom:1px solid #b0b0b0;' ".$s_value['attach'].">".$s_value['string']."</td>";
} else {
$s_return .= "\n<td class='listheader' style='border-bottom:1px solid #b0b0b0;'".$s_value['attach'].">".$s_value['string']."</td>";
}
// Only create additional column if we're using scrollbars
if($this->i_entriesPerPage==0) {
- $s_return .= "<td class='listheader' style='border-right:0px;padding:0px;border-bottom:1px solid #b0b0b0;width:16px;'> </td>";
+ $s_return .= "\n<td class='listheader' style='border-right:0px;padding:0px;border-bottom:1px solid #b0b0b0;width:16px;'> </td>";
}
$s_return .= "\n</tr>";
return $s_return;
}
} else {
// We should display all entries on one page
- foreach($this->a_entries as $s_key => $s_value){
-
- if($i_alternate){
+
+ $i = $this->_numEntries();
+ foreach($this->a_entries as $s_key => $s_value){
+ $i--;
+
+ if($i_alternate!=0){
$i_alternate=0;
} else {
$i_alternate=1;
}
-
+
$s_return .= "\n<tr>";
-
- $cnt = 0;
-
- foreach($s_value as $s_key2 => $s_value2 ){
-
- $this->cols = count($s_value) ;
- $cnt++;
-
- if(!isset($s_value2['class'])){
- $class = "list".$i_alternate;
- } else {
- $class = $s_value2['class'];
- }
-
- if(!isset($s_value2['attach'])){
- $style = "";
- } else {
- $style = " ".$s_value2['attach']." " ;
- }
-
- $s_return .= "\n<td ".$style." class='".$class."'>";
- $s_return .= $s_value2['string'];
- $s_return .= "</td>";
- }
-
- if($cnt == 0 ){
- $s_return.="\n<td> </td>";
- } else {
- //$s_return.="\n<td style='border:0px;padding:0px;' class='list".$i_alternate."'> </td>";
- }
- $s_return .= "\n</tr>";
- }
+
+ $cnt = 0;
+
+ foreach($s_value as $s_key2 => $s_value2 ){
+
+ $this->cols = count($s_value) ;
+ $cnt++;
+
+ if(!isset($s_value2['class'])){
+ $class = "list".$i_alternate;
+ } else {
+ $class = $s_value2['class'];
+ }
+
+ if(!isset($s_value2['attach'])){
+ $style = "";
+ } else {
+ $style = " ".$s_value2['attach']." " ;
+ }
+
+ $s_return .= "\n<td ".$style." class='".$class."'>";
+ $s_return .= $s_value2['string'];
+ $s_return .= "</td>";
+ }
+ $s_return .= "\n</tr>";
+ }
}
-
- $fill= "";
- for ($i= 1; $i <= $this->cols; $i++){
- if ($i == $this->cols){
- $fill.= "<td class='list1' style='height:100%;border-right:0px'> </td>";
- } else {
- $fill.= "<td class='list1' style='height:100%'> </td>";
+
+ // if fewer than 22 Entries (list not full), print row to fill empty space
+ if($this->_numEntries()<22){
+ $fill= "";
+ for ($i= 1; $i <= $this->cols; $i++){
+ if ($i == $this->cols){
+ $fill.= "<td class='list1' style='height:100%;border-right:0px';> </td>";
+ } else {
+ $fill.= "<td class='list1' style='height:100%';> </td>";
+ }
}
+ $s_return.="\n<tr>$fill</tr>";
}
- return $s_return."\n<tr>$fill</tr>";
+ return $s_return;
}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index b72b7e2e9f82f30ff42373503c7bd7ae0da448c2..22e3947ae3ea931e0de563c0b4c31d72fd4a4483 100644 (file)
}
}
- $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
+ $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>","attach"=>"style='width:20px;text-align:center;'");
$field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
- $field3 = array("string" => " ","attach"=>"style='text-align:right;border:none'");
+ $field3 = array("string" => " ","attach"=>"style='width:48px;text-align:left;border:none'");
$divlist->AddEntry(array($field1,$field2,$field3));
}
}else{
$desc = " - [ ".$val['description'][0]." ]";
}
- $field1 = array("string" => sprintf($applimg,$val['dn']),"attach"=>"style='width:20px;align:middle;'");
+ $field1 = array("string" => sprintf($applimg,$val['dn']),"attach"=>"style='width:20px;align:center;text-align:center;'");
$field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)),"attach"=>$title);
- $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='text-align:right;border:none'");
+ $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='width:48px;text-align:right;border:none'");
$divlist->AddEntry(array($field1,$field2,$field3));
}
diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index 38451b25a76e3b7a34946d5084f4187541b2eea4..32f1998bddce13c3d04a7454693fed4cf36058b7 100644 (file)
}
$title = $this->config->departments[$key];
- $field0 = array("string" => "<img src='images/".$non_empty."folder.png' title='"._("department")."' alt='department'>","attach"=>"style='width:20px;'");
- $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style='width:516px' title='".$title."'");
- $field2 = array("string" => preg_replace("/%KEY%/", base64_encode($key), $actions),"attach"=>"style='text-align:left;border:none;width:48px;'");
+ $field0 = array("string" => "<img src='images/".$non_empty."folder.png' title='"._("department")."' alt='department'>","attach"=>"style='text-align:center;width:20px;'");
+ $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style='text-align:left;' title='".$title."'");
+ $field2 = array("string" => preg_replace("/%KEY%/", base64_encode($key), $actions),"attach"=>"style='text-align:right;border:none;width:48px;'");
$divlist->AddEntry( array($field0,$field1,$field2));
diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index b70a38cdeb5bbf10cff8767e5d51f87d41b38dd6..4e21b8bdff40fa088b9b921763681680ef0fbd2e 100644 (file)
}
- $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
+ $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>","attach"=>"style='text-align:center;width:20px;'");
$field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
$field3 = array("string" => " ");
- $field4 = array("string" => " ","attach"=>"style='text-align:right;border:none'");
+ $field4 = array("string" => " ","attach"=>"style='text-align:right;border:none;width:48px;'");
$divlist->AddEntry(array($field1,$field2,$field3,$field4));
}
}else{
$desc = " - [ ".$val['description'][0]." ]";
}
- $field1 = array("string" => sprintf($userimg,$val['dn']),"attach"=>"style='width:20px;align:middle;'");
+ $field1 = array("string" => sprintf($userimg,$val['dn']),"attach"=>"style='width:20px;text-align:center;'");
$field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)),"attach"=>$title);
- $field3 = array("string" => $posix." ".$enviro." ".$mail." ".$samba." ".$appl." ".$phone);
- $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='text-align:right;border:none;width:32px;'");
+ $field3 = array("string" => $posix." ".$enviro." ".$mail." ".$samba." ".$appl." ".$phone,"attach"=>"style='text-align:left;width:136px;'");
+ $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='text-align:right;border:none;width:48px;'");
$divlist->AddEntry(array($field1,$field2,$field3,$field4));
}
diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc
index e5f31081118f51c682ebabf6551e3e2176ee85de..c1f4b3f18095dedd7480d9e403852c47e5ce7c66 100644 (file)
$field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='"._("Department")."'>","attach"=>"style='text-align:center;width:20px;'");
$field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
- $field3 = array("string" => " ","attach"=>"style='width:48;'");
+ $field3 = array("string" => " ","attach"=>"style='width:136px;'");
$field4 = array("string" => " ","attach"=>"style='width:48px;text-align:left;border:none'");
$divlist->AddEntry(array($field1,$field2,$field3,$field4));
}else{
$desc = " - [ ".$val['description'][0]." ]";
}
- $field1 = array("string" => "<img src='images/list_ogroup.png' alt='"._("Object group")."' ".$title.">");
+ $field1 = array("string" => "<img src='images/list_ogroup.png' alt='"._("Object group")."' ".$title.">","attach"=>"style='text-align:center;width:20px;'");
$field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)),"attach"=>$title);
$field3 = array("string" => $this->convert_list($val)." ".$mail);
$field4 = array("string" => preg_replace("/%KEY%/", $key, $actions),"attach"=>"style='text-align:right;border:none'");
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index badbc17d12bbd571785fcf323f0a18a15cc04721..968df5ed3378dfb23d7d77c4a6c6d40067a0b874 100644 (file)
}
}
- $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
+ $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>","attach"=>"style='width:20px;text-align:center;'");
$field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
- $field3 = array("string" => " ", "attach" => "style='border:none'");
+ $field3 = array("string" => " ", "attach" => "style='border:none;width:48px;text-align:right;'");
$divlist->AddEntry(array($field1,$field2,$field3));
}
$img=$this->convert_list($val);
- $field1 = array("string" => sprintf($img['img'],$val['dn']),"attach"=>"style='width:20px;align:middle;'");
+ $field1 = array("string" => sprintf($img['img'],$val['dn']),"attach"=>"style='width:20px;text-align:center;'");
$field2 = array("string" => sprintf($editlink,$key,$display),"attach"=>"title='".$val['dn']."'");
$field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action),"attach" => "style='border:none; text-align:right;width:48px'");
$divlist->AddEntry( array($field1,$field2,$field3));
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index a47597dc1ff13145e300fc6ca882aea5c46c5cf3..3035d85141db10113f731c651b45193f8c1ec457 100644 (file)
}
}
- $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
+ $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>","attach"=>"style='width:20px;text-align:center;'");
$field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
$field3 = array("string" => " ");
- $field4 = array("string" => " ", "attach" => "style='border:none'");
+ $field4 = array("string" => " ", "attach" => "style='width:48px;border:none'");
$divlist->AddEntry(array($field1,$field2,$field3,$field4));
}
/* Create each field */
- $field1 = array("string" => sprintf($tpl,$val['dn']),"attach"=>"style='width:20px;align:middle;'");
+ $field1 = array("string" => sprintf($tpl,$val['dn']),"attach"=>"style='width:20px;text-align:center;'");
$field2 = array("string" => sprintf($editlink,$key,$display).$ip_port,"attach"=>"title='".$val['dn']."'");
- $field3 = array("string" => $usrimg2." ".$posix." ".$enviro." ".$maila." ".$fonac." ".$faxac." ".$samba." ".$s_img_create_from_template, "attach" => "style='width:155px;'");
- $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action),"attach" => "style='border:none; text-align:right;width:48px'");
+ $field3 = array("string" => $usrimg2." ".$posix." ".$enviro." ".$maila." ".$fonac." ".$faxac." ".$samba." ".$s_img_create_from_template, "attach" => "style='width:136px;'");
+ $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action),"attach" => "style='border:none;text-align:right;width:48px'");
$add = array($field1,$field2,$field3,$field4);