index db82577f37a044121960f7ac5a4c1597639ea74c..b7d4bb9166f0147f76dd2962075f9132019acf70 100644 (file)
var $is_headpage = false; // if true the design changes
var $filterName = "Liste";
var $DepartmentsAdded = false;
var $is_headpage = false; // if true the design changes
var $filterName = "Liste";
var $DepartmentsAdded = false;
+ var $Added_Departments = array();
var $selectedBase = "";
var $DivHeight = "";
var $HideFilterPart = false;
var $selectedBase = "";
var $DivHeight = "";
var $HideFilterPart = false;
-
+ var $List_Bottom_Info = "";
var $SaveAdditionalVars = array(); // Additional Post vars to store
var $module= "";
var $SaveAdditionalVars = array(); // Additional Post vars to store
var $module= "";
}
/* Contrucktion */
}
/* Contrucktion */
- function MultiSelectWindow($config, $filterName, $module)
+ function MultiSelectWindow(&$config, $filterName, $module)
{
{
- $this->config = $config;
+ $this->config = &$config;
$this->module = $module;
$this->SaveButtonString = _("Save");
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
$this->module = $module;
$this->SaveButtonString = _("Save");
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
-
+ $this->ui = get_userinfo();
$this->selectedBase = $_SESSION['CurrentMainBase'];
/* Check default values for SaveAdditionalVars */
$this->selectedBase = $_SESSION['CurrentMainBase'];
/* Check default values for SaveAdditionalVars */
$divlist = new divlist($this->string_Title);
$divlist->SetSummary($this->string_Summary);
$divlist = new divlist($this->string_Title);
$divlist->SetSummary($this->string_Summary);
- $divlist->SetEntriesPerPage(0); // 0 for scrollable list
+ $divlist->SetEntriesPerPage(0); // 0 for scrollable list
+
+ /* Display list footer with summary of all listed entries */
+ if(isset($this->config->data['MAIN']['LIST_SUMMARY']) && preg_match("/true/i",$this->config->data['MAIN']['LIST_SUMMARY'])){
+ $divlist->SetFooter($this->get_List_Bottom_Info());
+ }
if($this->DivHeight != ""){
$divlist->SetHeight($this->DivHeight);
if($this->DivHeight != ""){
$divlist->SetHeight($this->DivHeight);
if($s_action=="root"){
$this->selectedBase=($this->config->current['BASE']);
$dep_id = $this->ui->get_module_departments($this->module);
if($s_action=="root"){
$this->selectedBase=($this->config->current['BASE']);
$dep_id = $this->ui->get_module_departments($this->module);
- $this->selectedBase = $dep_id[key($dep_id)];
+ if(isset($dep_id[key($dep_id)])){
+ $this->selectedBase = $dep_id[key($dep_id)];
+ }
}
}
function AddDepartments($base = false,$numtabs = 3,$empty_tabs_in_front = 0)
{
$this->DepartmentsAdded = true;
function AddDepartments($base = false,$numtabs = 3,$empty_tabs_in_front = 0)
{
$this->DepartmentsAdded = true;
+ $this->Added_Departments = array();
/* check for a valid base */
if(!$base){
/* check for a valid base */
if(!$base){
$non_empty="";
$nkey= normalizePreg($key);
foreach($this->config->departments as $keyd=>$vald ){
$non_empty="";
$nkey= normalizePreg($key);
foreach($this->config->departments as $keyd=>$vald ){
- if(preg_match("/$nkey\/.*/",$keyd)){
+ if(preg_match('/$nkey\/.*/',$keyd)){
$non_empty="full";
}
}
$non_empty="full";
}
}
}
}
$this->AddElement($row);
}
}
$this->AddElement($row);
+ $this->Added_Departments[] = $row;
}
}
}
}
+
+ function set_List_Bottom_Info($str)
+ {
+ $this->List_Bottom_Info = $str;
+ }
+
+ function get_List_Bottom_Info()
+ {
+ return($this->List_Bottom_Info);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>