mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Send holiday cache data for current year on initial load, so it's available for sidebox menu.
This commit is contained in:
parent
62b7beec71
commit
ffccce1c8a
@ -557,6 +557,9 @@ class calendar_ui
|
||||
$cont['view'] = $this->view ? $this->view : 'week';
|
||||
$cont['date'] = $this->date ? $this->date : Api\DateTime();
|
||||
|
||||
$cont['year'] = (int)Api\DateTime::to($cont['date'],'Y');
|
||||
$cont['holidays'] = $this->bo->read_holidays($cont['year']);
|
||||
|
||||
$readonlys = array();
|
||||
$sel_options['status_filter'] = array(
|
||||
array('value' => 'default', 'label' => lang('Not rejected'), 'title' => lang('Show all status, but rejected')),
|
||||
|
@ -181,7 +181,14 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
||||
this.sidebox_et2 = _et2.widgetContainer;
|
||||
this.sidebox_hooked_templates.push(this.sidebox_et2);
|
||||
$j(_et2.DOMContainer).hide();
|
||||
|
||||
// Set client side holiday cache for this year
|
||||
egw.window.et2_calendar_view.holiday_cache[content.data.year] = content.data.holidays;
|
||||
delete content.data.holidays;
|
||||
delete content.data.year;
|
||||
|
||||
this._setup_sidebox_filters();
|
||||
|
||||
this.state = content.data;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user