index 485a0aff701a6efe14df28591ed4a046dc78fcbe..3b83e0811adcc73b06f1a2e398003d61833b6611 100644 (file)
return($message);
}
+ // Some browsers don't have the ability do do scrollable table bodies, filter them
+ // here.
+ $switch= false;
+ if (preg_match('/(Opera|Konqueror|Safari|msie)/i', $_SERVER['HTTP_USER_AGENT'])){
+ $switch= true;
+ }
+
// Initialize list
$result= "<input type='hidden' value='$this->pid' name='PID'>\n";
$height= 450;
$height= $this->height;
}
- $result.= "<table cellpadding='0' cellspacing='0' border='0'><tr><td><div class='listContainer' id='d_scrollbody' style='border-top:1px solid #B0B0B0;width:700px;height:".($height+25)."px;'>\n";
+ $result.= "<table cellpadding='0' cellspacing='0' border='0'><tr><td><div class='listContainer' id='d_scrollbody' style='border-top:1px solid #B0B0B0;width:700px;min-height:".($height+25)."px;'>\n";
- $result.= "<table summary='$this->headline' style='width:100%; table-layout:fixed;' cellspacing='0' cellpadding='0' id='t_scrolltable'>\n";
+ $height= "";
+ if ($switch){
+ $height= "height:100%;";
+ }
+ $result.= "<table summary='$this->headline' style='${height}width:100%; table-layout:fixed;' cellspacing='0' cellpadding='0' id='t_scrolltable'>\n";
$this->numColumns= count($this->colprops) + ($this->multiSelect?1:0);
// Build list header
$result.= "<thead class='fixedListHeader listHeaderFormat'><tr>\n";
if ($this->multiSelect) {
- $result.= "<td class='listheader' style='text-align:center;padding:0;width:24px;'><input type='checkbox' id='select_all' name='select_all' title='"._("Select all")."' onClick='toggle_all_(\"listing_selected_[0-9]*$\",\"select_all\");' ></td>\n";
+ $width= "24px";
+ if (preg_match('/Konqueror/i', $_SERVER['HTTP_USER_AGENT'])){
+ $width= "28px";
+ }
+ $result.= "<td class='listheader' style='text-align:center;padding:0;width:$width;'><input type='checkbox' id='select_all' name='select_all' title='"._("Select all")."' onClick='toggle_all_(\"listing_selected_[0-9]*$\",\"select_all\");' ></td>\n";
}
foreach ($this->header as $header) {
$result.= $header;
// Render multi select if needed
if ($this->multiSelect) {
- $result.="<td style='text-align:center;width:24px;padding:0;' class='list1'> </td>";
+ $result.="<td style='text-align:center;padding:0;' class='list1'> </td>";
}
// Render defined department columns, fill the rest with some stuff
// Close list
$result.= "</table>";
+ $result.= $switch?"<input type='hidden' id='list_workaround'>":"";
$smarty= get_smarty();
$smarty->assign("usePrototype", "true");
if (preg_match('/^department_([0-9]+)$/', validate($_GET['act']), $match)){
if (isset($this->departments[$match[1]])){
$this->base= $this->departments[$match[1]]['dn'];
+ session::global_set("CurrentMainBase", $this->base);
}
}
}
// Row is replaced by the row number
if ($param == "row") {
$params[]= $row;
+ continue;
}
// pid is replaced by the current PID
if ($param == "pid") {
$params[]= $this->pid;
+ continue;
}
// base is replaced by the current base
if ($param == "base") {
$params[]= $this->getBase();
+ continue;
}
// Fixie with "" is passed directly
if (preg_match('/^".*"$/', $param)){
$params[]= preg_replace('/"/', '', $param);
+ continue;
+ }
+
+ // Move dn if needed
+ if ($param == "dn") {
+ $params[]= LDAP::fix($config["dn"]);
+ continue;
}
// LDAP variables get replaced by their objects
unset($values['count']);
}
$params[]= $values;
+ break;
}
}
-
- // Move dn if needed
- if ($param == "dn") {
- $params[]= LDAP::fix($config["dn"]);
- }
}
// Replace information
}
if ($action['type'] == "copypaste") {
- $result.= $this->renderCopyPasteActions($row, $this->entries[$row]['dn'], $category, $class);
+ $copy = !isset($action['copy']) || $action['copy'] == "true";
+ $cut = !isset($action['cut']) || $action['cut'] == "true";
+ $result.= $this->renderCopyPasteActions($row, $this->entries[$row]['dn'], $category, $class,$copy,$cut);
} else {
$result.= $this->renderSnapshotActions($row, $this->entries[$row]['dn'], $category, $class);
}
// Check for special types
switch ($action['type']) {
case 'copypaste':
- $result.= $this->renderCopyPasteMenu($separator);
+ $cut = !isset($action['cut']) || $action['cut'] != "false";
+ $copy = !isset($action['copy']) || $action['copy'] != "false";
+ $result.= $this->renderCopyPasteMenu($separator, $copy , $cut);
break;
case 'snapshot':
}
+ function getEntry($dn)
+ {
+ foreach ($this->entries as $entry) {
+ if (isset($entry['dn']) && strcasecmp($dn, $entry['dn']) == 0){
+ return $entry;
+ }
+ }
+ return null;
+ }
+
+
function getType($dn)
{
if (isset($this->objectDnMapping[$dn])) {