How to change the color of the title of the Event's Schedule

UI Components for JSF
Post Reply
manuel.fgj
Posts: 18
Joined: 16 Jun 2010, 22:56

25 Sep 2010, 14:39

Hi Friends!

How to change the color of the title of the Event's Schedule?
I can change the background color based on http://primefaces.prime.com.tr/forum/vi ... css#p12440 but the title of the Event can not :( ...
I am using PrimeFace 2.1.RC1-SNAPSHOT.

Thanks a lot!

ufasoli
Posts: 42
Joined: 05 May 2010, 19:55

27 Sep 2010, 15:30

If you want same color for all titles you can override schedule CSS

Code: Select all


.ui-widget-content a {
  color: red;
}

if you're giving a different class to each schedule event, try using !important right next to the 'color attribute'

Code: Select all


.your-css-class a {
  color: red !important;
}


manuel.fgj
Posts: 18
Joined: 16 Jun 2010, 22:56

27 Sep 2010, 16:05

Hello Ufasoli! Thanks for the reply.
It was nice to know how to change the text color of all components (believe me it will be useful) and the text of the event.
But when I talked about the "color of title" I referred to the backgound color the header of the event.
You know how to resolve this?

Thanks a lot!
Manuel

ufasoli
Posts: 42
Joined: 05 May 2010, 19:55

27 Sep 2010, 16:12

You mean changing the color of the square that represents an event?
ie: the blue square herehttp://www.primefaces.org/showcase/ui/schedule.jsf in the showcase ?

varunagrawal
Posts: 36
Joined: 12 Aug 2010, 15:49

27 Sep 2010, 16:23

.fc-event, .fc-agenda .fc-event-time, .fc-event a {
background-color: #36C;
border-color: #36C;
border-style: solid;
color: white;
}



here color: white corresponds to text color of the event and background-color and order-color corresponds to the box your are talking about.

So put something like this in the head

<style type="text/css">
.fc-event,
.fc-agenda .fc-event-time,
.fc-event a {
border-style: solid;
border-color: #36c; /* default BORDER color (probably the same as background-color) */
background-color: #fff; /* default BACKGROUND color */
color: #fff; /* default TEXT color */
}

</style>

ufasoli
Posts: 42
Joined: 05 May 2010, 19:55

27 Sep 2010, 16:28

That will change the color of all the events. if you want to use a different color on each code you can do it like this

CSS file :

Code: Select all

    .red-class{
       
        border-color: #CC6600!important;
    }
    .red-class a{
       background-color: #CC6600!important;

    }


Managed Bean Code:

Code: Select all

    
eventModel.addEvent(new DefaultScheduleEvent("Title", new Date(), new Date(),"red-class"));



manuel.fgj
Posts: 18
Joined: 16 Jun 2010, 22:56

27 Sep 2010, 16:56

Hello Ufasoli and Varunagrouwal! Thanks for the replies.
But I tried your suggestions and did not change the color of the header (the navy blue square in the showcase event of the week Schedule).
These suggestions only changed the colors of light blue square of the event and not the of header = square navyblue. (See scheduel week).

Thanks a lot!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Sep 2010, 19:01

Try firebug to see which style class takes precedence. That would help, your css seems to be overriden. I've successfully changed the color of schedule events using styleClass option.

manuel.fgj
Posts: 18
Joined: 16 Jun 2010, 22:56

27 Sep 2010, 22:53

Thank you all for the replies and suggestions!
Which was based on them solved my problem.

Thanks a lot!
Manuel

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 53 guests