Document options parameter in saveLinkShare

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2017-04-24 22:05:34 +02:00
parent 6e9f49f397
commit 3ab2958930
1 changed files with 8 additions and 1 deletions

View File

@ -104,7 +104,14 @@
/**
* Saves the current link share information.
*
* This will trigger an ajax call and refetch the model afterwards.
* This will trigger an ajax call and, if successful, refetch the model
* afterwards. Callbacks "success", "error" and "complete" can be given
* in the options object; "success" is called after a successful save
* once the model is refetch, "error" is called after a failed save, and
* "complete" is called both after a successful save and after a failed
* save. Note that "complete" is called before "success" and "error" are
* called (unlike in jQuery, in which it is called after them); this
* ensures that "complete" is called even if refetching the model fails.
*
* TODO: this should be a separate model
*/