summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-24 21:31:53 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-24 21:31:53 +0200
commit6e9f49f3974c0e77c2d556004723b6192b3036a8 (patch)
treef7456d0da5c7843725f2341d3b6fda7bf8459f02 /core/js/shareitemmodel.js
parent488020cf2efaa84f80bf5d39a0065b602b6d0a12 (diff)
downloadnextcloud-server-6e9f49f3974c0e77c2d556004723b6192b3036a8.tar.gz
nextcloud-server-6e9f49f3974c0e77c2d556004723b6192b3036a8.zip
Add "complete" callback support for addShare
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index c2f7c78f6ce..a11e785adc7 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -179,6 +179,10 @@
url: this._getUrl('shares'),
data: attributes,
dataType: 'json'
+ }).always(function() {
+ if (_.isFunction(options.complete)) {
+ options.complete(self);
+ }
}).done(function() {
self.fetch().done(function() {
if (_.isFunction(options.success)) {