Schedule StyleClass dinamyc whith DefaultScheduleEvent

Post Reply
fyotty
Posts: 6
Joined: 16 Jul 2013, 04:40

10 Jan 2017, 14:57

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?

fyotty
Posts: 6
Joined: 16 Jul 2013, 04:40

11 Jan 2017, 12:30

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

User avatar
aragorn
Posts: 2371
Joined: 29 Jun 2013, 12:38

12 Jan 2017, 08:21

Good solution! +1 ;) Thanks for the update!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest