Unlocking in Infocenter now always reloads the Dataset and jumps to the correct Filter

This commit is contained in:
Andreas Österreicher
2019-04-17 09:15:41 +02:00
parent ed7f3f90fb
commit f05ebf3946
5 changed files with 32 additions and 5 deletions
+11 -2
View File
@@ -48,6 +48,7 @@ class FilterWidget extends Widget
private $_datasetRepresentation; // dataset representation (ex: tablesorter, pivotUI, ...)
private $_datasetRepresentationOptions; // dataset representation options for tablesorter, pivotUI, ...
private $_reloadDataset; // Force Reload of Dataset
private static $_FilterWidgetInstance; // static property that contains the instance of itself
@@ -156,6 +157,7 @@ class FilterWidget extends Widget
$this->_datasetName = null;
$this->_filterKurzbz = null;
$this->_filterId = null;
$this->_reloadDataset = null;
$this->_query = null;
$this->_additionalColumns = null;
$this->_columnsAliases = null;
@@ -201,6 +203,11 @@ class FilterWidget extends Widget
$this->_query = $args[FiltersLib::QUERY_PARAMETER];
}
if (isset($args[FiltersLib::DATASET_RELOAD_PARAMETER]))
{
$this->_reloadDataset = $args[FiltersLib::DATASET_RELOAD_PARAMETER];
}
// Parameter is used to add extra columns to the dataset
if (isset($args[FiltersLib::ADDITIONAL_COLUMNS])
&& is_array($args[FiltersLib::ADDITIONAL_COLUMNS])
@@ -334,8 +341,10 @@ class FilterWidget extends Widget
else // else if the filter loaded in session is the same that is being requested
{
// Get SESSION_RELOAD_DATASET from the session
$reloadDataset = $this->filterslib->getElementSession(FiltersLib::SESSION_RELOAD_DATASET);
if ($reloadDataset === true) // if it's value is very true then reload the dataset
$sessionReloadDataset = $this->filterslib->getElementSession(FiltersLib::SESSION_RELOAD_DATASET);
// if Filter changed or reload is forced by parameter then reload the Dataset
if ($this->_reloadDataset === true || $sessionReloadDataset === true)
{
// Set as false to stop changing the dataset
$this->filterslib->setElementSession(FiltersLib::SESSION_RELOAD_DATASET, false);