summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5355383)
raw | patch | inline | side by side (parent: 5355383)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Jan 2010 09:46:47 +0000 (09:46 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Jan 2010 09:46:47 +0000 (09:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15192 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_listing.inc | patch | blob | history |
index 9001f584abec747c6beb7f106e7e40c60424d273..ab6d5944354bdf8f56ebf12bbe5a68886a6d80a5 100644 (file)
var $exportColumns= array();
var $useSpan= false;
var $height= 0;
+ var $scrollPosition= 0;
function listing($filename)
// Initialize list
$result= "<input type='hidden' value='$this->pid' name='PID'>\n";
+ $result.= "<input type='hidden' name='position_".$this->pid."' id='position_".$this->pid."'>\n";
$height= 450;
if ($this->height != 0) {
$result.= "<input type='hidden' value='$this->height' id='d_height'>\n";
$result.= "</table>";
$result.= $switch?"<input type='hidden' id='list_workaround'>":"";
+ // Add scroll positioner
+ $result.= '<script type="text/javascript" language="javascript">';
+ $result.= '$("t_nscrollbody").scrollTop= '.$this->scrollPosition.';';
+ $result.= 'var box = $("t_nscrollbody").onscroll= function() {$("position_'.$this->pid.'").value= this.scrollTop;}';
+ $result.= '</script>';
+
$smarty= get_smarty();
$smarty->assign("usePrototype", "true");
$smarty->assign("FILTER", $this->filter->render());
return;
}
+ // Save position if set
+ if (isset($_POST['position_'.$this->pid]) && is_numeric($_POST['position_'.$this->pid])) {
+ $this->scrollPosition= $_POST['position_'.$this->pid];
+ }
+
// Save base
if (isset($_POST['BASE']) && $this->baseMode) {
$base= get_post('BASE');
return;
}
+ // Save position if set
+ if (isset($_POST['position_'.$this->pid]) && is_numeric($_POST['position_'.$this->pid])) {
+ $this->scrollPosition= $_POST['position_'.$this->pid];
+ }
+
$result= array("targets" => array(), "action" => "");
// Filter GET with "act" attributes