Use `Ui/Sortable/List` instead of `WCF.Sortable.List`
authorMatthias Schmidt <gravatronics@live.com>
Sat, 20 Mar 2021 13:01:40 +0000 (14:01 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 20 Mar 2021 13:01:57 +0000 (14:01 +0100)
See #3876

wcfsetup/install/files/acp/templates/labelList.tpl

index 4c7f541ad86b1be5840b765c4f64ef9835946893..dd4c6ecb35fb763e12a0eab5b6298f094f2ac44b 100644 (file)
@@ -3,14 +3,18 @@
 <script data-relocate="true">
        $(function() {
                new WCF.Action.Delete('wcf\\data\\label\\LabelAction', '.jsLabelRow');
-               
-               {if $labelGroup && !$labelSearch && !$cssClassName && $items > 1}
-                       new WCF.Sortable.List('labelTableContainer', 'wcf\\data\\label\\LabelAction', {@$startIndex}, {
-                               items: 'tr',
-                               toleranceElement: null
-                       }, true);
-               {/if}
        });
+       
+       {if $labelGroup && !$labelSearch && !$cssClassName && $items > 1}
+               require(['WoltLabSuite/Core/Ui/Sortable/List'], function (UiSortableList) {
+                       new UiSortableList({
+                               containerId: 'labelTableContainer',
+                               className: 'wcf\\data\\label\\LabelAction',
+                               isSimpleSorting: true,
+                               offset: {@$startIndex},
+                       });
+               });
+       {/if}
 </script>
 
 <header class="contentHeader">