ReactorFeed( BlackBoxPath( "CalendarPack" ) &"DayCalendarOverride.js" ;For the ResourceCalendar:
"function DayCalendarOverride(){ "& MyTO::MyOverrides&"}"
ReactorFeed( BlackBoxPath( "CalendarPack" ) &"ResourceCalendarOverride.js" ;
"function ResourceCalendarOverride(){ "& MyTO::MyOverrides&"}"
ReactorFeed( BlackBoxPath( "CalendarPack" ) &"MonthCalendarOverride.js" ;
"function MonthCalendarOverride(){ "& MyTO::MyOverrides&"}"
You could equally well list the overrides inline, as below. Note the single quotes around the right side of the statement, and the escaping of the single and double quotes where they occur.
ReactorFeed (
BlackBoxPath( "ResourceCal" ) &"ResourceCalendarOverride.js" ;
"function ResourceCalendarOverride()
{
datelineOrientation = 'top';
CreationValues = ',\'hello\'' ;
CreationFields = ',\"title\"' ;
WhereClause = 'RecordID > 15 and RecordID < 40' ;
ScriptOnDelete = 'MyDelete';
}
" )
| JavaScript Variables | Brief Description |
|---|---|
| WhereClause | An SQL 'WHERE' clause which allows you to specify the calendar found set. e.g. WhereClause = 'RecordID < 20' ; This can be useful if you need a complicated set of match criteria. |
| CreationValues | A slice of SQL 'UPDATE' clause which allows you to specify the default values to set in a field when used in conjunction with 'CreationFields', useful if you want to automatically populate some data each time you create a record. e.g. CreationValues = ',\'hello\'' ; CreationFields = ',\"title\"' ; The above sets the Title field to hello on every new record created. |
| CreationFields | A slice of SQL 'UPDATE' clause which allows you to specify the fields to set when used in conjunction with 'CreationValues', useful if you want to automatically populate some data each time you create a record. e.g. CreationValues = ',\'hello\'' ; CreationFields = ',\"title\"' ; The above sets the Title field to hello on every new record created. |
| AllowCreation | Let the user create new records using the Day Calendar ( Default: true ) |
| AllowEdits | Let the user edit records using the Day Calendar ( Default: true ) |
| AllowDeletes | Let the user delete records using the Day Calendar ( Default: true ) |
| AllowDeselect | Let the user deselect records using the Day Calendar ( Default: true ) |
| ScriptOnDelete | A script to run on delete. Uses parameter defined in ActionOnSelect (or the FileMaker record ID if none is provided). |
| CreationMethod | How you allow the user to create records ( Default: 'drag' ) |
| AppointmentColour | The default colour of appointments when the appointment doesn't have a colour set in its colour field, or the colour field is not used ( Default: '#5588bb' ) |
| StartCalendarHours | The time of day that the Day Calendar will start drawing hour blocks ( Default: '00:00:00' ) |
| EndCalendarHours | The time of day that the Day Calendar will stop drawing hour blocks ( Default: '24:00:00' ) |
| StartWorkHours | The time of day that the Day Calendar will stop drawing its darker highlight colour representing non-work hours ( Default: '08:00:00' ) |
| EndWorkHours | The time of day that the Day Calendar will re-start drawing its darker highlight colour representing non-work hours ( Default: '18:00:00' ) |
| datelineOrientation | The position of the horizontal bar which contains the date labels ( Default: 'bottom' ) |
| timelineOrientation | The position of the vartical bar which contains the hour labels ( Default: 'left' ) |
| timelineWidth | The width of the blue bar which contains the hour labels ( Default: 80 ) |
| DragPrecision | The precision in minutes used when dragging and creating appointments ( Default: 15 ) |
| MinHourHeight | The smallest height that a single half hour block will shrink to ( Default: 24 ) |
| MinDayWidth | The smallest width that a single day block will shrink to ( Default: 95 ) |
| DefaultScrollSpeed | The maximum scroll speed when holding down the button ( Default: 15 ) |
| ScrollPercent | The starting scroll position ( Default: 0.575 ) |
| ScrollDay | The number of the day that is scrolled to when the calendar loads ( Default: 0 ) |
| AppointmentOpacity | The standard opacity of a normal appointment ( Default: 1 ) |
| OverlapOpacity | The opacity of bookings which are overlapping ( Default: .8 ) |
| DragOpacity | The opacity of bookings while they are being dragged ( Default: .5 ) |
| isPollActive | Allow polling of the data in the appointment table for automatic updating of the Day Calendar if records are changed ( Default: true ) |
| isDebugPoll | If set to true, will provide debugging feedback of polling ( Default: false ) |
| DefaultPosSpeed | Animation speed of default/drag positioning of elements. ( Default: 50 ) |
| PollPosSpeed | Animation speed of poll update positioning of elements. ( Default: 300 ) |
| RecolourSpeed | Animation speed of colour changes in elements. ( Default: 2500 ) |
| SelectSpeed | Speed of appointment select animation. ( Default: 300 ) |
| DragOpacitySpeed | Speed of fade on drag animation. ( Default: 500 ) |
WhereClause = 'RecordID < 20' ; will filter records so that only those with RecordID less than 20 will be shown.
CreationValues = ',\'newtitle\',\'newdescription\',\'1\'';
CreationFields = ',\"title\",\"description\",\"person ID\"';
'bottom' (Default) This setting will draw the dateline at the bottom of the screen.
'top'This will cause the dateline to be drawn at the top of the screen.
'hidden'Will cause the dateline to be hidden.
'left' (Default) This setting will draw the timeline at the left of the screen.
'right'This will cause the timeline to be drawn at the right of the screen.
'hidden'Will cause the timeline to be hidden.
'drag' (default) create appointments by dragging.
'click' create appointments by double click.
'both' use either method to create appointments.
// Put the overrides where the DayCalendar can see them.
ReactorFeed( BlackBoxPath( "DayCal" ) &"DayCalendarOverride.css" ;
// Feed reactor the overrides (MyDisplayOverrides is a field which lists all our overrides).
MyTO::MyDisplayOverrides)
Comments