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

templates/conversationList.tpl

index 4790bcbfe77db7a86af2d5333836e58d4f1d6806..b99ceb54337e606bd976359052feb929017199c0 100644 (file)
 
 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Conversation{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@LAST_UPDATE_TIME}"></script>
 <script data-relocate="true">
-       require(['Language', 'WoltLabSuite/Core/Controller/Popover', 'WoltLabSuite/Core/Ui/ItemList/User'], function(Language, ControllerPopover, UiItemListUser) {
+       require([
+               'WoltLabSuite/Core/Language',
+               'WoltLabSuite/Core/Controller/Popover',
+               'WoltLabSuite/Core/Ui/ItemList/User',
+               'WoltLabSuite/Core/Controller/Clipboard',
+       ], (
+               Language,
+               ControllerPopover,
+               UiItemListUser,
+               ControllerClipboard
+       ) => {
                Language.addObject({
                        'wcf.conversation.edit.addParticipants': '{jslang}wcf.conversation.edit.addParticipants{/jslang}',
                        'wcf.conversation.edit.assignLabel': '{jslang}wcf.conversation.edit.assignLabel{/jslang}',
                        'wcf.conversation.label.assignLabels': '{jslang}wcf.conversation.label.assignLabels{/jslang}'
                });
                
-               WCF.Clipboard.init('wcf\\page\\ConversationListPage', {@$hasMarkedItems}, { });
+               ControllerClipboard.setup({
+                       pageClassName: 'wcf\\page\\ConversationListPage',
+                       hasMarkedItems: {if $hasMarkedItems}true{else}false{/if},
+               });
                
                var $editorHandler = new WCF.Conversation.EditorHandler();
                var $inlineEditor = new WCF.Conversation.InlineEditor('.conversation');