From: Matthias Schmidt Date: Mon, 28 Sep 2015 15:15:28 +0000 (+0200) Subject: Use second argument of bind in Upload.js X-Git-Tag: 3.0.0_Beta_1~2109 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec96ae6019c3b1587ddc1d69987efc351fa20391;p=GitHub%2FWoltLab%2FWCF.git Use second argument of bind in Upload.js --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Upload.js b/wcfsetup/install/files/js/WoltLab/WCF/Upload.js index d6123dd0c3..07f0ba0fe4 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Upload.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Upload.js @@ -306,15 +306,9 @@ define(['AjaxRequest', 'Core', 'Dom/ChangeListener', 'Language', 'Dom/Util'], fu var request = new AjaxRequest({ data: formData, contentType: false, - failure: function(data, responseText, xhr, requestOptions) { - this._failure(uploadId, data, responseText, xhr, options.data); - }.bind(this), - success: function(data, responseText, xhr, requestOptions) { - this._success(uploadId, data, responseText, xhr, requestOptions); - }.bind(this), - uploadProgress: (function(event) { - this._progress(uploadId, event); - }).bind(this), + failure: this._failure.bind(this, uploadId), + success: this._success.bind(this, uploadId), + uploadProgress: this._progress.bind(this, uploadId), url: this._options.url }); request.sendRequest();