summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0bd17ae)
raw | patch | inline | side by side (parent: 0bd17ae)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Jan 2010 11:24:25 +0000 (11:24 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Jan 2010 11:24:25 +0000 (11:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15195 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_sortableListing.inc | patch | blob | history |
diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc
index 0e346f8ade48a520d03a9116d2218963bb11839b..8ebd88c4b42b80eef9aa9c8745c3eac14c6d0603 100644 (file)
private $mapping;
private $current_mapping;
private $active_index;
+ private $scrollPosition= 0;
private $acl= "";
private $modified= false;
$result.= ' }';
$result.= 'Position.includeScrollOffsets = true;';
$result.= ' Sortable.create(\''.$this->id.'\',{tag:\'tr\', ghosting:false, constraint:\'vertical\', scroll:\'scroll_'.$this->id.'\',onUpdate : updateOrder});';
- if (isset($_POST['position_'.$this->id]) && is_numeric($_POST['position_'.$this->id])) {
- $result.= '$("scroll_'.$this->id.'").scrollTop= '.$_POST['position_'.$this->id].';';
- }
+ $result.= '$("scroll_'.$this->id.'").scrollTop= '.$this->scrollPosition.';';
$result.= 'var box = $("scroll_'.$this->id.'").onscroll= function() {$("position_'.$this->id.'").value= this.scrollTop;}';
$result.= '</script>';
// Do not do anything if we're not posted - or have no permission
if (strpos($this->acl, 'w') !== false && isset($_POST['reorder_'.$this->id])){
+ if (isset($_POST['position_'.$this->id]) && is_numeric($_POST['position_'.$this->id])) {
+ $this->scrollPosition= $_POST['position_'.$this->id];
+ }
+
// Move requested?
$move= $_POST['reorder_'.$this->id];
if ($move != "") {