From 5a1e558db96cb4ee53f29686fc6739fa2f950857 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 16 Jan 2021 10:35:59 +0100 Subject: [PATCH] Use `WoltLabSuite/Core/Acp/Ui/Worker` instead of `WCF.ACP.Worker` (#3686) Additionally, the mail worker dialogs now use titles. --- wcfsetup/install/files/acp/js/WCF.ACP.js | 20 +++++++++++++------ .../templates/sendMailUserBulkProcessing.tpl | 11 +++++++--- .../files/acp/templates/sitemapList.tpl | 13 ++++++++---- .../acp/templates/userActivityPointOption.tpl | 12 +++++++---- .../install/files/acp/templates/userMail.tpl | 13 ++++++++---- 5 files changed, 48 insertions(+), 21 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index c346688027..3258d2b028 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -1789,12 +1789,20 @@ WCF.ACP.User.SendNewPasswordHandler = { */ _clipboardAction: function(actionData) { if (actionData.data.actionName === 'com.woltlab.wcf.user.sendNewPassword') { - WCF.System.Confirmation.show(actionData.data.parameters.confirmMessage, function(action) { - if (action === 'confirm') { - new WCF.ACP.Worker('sendingNewPasswords', 'wcf\\system\\worker\\SendNewPasswordWorker', WCF.Language.get('wcf.acp.user.sendNewPassword.workerTitle'), { - userIDs: actionData.data.parameters.objectIDs - }); - } + require(['Language', 'Ui/Confirmation', 'WoltLabSuite/Core/Acp/Ui/Worker'], function(Language, UiConfirmation, AcpUiWorker) { + UiConfirmation.show({ + confirm: () => { + new AcpUiWorker({ + dialogId: 'sendingNewPasswords', + dialogTitle: Language.get('wcf.acp.user.sendNewPassword.workerTitle'), + className: 'wcf\\system\\worker\\SendNewPasswordWorker', + parameters: { + userIDs: actionData.data.parameters.objectIDs + }, + }); + }, + message: actionData.data.parameters.confirmMessage, + }) }); } } diff --git a/wcfsetup/install/files/acp/templates/sendMailUserBulkProcessing.tpl b/wcfsetup/install/files/acp/templates/sendMailUserBulkProcessing.tpl index 9933270a0e..42081a4ae8 100644 --- a/wcfsetup/install/files/acp/templates/sendMailUserBulkProcessing.tpl +++ b/wcfsetup/install/files/acp/templates/sendMailUserBulkProcessing.tpl @@ -56,11 +56,16 @@ {if !$mailID|empty} diff --git a/wcfsetup/install/files/acp/templates/sitemapList.tpl b/wcfsetup/install/files/acp/templates/sitemapList.tpl index 6bde07ae6f..d789e89eba 100644 --- a/wcfsetup/install/files/acp/templates/sitemapList.tpl +++ b/wcfsetup/install/files/acp/templates/sitemapList.tpl @@ -71,12 +71,17 @@ {/if} diff --git a/wcfsetup/install/files/acp/templates/userMail.tpl b/wcfsetup/install/files/acp/templates/userMail.tpl index f5140622ca..a9de7937d1 100644 --- a/wcfsetup/install/files/acp/templates/userMail.tpl +++ b/wcfsetup/install/files/acp/templates/userMail.tpl @@ -10,11 +10,16 @@ {if $mailID|isset} -- 2.20.1