From: Alexander Ebert Date: Sat, 16 Feb 2013 18:29:41 +0000 (+0100) Subject: Added ability to suppress errors for an action proxy X-Git-Tag: 2.0.0_Beta_1~477 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88432fe04adbf7eb370e32caa8a600b142e84103;p=GitHub%2FWoltLab%2FWCF.git Added ability to suppress errors for an action proxy --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 09651ef133..748c7e316e 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1472,6 +1472,7 @@ WCF.Action.Proxy = Class.extend({ failure: null, showLoadingOverlay: true, success: null, + suppressErrors: false, type: 'POST', url: 'index.php/AJAXProxy/?t=' + SECURITY_TOKEN + SID_ARG_2ND }, options); @@ -1479,7 +1480,7 @@ WCF.Action.Proxy = Class.extend({ this.confirmationDialog = null; this.loading = null; this._showLoadingOverlayOnce = false; - this._suppressErrors = false; + this._suppressErrors = (this.options === true); // send request immediately after initialization if (this.options.autoSend) { @@ -1513,6 +1514,13 @@ WCF.Action.Proxy = Class.extend({ this._showLoadingOverlayOnce = true; }, + /** + * Suppressed errors for this action proxy. + */ + suppressErrors: function() { + this._suppressErrors = true; + }, + /** * Fires before request is send, displays global loading status. */ @@ -5446,7 +5454,8 @@ WCF.System.KeepAlive = Class.extend({ actionName: 'keepAlive', className: 'wcf\\data\\session\\SessionAction' }, - showLoadingOverlay: false + showLoadingOverlay: false, + suppressErrors: true }); }, (seconds * 1000)); }