diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-07-04 11:45:36 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-07-04 16:13:52 +0200 |
commit | 86545a90d0a02d1035c3940752cb635f35d8a9f3 (patch) | |
tree | 3189a07551c978255b03302677137ed63b261f4b /apps/files_sharing/js | |
parent | 71261decf11f6db9c2de30b24f37bda0789a0032 (diff) | |
download | nextcloud-server-86545a90d0a02d1035c3940752cb635f35d8a9f3.tar.gz nextcloud-server-86545a90d0a02d1035c3940752cb635f35d8a9f3.zip |
Fix reload call for all subclasses
All subclasses must also properly return the ajax call object.
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index ea9071cfcb8..e643618e774 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) { |