You are welcome , good know that you did.
Em segunda-feira, 3 de outubro de 2016 15:53:54 UTC-3, Peter escreveu:
>
>
> So I played with it for a while and tried assigning red, green and blue
> backgrounds randomly, just to get it working.
>
> My fullcalendar.css (FullCalendar v1.4.1 Stylesheet) now has this
>
> .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) */
> color: #fff; /* default TEXT color */
> }
>
>
> .bred,
> .fc-agenda .bred .fc-event-time,
> .bred a {
> background-color: red;
> border-color: red;
> color: white;
> }
>
> .bgreen,
> .fc-agenda .bgreen .fc-event-time,
> .bgreen a {
> background-color: green;
> border-color: green;
> color: white;
> }
>
> .blue,
> .fc-agenda .blue .fc-event-time,
> .bblue a {
> background-color: blue;
> border-color: blue;
> color: white;
> }
>
>
>
> The calendar.html view (excert of relevant section)
>
> $('#calendar').fullCalendar({
>
> editable: false,
> events: [
> {{for row in rows:}}
> {{bcolor=random.choice(['bred','bgreen','bblue'])}}
> { className: '{{=bcolor}}',
> title: '{{=row.task.task_type}}
> {{=row.person.fullname.replace("'","\\'")}} ({{=row.task.task_status}}) ',
> allDay: false,
> start: new Date('{{=row.task.start_time.strftime('%B %d, %Y
> %H:%M:%S')}}'),
> url: '{{=URL('view_task',args=row.task.id)}}'
> },
>
> {{pass}}
> ]
> });
> });
>
>
>
>
>
> see attached (won't led me embed the picture)
>
> all it needed was the the css additions for required colours and
> the addition of className to the event properties (assigned with a
> corresponding css values)
>
> This means I can assign colours based on event_type using python.
>
> Thanks for the interest & help Marlysson you helped me get my head around
> the css and script!
>
> Peter
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.