Vision - Schedule Management Scripting Functions
This page details the various component and extension functions available for Vision's Schedule Management component.
Component Functionsβ
This component does not have component functions associated with it.
Extension Functionsβ
filterScheduleβ
-
Description
- Called for each schedule loaded into the management table. Return false to hide this schedule from the management table. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- String schedule - The schedule name
-
Return
- Boolean
filterHolidayβ
-
Description
- Called for each holiday loaded into the management table. Return false to hide this holiday from the management table. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- String holiday - The holiday name.
-
Return
- Boolean
onCreateScheduleβ
-
Description
- Called when the add button is pressed when adding a schedule. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the add by calling saveContect.rejectSave('reason').
-
Return
- None
onDeleteScheduleβ
-
Description
- Called when the delete button is pressed for one or more schedules. This code is executed in a background thread, once for each schedule to be deleted.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the add by calling saveContext.rejectSave('reason')
- String name - The name of the schedule to be deleted.
-
Return
- None
onSaveScheduleβ
-
Description
- Called when the save button is pressed when adding or editing a schedule. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContect.rejectSave('reason').
- String oldName - The schedule name before editing. Will be None for a schedule being added.
- String newName - The new name of the edited schedule.
-
Return
- None
onCreateHolidayβ
-
Description
- Called when the add button is pressed when to add a holiday. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason').
-
Return
- None
onDeleteHolidayβ
-
Description
- Called when the delete button is pressed for one or more holidays. This code is executed in a background thread, once for each holiday to be deleted.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the add by calling saveContext.rejectSave('reason')
- String name - The name of the holiday to be deleted.
-
Return
- None
onSaveHolidayβ
-
Description
- Called when the save button is pressed when adding or editing a holiday. This code is executed in a background thread.
-
Parameters
- Component self - A reference to the component that is invoking this function.
- Object saveContext - An object that can be used to reject the edit by calling saveContext.rejectSave('reason'). If more than one role is rejected, reasons will be concatenated.
- String oldName - The holiday name before editing. Will be None for a holiday being added.
- String newName - The new name of the edited holiday.
-
Return
- None