Events with > 1 CSS classes


Actually I set event design depending of one of its properties with scheduler.templates.event_class. So, for example:

if (event.category == 1) return "eventBackground1"; else return "eventBackground2"

It changes the event background. But I need to apply more css classes to that event depending on other properties, for example (this doesn’t work):

$classes = ""; if (event.category == 1) $classes .= "eventBackground1"; else $classes .= "eventBackground2" if (event.contract == 1) $classes .= ",eventBorder1"; else $classes .= ",eventBorder2"; return $classes;

How can I accomplish that?


it seems you need to have the classes separated by space, not comma:

return "class1 class2 class3";

Thx !!