Page 1 of 1

Schedule StyleClass dinamyc whith DefaultScheduleEvent

Posted: 10 Jan 2017, 14:57
by fyotty
I'm using the theme Adamantium + primefaces 5.1 ou 6.0 + JSF 2.2.

Classe JAVA (Controller) :
private ScheduleEvent scheduleToEvent(Agenda agenda) {
DefaultScheduleEvent e = new DefaultScheduleEvent();
e.setId(agenda.getId().toString());
e.setData(agenda);
e.setAllDay(false);
e.setEditable(false);
e.setTitle(agenda.getCodigoProfissional().getNome() + " - " + agenda.getCodigoTipoAgendamento().getDescricao());
e.setDescription(agenda.getNome() + " - " + agenda.getCodigoConvenio().getNome() + ". Observação : " + agenda.getObservacao());
e.setStartDate(agenda.getDataHoraInicio());
e.setEndDate(agenda.getDataHoraTermino());
e.setStyleClass("home");

return e;
}


CSS (theme.css) - inside the folder resource/primefaces-adamantium/theme.css
.home a {
background-color: #F7D100;
}

.work a {
background-color: green;
}

As mentioned in a post by optimus.prime.

I have read and followed the documentation of the versions 5.1 and 6.0.

Can someone help me?

Re: Schedule StyleClass dinamyc whith DefaultScheduleEvent

Posted: 11 Jan 2017, 12:30
by fyotty
Problem solved.

.fc-event, .fc-event:hover, .ui-widget .fc-event .home {
background-color: #F7D100 !important;
}

I do not know if the reason is thema adamantium or some other reason, but I only managed to make it work by adding these styles in front of mine: .fc-event, .fc-event:hover, .ui-widget .fc-event

Re: Schedule StyleClass dinamyc whith DefaultScheduleEvent

Posted: 12 Jan 2017, 08:21
by mert.sincan
Good solution! +1 ;) Thanks for the update!