From 350b8ed3ae88550152535fac8ef12441983cdf6d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Sat, 18 Jan 2014 09:05:03 +0000 Subject: [PATCH] Calendar list uses no_cat flag, so explicitly send category info for row styling --- calendar/inc/class.calendar_uilist.inc.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index 5300cd253f..96823019df 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -179,6 +179,21 @@ class calendar_uilist extends calendar_ui } $sel_options['filter'] = &$this->date_filters; + // Send categories for row styling - calendar uses no_cat, so they don't go automatically + $sel_options['category'] = array('' => lang('all')) + etemplate_widget_menupopup::typeOptions('select-cat', ',,calendar',$no_lang,false,$value['cat_id']); + // Prevent double encoding - widget does this on its own, but we're just grabbing the options + foreach($sel_options['category'] as &$label) + { + if(!is_array($label)) + { + $label = html_entity_decode($label, ENT_NOQUOTES,'utf-8'); + } + elseif($label['label']) + { + $label['label'] = html_entity_decode($label['label'], ENT_NOQUOTES,'utf-8'); + } + } + // add scrollbar to long describtion, if user choose so in his prefs if ($this->prefs['limit_des_lines'] > 0 || (string)$this->prefs['limit_des_lines'] == '') {