summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-24 22:05:34 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-24 22:05:34 +0200
commit3ab295893086e40fe956ca918f0dcb333dcec683 (patch)
treef1ba7fda3abd5446f3a40c7edd9b4972b40c227d /core/js/shareitemmodel.js
parent6e9f49f3974c0e77c2d556004723b6192b3036a8 (diff)
downloadnextcloud-server-3ab295893086e40fe956ca918f0dcb333dcec683.tar.gz
nextcloud-server-3ab295893086e40fe956ca918f0dcb333dcec683.zip
Document options parameter in saveLinkShare
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index a11e785adc7..15af6df2c32 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -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
*/