- Added public/css/FilterWidget.css and public/css/NavigationWidget.css to define CSS for Filter and Navigation widgets

- Added public/js/FilterWidget.js and public/js/NavigationWidget.js to collect all the JS for Filter and Navigation widgets
- Added filterwidget and navigationwidget paramaters to FHC-Header to include the new CSS and JS for Filter and Navigation widgets
- Removed all CSS and JS from the views used from Filter and Navigation widgets
- Added method _getFilterUniqueId to controller Filters to generate a unique id for a filter based on fhc_controller_id and the current page
- Adapted the code in controller Filters to use _getFilterUniqueId
- Added method _getFilterUniqueId to widget FilterWidget to generate a unique id for a filter based on fhc_controller_id and the current page
- Adapted the code in widget FilterWidget to use _getFilterUniqueId
- Removed fhc_controller_id from menu generation in InfoCenter controller
- InfoCenter controller now gives as parameter fhc_controller_id to view infocenterDetails
- InfoCenter controller now gives as parameter fhc_controller_id to various redirect
- Views infocenter, infocenterData, infocenterDetails and infocenterFreigegeben:
	- including new JS and CSS to work with Navigation and Filter widgets
	- including AjaxLib (required by FilterWidget.js and NavigationWidget.js)
	- using fhc_controller_id in Details and unlockPerson links
- fhc_controller_id in not anymore a parameter for FilterWidget, adapted the code where FilterWidget is called
- AjaxLib: renamed method _getUrlParameter to getUrlParameter
- Removed function getUrlParameter from public/js/infocenter/infocenterDetails.js, now uses the method from AjaxLib
- Added fhc_controller_id where needed into public/js/infocenter/infocenterDetails.js
- public/js/infocenter/infocenterPersonDataset.js now uses getUrlParameter from AjaxLib
- Added paramater filter_page in infocenterPersonDataset.js when calling Filters/rowNumber
This commit is contained in:
Paolo
2018-05-18 12:10:14 +02:00
parent 6a67183738
commit 13beae23cc
23 changed files with 1239 additions and 1225 deletions
+13 -13
View File
@@ -506,7 +506,8 @@ class FilterWidget extends Widget
$this->hideSave = false;
$this->columnsAliases = null;
$this->filterName = null;
$this->fhc_controller_id = null;
$this->filterUniqueId = $this->_getFilterUniqueId();
if (!is_array($args) || (is_array($args) && count($args) == 0))
{
@@ -514,15 +515,6 @@ class FilterWidget extends Widget
}
else
{
if (!isset($args['fhc_controller_id']))
{
show_error('Dude you forgot the fhc_controller_id');
}
else
{
$this->fhc_controller_id = $args['fhc_controller_id'];
}
if ((
!isset($args[self::APP_PARAMETER])
&& !isset($args[self::DATASET_NAME_PARAMETER])
@@ -1164,8 +1156,8 @@ class FilterWidget extends Widget
*/
private function _readSession()
{
if (isset($_SESSION[self::SESSION_NAME]) && isset($_SESSION[self::SESSION_NAME][$this->fhc_controller_id]))
return $_SESSION[self::SESSION_NAME][$this->fhc_controller_id];
if (isset($_SESSION[self::SESSION_NAME]) && isset($_SESSION[self::SESSION_NAME][$this->filterUniqueId]))
return $_SESSION[self::SESSION_NAME][$this->filterUniqueId];
return array();
}
@@ -1181,6 +1173,14 @@ class FilterWidget extends Widget
$_SESSION[self::SESSION_NAME] = array();
}
$_SESSION[self::SESSION_NAME][$this->fhc_controller_id] = $data;
$_SESSION[self::SESSION_NAME][$this->filterUniqueId] = $data;
}
/**
*
*/
private function _getFilterUniqueId()
{
return $this->router->directory.$this->router->class.'/'.$this->router->method.'/'.$this->input->get('fhc_controller_id');
}
}