From 131a201b2edcda415d66831c461ba87a7db361a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Magnus=20K=C3=BChn?= Date: Sat, 20 Apr 2013 09:40:40 +0200 Subject: [PATCH] Using WCF.Action.Proxy.abortPrevious() in WCF.ACP.Worker --- wcfsetup/install/files/acp/js/WCF.ACP.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index a181546983..8d40183648 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -1126,12 +1126,6 @@ WCF.ACP.Options.Group = Class.extend({ * @param object options */ WCF.ACP.Worker = Class.extend({ - /** - * true, if worker was aborted - * @var boolean - */ - _aborted: false, - /** * dialog id * @var string @@ -1165,7 +1159,6 @@ WCF.ACP.Worker = Class.extend({ * @param object parameters */ init: function(dialogID, className, title, parameters) { - this._aborted = false; this._dialogID = dialogID + 'Worker'; this._dialog = null; this._proxy = new WCF.Action.Proxy({ @@ -1187,15 +1180,13 @@ WCF.ACP.Worker = Class.extend({ * @param object data */ _success: function(data) { - if (this._aborted) { - return; - } - // init binding if (this._dialog === null) { this._dialog = $('
').hide().appendTo(document.body); this._dialog.wcfDialog({ - onClose: $.proxy(function() { this._aborted = true; }, this), + onClose: $.proxy(function() { + this._proxy.abortPrevious(); + }, this), title: this._title }); } -- 2.20.1