![]() |
Xataface Calendar Module 0.1
Full Calendar for Xataface
|
Return to Table of Contents
The calendar module can be configured and customized in many ways including:
The first method you should generally attempt to configure the calendar is via the fields.ini file directives. Any table that uses the calendar module should at least make use of the event.start
and event.end
directives as these mark the fields that store the start and end times of the events. Without both of these fields specified, the calendar will likely show up blank.
fields.ini directives include:
Directive | Description | Default | Required |
---|---|---|---|
event.start | If present, marks a field as holding the start datetime for the event. This is a boolean value so setting it to 1 is the only option. | 0 | Yes |
event.end | If present, marks a field as hold the end datetime for the event. THis is a boolean value, so setting it to 1 is the only option. | 0 | Yes |
event.location | If present, marks a field as holding the location of the event. | 0 | No |
event.category | If present, marks a field as holding the category of the event. | 0 | No |
event.allday | Indicates that this field is used to indicate whether the event is an all day event. Typically this should be used with a boolean field like a checkbox because the calendar module will take any value in this field (other than 0) to be affirmation that the event in question is set to run all day. | 0 | No |
event.repeat | Indicates that this field is used to mark whether the event is a repeating event or not. Generally this option is used with a boolean field like a checkbox. | 0 | No |
event.repeat_seed | Indicates that the field is meant to store the repeat seed of the repeating event. All events that are part of the same repeat will share the same seed. The seed field will contain the id of the first event in the repeat as default. Although this is an implementation detail and cannot be counted upon to remain the same. | 0 | No |
[username] widget:type=lookup widget:table=users [start_time] widget:type=datetimepicker widget:interval=30 event.start=1 [end_time] ;widget:type=durationselector ;widget:start=start_time ;widget:interval=30 widget:type=datetimepicker event.end=1 [tool_id] widget:type=depselect widget:table=tools widget:filters:bookable=1 event.location=1 checkbox_filter=1 vocabulary=tools [project_id] widget:type=select vocabulary=my_projects [date_created] timestamp=insert widget:type=hidden [last_modified] timestamp=update widget:type=hidden
The above fields.ini file makes use of three directives:
event.start
(for the start_time
field)event.end
(for the end_time
field)event.location
(for the tool_id) field.Some customizations are more dynamic in nature and cannot be easily expressed in a static config file like the fields.ini file. The calendar module can also be customized by the table delegate class. The following methods are supported:
Method Name | Description |
---|---|
getColor() | Returns the foreground color for a particular event. See DelegateClass::getColor() |
getBgColor() | Returns the background color for a particular event. See DelegateClass::getBgColor() |
calendar__decorateEvent | Decorates/modifieds the event data before it is published to the calendar. See DelegateClass::calendar__decorateEvent() |