Replace use of `WCF.Clipboard` with `Controller/Clipboard`
authorMatthias Schmidt <gravatronics@live.com>
Fri, 2 Jul 2021 11:37:38 +0000 (13:37 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 2 Jul 2021 11:37:38 +0000 (13:37 +0200)
See #3876

wcfsetup/install/files/acp/templates/tagList.tpl
wcfsetup/install/files/acp/templates/userList.tpl

index 87993046700fa0b06b1bcac61c25c00222a351ba..ff969d85b2547c0503ee2170e266f673ddec5f1c 100644 (file)
@@ -1,10 +1,13 @@
 {include file='header' pageTitle='wcf.acp.tag.list'}
 
 <script data-relocate="true">
-       require(['WoltLabSuite/Core/Controller/Clipboard', 'Language'], function(ControllerClipboard, Language) {
+       require(['WoltLabSuite/Core/Controller/Clipboard', 'WoltLabSuite/Core/Language'], (ControllerClipboard, Language) => {
                Language.add('wcf.acp.tag.setAsSynonyms', '{jslang}wcf.acp.tag.setAsSynonyms{/jslang}');
                
-               WCF.Clipboard.init('wcf\\acp\\page\\TagListPage', {@$hasMarkedItems});
+               ControllerClipboard.setup({
+                       pageClassName: 'wcf\\acp\\page\\TagListPage',
+                       hasMarkedItems: {if $hasMarkedItems}true{else}false{/if},
+               });
                
                new WCF.ACP.Tag.SetAsSynonymsHandler();
        });
index 1710809dfc67ecff16c273fbbf80046d83d5e72e..712d7d1f2cc3f43cf4bb2a428e8d3d9464fdb8aa 100644 (file)
@@ -8,9 +8,14 @@
 
 {event name='javascriptInclude'}
 <script data-relocate="true">
+       require(['WoltLabSuite/Core/Controller/Clipboard'], (ControllerClipboard) => {
+               ControllerClipboard.setup({
+                       pageClassName: 'wcf\\acp\\page\\UserListPage',
+                       hasMarkedItems: {if $hasMarkedItems}true{else}false{/if},
+               });
+       });
+       
        $(function() {
-               WCF.Clipboard.init('wcf\\acp\\page\\UserListPage', {@$hasMarkedItems});
-               
                WCF.Language.addObject({
                        'wcf.acp.user.banReason': '{jslang}wcf.acp.user.banReason{/jslang}',
                        'wcf.acp.user.banReason.description': '{jslang}wcf.acp.user.banReason.description{/jslang}',