Handle multiple categories, though the last one determines the color of the event.

This commit is contained in:
Nathan Gray 2015-10-14 15:25:29 +00:00
parent e45b6471e7
commit edc3cac79f

View File

@ -204,7 +204,11 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
this.options.class = event.class; this.options.class = event.class;
if(event.category) if(event.category)
{ {
this.div.addClass('cat_' + event.category); var cats = event.category.split(',');
for(var i = 0; i < cats.length; i++)
{
this.div.addClass('cat_' + cats[i]);
}
} }
this.div.toggleClass('calendar_calEventUnknown', event.participants[egw.user('account_id')] ? event.participants[egw.user('account_id')][0] === 'U' : false); this.div.toggleClass('calendar_calEventUnknown', event.participants[egw.user('account_id')] ? event.participants[egw.user('account_id')][0] === 'U' : false);