Calendar - fix birthday preference always sent to client as false

This commit is contained in:
nathangray 2018-03-07 14:06:02 -07:00
parent 223b55d631
commit 0ab3a209cc
2 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ class calendar_hooks
'Saturday' => lang('Saturday') 'Saturday' => lang('Saturday')
); );
$birthdays_as_events = array( $birthdays_as_events = array(
0 => lang('None'), '0' => lang('None'),
'birthday' => lang('Birthdays'), 'birthday' => lang('Birthdays'),
'holiday' => lang('Holidays') 'holiday' => lang('Holidays')
); );
@ -325,7 +325,7 @@ class calendar_hooks
'label' => 'Show birthdays as events', 'label' => 'Show birthdays as events',
'name' => 'birthdays_as_events', 'name' => 'birthdays_as_events',
'help' => 'Show birthdays as all day non-blocking events as well as via mouseover of the date.', 'help' => 'Show birthdays as all day non-blocking events as well as via mouseover of the date.',
'default'=> FALSE 'default'=> '0'
), ),
'limit_all_day_lines' => array( 'limit_all_day_lines' => array(
'type' => 'input', 'type' => 'input',

View File

@ -417,7 +417,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
var holidays = et2_calendar_view.get_holidays(this,this.options.date.substring(0,4)); var holidays = et2_calendar_view.get_holidays(this,this.options.date.substring(0,4));
var holiday_list = []; var holiday_list = [];
var holiday_pref = (egw.preference('birthdays_as_events','calendar')||'').split(','); var holiday_pref = (egw.preference('birthdays_as_events','calendar')||'').split(',');
debugger;
// Show holidays as events on mobile or by preference // Show holidays as events on mobile or by preference
var holidays_as_events = egwIsMobile() || egw.preference('birthdays_as_events','calendar') === true || var holidays_as_events = egwIsMobile() || egw.preference('birthdays_as_events','calendar') === true ||
holiday_pref.indexOf('holiday') >= 0; holiday_pref.indexOf('holiday') >= 0;