X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_listing.inc;h=ab6d5944354bdf8f56ebf12bbe5a68886a6d80a5;hb=37a863af6c001e5760070adb1d74dc77e4df61f9;hp=a9c218123977de83aaf28eaeafd2437c157d9cf3;hpb=c4e6946a1580efe48af3fcc9387a1b2f7a07a57e;p=gosa.git
diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc
index a9c218123..ab6d59443 100644
--- a/gosa-core/include/class_listing.inc
+++ b/gosa-core/include/class_listing.inc
@@ -52,6 +52,7 @@ class listing {
var $exportColumns= array();
var $useSpan= false;
var $height= 0;
+ var $scrollPosition= 0;
function listing($filename)
@@ -273,6 +274,7 @@ class listing {
// Initialize list
$result= "\n";
+ $result.= "\n";
$height= 450;
if ($this->height != 0) {
$result.= "\n";
@@ -425,6 +427,12 @@ class listing {
$result.= "";
$result.= $switch?"":"";
+ // Add scroll positioner
+ $result.= '';
+
$smarty= get_smarty();
$smarty->assign("usePrototype", "true");
$smarty->assign("FILTER", $this->filter->render());
@@ -447,7 +455,15 @@ class listing {
// Assign summary
$smarty->assign("HEADLINE", $this->headline);
- return ($smarty->fetch(get_template_path($this->xmlData['definition']['template'], true)));
+ // Try to load template from plugin the folder first...
+ $file = get_template_path($this->xmlData['definition']['template'], true);
+
+ // ... if this fails, try to load the file from the theme folder.
+ if(!file_exists($file)){
+ $file = get_template_path($this->xmlData['definition']['template']);
+ }
+
+ return ($smarty->fetch($file));
}
@@ -465,6 +481,11 @@ class listing {
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');
@@ -1003,6 +1024,11 @@ class listing {
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