activityedit:saveable:changed
Fires when the Activity editing state changes which can be either saveable or not saveable. It also fires when the Activity edit view is rendered.
You would want to be notified about this event firing, because you might want to create your own save button and change its appearance based on the possibility of saving.
Examples
authorApp.on('activityedit:saveable:changed', function (event) {
console.log('This code executes when the save Activity editing state has changed.');
console.log(event.data);
});
Callback arguments
The event callback function will be called with an AuthorEvent instance as an argument (unless indicated otherwise). The AuthorEvent object provides further information for the event that has been fired. Additional data attributes listed below can be accessed from the event.data
object. The AuthorEvent object will look like the example below:
authorApp.on('[name of the fired event]', function (event) {
console.log(event);
/*
{
"name": "[name of the fired event]",
"data": {
// additional data attributes
}
}
*/
});
-
saveable booleanIndicates whether the Activity can be saved.
Related articles
- The
saveActivity()
method, which saves the current Activity being edited. - The
activityedit:saveable:changed
event, which fires when the save Activity state changes. - The
save:activity
event, which fires before an Activity is to be saved. - The
save:activity:error
event, which fires when an Activity has failed to save. - The
save:activity:success
event, which fires when an Activity has successfully saved.