summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
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_external/js
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_external/js')
-rw-r--r--apps/files_external/js/mountsfilelist.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js
index 70b5b81e65b..0f61f78aac8 100644
--- a/apps/files_external/js/mountsfilelist.js
+++ b/apps/files_external/js/mountsfilelist.js
@@ -65,7 +65,6 @@
},
reload: function() {
- var self = this;
this.showMask();
if (this._reloadCall) {
this._reloadCall.abort();
@@ -78,14 +77,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) {