summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-07-04 11:45:36 +0200
committerVincent Petry <pvince81@owncloud.com>2014-07-04 11:45:36 +0200
commit59ca30d462f3b3a5703f203d2d4c3641c456e560 (patch)
tree35994bc6782c3eff03d38109209116ccd6397bbb /apps/files_sharing
parente4a3f8d3c44f3238071d03f793cd2c5395062b5e (diff)
downloadnextcloud-server-59ca30d462f3b3a5703f203d2d4c3641c456e560.tar.gz
nextcloud-server-59ca30d462f3b3a5703f203d2d4c3641c456e560.zip
Fix reload call for all subclasses
All subclasses must also properly return the ajax call object.
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/sharedfilelist.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 304f77a8d77..c6dc0a4c862 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -95,7 +95,6 @@
},
reload: function() {
- var self = this;
this.showMask();
if (this._reloadCall) {
this._reloadCall.abort();
@@ -110,14 +109,10 @@
type: 'GET',
beforeSend: function(xhr) {
xhr.setRequestHeader('OCS-APIREQUEST', 'true');
- },
- error: function(result) {
- self.reloadCallback(result);
- },
- success: function(result) {
- self.reloadCallback(result);
}
});
+ var callBack = this.reloadCallback.bind(this);
+ return this._reloadCall.then(callBack, callBack);
},
reloadCallback: function(result) {