From 88432fe04adbf7eb370e32caa8a600b142e84103 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 16 Feb 2013 19:29:41 +0100 Subject: [PATCH] Added ability to suppress errors for an action proxy --- wcfsetup/install/files/js/WCF.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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)); } -- 2.20.1