Events
The event functions is one of the most important features. those are callback functions that let you do stuff after each modification.
For example, you can call a function on each user update which will synchronize the changes with your database using an Ajax call!
All that functions are considered as options and must be declared at the same time than the other options:
$("#pit-scheduler").pitScheduler({ /** Options and events **/});
Note: All the event functions first argument is the 'settings' variable of the scheduler. This object allows you to access all the needed data and do whatever you want!
onChange()
/** ... **/
onChange: function (settings) {
/** Your stuff here **/
},
This is the most important event function. It is called after EVERY data updates that can append inside the scheduler. It also means that this function will be called at the same time than any other event function!
onTaskCreation()
/** ... **/
onTaskCreation: function (settings) {
/** Your stuff here **/
},
This event will be called after each task creation. onTaskAssignation()
/** ... **/
onTaskAssignation: function (settings) {
/** Your stuff here **/
},
This event will be called after each task assignation. onTaskEdition()
/** ... **/
onTaskEdition: function (settings) {
/** Your stuff here **/
},
This event will be called after each task edition. onTaskRemoval()
/** ... **/
onTaskRemoval: function (settings) {
/** Your stuff here **/
},
This event will be called after each task deletion. onUserCreation()
/** ... **/
onUserCreation: function (settings) {
/** Your stuff here **/
},
This event will be called after each user creation. onUserEdition()
/** ... **/
onUserEdition: function (settings) {
/** Your stuff here **/
},
This event will be called after each user edition. onUserTaskDeletion()
/** ... **/
onUserTaskDeletion: function (settings) {
/** Your stuff here **/
},
This event will be called after each user task deletion. onUserRemoval()
/** ... **/
onUserRemoval: function (settings) {
/** Your stuff here **/
},
This event will be called after each user deletion.