Replace `WCF.Table.EmptyTableHandler` with `Ui/Empty` in tutorial series
authorMatthias Schmidt <gravatronics@live.com>
Tue, 16 Mar 2021 12:31:33 +0000 (13:31 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 16 Mar 2021 12:31:33 +0000 (13:31 +0100)
See WoltLab/WCF#4073

snippets/tutorial/tutorial-series/part-1/acptemplates/personList.tpl
snippets/tutorial/tutorial-series/part-3/acptemplates/personList.tpl

index 39507ecd6bfbb844c340299ed6c974b636ea8670..fc7dc36e24fbbf7b71312c34ea0ad251cd83fd2b 100644 (file)
@@ -33,7 +33,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=person}
                                        <tr class="jsPersonRow">
                                                <td class="columnIcon">
 <script data-relocate="true">
        $(function() {
                new WCF.Action.Delete('wcf\\data\\person\\PersonAction', '.jsPersonRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{lang}wcf.global.noItems{/lang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#personTableContainer'), 'jsPersonRow', options);
        });
 </script>
 
index 39507ecd6bfbb844c340299ed6c974b636ea8670..fc7dc36e24fbbf7b71312c34ea0ad251cd83fd2b 100644 (file)
@@ -33,7 +33,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=person}
                                        <tr class="jsPersonRow">
                                                <td class="columnIcon">
 <script data-relocate="true">
        $(function() {
                new WCF.Action.Delete('wcf\\data\\person\\PersonAction', '.jsPersonRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{lang}wcf.global.noItems{/lang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#personTableContainer'), 'jsPersonRow', options);
        });
 </script>