- 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
@@ -78,14 +78,17 @@ class InfoCenter extends FHC_Controller
$this->load->library('PersonLogLib');
$this->load->library('WidgetLib');
$this->loadPhrases(array(
'global',
'person',
'lehre',
'ui',
'infocenter',
'filter'));
$this->loadPhrases(
array(
'global',
'person',
'lehre',
'ui',
'infocenter',
'filter'
)
);
$this->_setAuthUID(); // sets property uid
$this->load->library('PermissionLib');
@@ -139,13 +142,14 @@ class InfoCenter extends FHC_Controller
$persondata = $this->_loadPersonData($person_id);
$prestudentdata = $this->_loadPrestudentData($person_id);
$this->load->view(
'system/infocenter/infocenterDetails.php',
array_merge(
$persondata,
$prestudentdata
)
$data = array_merge(
$persondata,
$prestudentdata
);
$data['fhc_controller_id'] = $this->fhc_controller_id;
$this->load->view('system/infocenter/infocenterDetails.php', $data);
}
/**
@@ -159,7 +163,7 @@ class InfoCenter extends FHC_Controller
if(isError($result))
show_error($result->retval);
redirect(self::URL_PREFIX);
redirect(self::URL_PREFIX.'?fhc_controller_id='.$this->fhc_controller_id);
}
/**
@@ -715,10 +719,10 @@ class InfoCenter extends FHC_Controller
{
foreach ($filters as $filterId => $description)
{
$toPrint = "%s?%s=%s&%s=%s";
$toPrint = "%s?%s=%s";
$tofill['children'][] = array(
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId, 'fhc_controller_id', $this->fhc_controller_id),
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId),
'description' => $description
);
}
@@ -728,10 +732,10 @@ class InfoCenter extends FHC_Controller
{
foreach ($filters as $filterId => $description)
{
$toPrint = "%s?%s=%s&%s=%s";
$toPrint = "%s?%s=%s";
$tofill['children'][] = array(
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId, 'fhc_controller_id', $this->fhc_controller_id),
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId),
'description' => $description,
'subscriptDescription' => 'Remove',
'subscriptLinkClass' => 'remove-filter',
@@ -922,7 +926,7 @@ class InfoCenter extends FHC_Controller
$this->PrestudentModel->addSelect('person_id');
$person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id;
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'#'.$section);
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'?fhc_controller_id='.$this->fhc_controller_id.'#'.$section);
}
/**