Additionally, the mail worker dialogs now use titles.
*/
_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,
+ })
});
}
}
{if !$mailID|empty}
<script data-relocate="true">
- require(['Language'], function(Language) {
+ require(['Language', 'WoltLabSuite/Core/Acp/Ui/Worker'], function (Language, AcpUiWorker) {
Language.add('wcf.acp.worker.abort.confirmMessage', '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}');
- new WCF.ACP.Worker('mail', 'wcf\\system\\worker\\MailWorker', '', {
- mailID: {@$mailID}
+ new AcpUiWorker({
+ dialogId: 'mail',
+ dialogTitle: '{jslang}wcf.acp.user.bulkProcessing.sendMail{/jslang}',
+ className: 'wcf\\system\\worker\\MailWorker',
+ parameters: {
+ mailID: {@$mailID},
+ },
});
});
</script>
{/if}
<script data-relocate="true">
- require(['Language'], function(Language) {
+ require(['Language', 'WoltLabSuite/Core/Acp/Ui/Worker'], function (Language, AcpUiWorker) {
Language.add('wcf.acp.worker.abort.confirmMessage', '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}');
- elById('sitemapRebuildButton').addEventListener('click', function () {
- new WCF.ACP.Worker('sitemapRebuild', 'wcf\\system\\worker\\SitemapRebuildWorker', '{jslang}wcf.acp.rebuildData.com.woltlab.wcf.sitemap{/jslang}', {
- forceRebuild: true
+ document.getElementById('sitemapRebuildButton').addEventListener('click', () => {
+ new AcpUiWorker({
+ dialogId: 'sitemapRebuild',
+ dialogTitle: '{jslang}wcf.acp.rebuildData.com.woltlab.wcf.sitemap{/jslang}',
+ className: 'wcf\\system\\worker\\SitemapRebuildWorker',
+ parameters: {
+ forceRebuild: true,
+ },
});
});
});
{include file='header' pageTitle='wcf.acp.user.activityPoint.option'}
<script data-relocate="true">
- $(function() {
- WCF.Language.add('wcf.acp.worker.abort.confirmMessage', '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}');
+ require(['Language', 'WoltLabSuite/Core/Acp/Ui/Worker'], function (Language, AcpUiWorker) {
+ Language.add('wcf.acp.worker.abort.confirmMessage', '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}');
- $('#updateEvents').click(function () {
- new WCF.ACP.Worker('events', 'wcf\\system\\worker\\UserActivityPointUpdateEventsWorker', '{jslang}wcf.acp.user.activityPoint.updateEvents{/jslang}');
+ document.getElementById('updateEvents').addEventListener('click', () => {
+ new AcpUiWorker({
+ dialogId: 'events',
+ dialogTitle: '{jslang}wcf.acp.user.activityPoint.updateEvents{/jslang}',
+ className: 'wcf\\system\\worker\\UserActivityPointUpdateEventsWorker',
+ });
});
});
</script>
{if $mailID|isset}
<script data-relocate="true">
- $(function() {
- WCF.Language.add('wcf.acp.worker.abort.confirmMessage', '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}');
+ require(['Language', 'WoltLabSuite/Core/Acp/Ui/Worker'], function (Language, AcpUiWorker) {
+ Language.add('wcf.acp.worker.abort.confirmMessage', '{lang}wcf.acp.worker.abort.confirmMessage{/lang}');
- new WCF.ACP.Worker('mail', 'wcf\\system\\worker\\MailWorker', '', {
- mailID: {@$mailID}
+ new AcpUiWorker({
+ dialogId: 'mail',
+ dialogTitle: '{jslang}{$pageTitle}{/jslang}',
+ className: 'wcf\\system\\worker\\MailWorker',
+ parameters: {
+ mailID: {@$mailID},
+ },
});
});
</script>