Replace use of `WCF.Table.EmptyTableHandler` with `Ui/Empty`
authorMatthias Schmidt <gravatronics@live.com>
Fri, 12 Mar 2021 15:54:39 +0000 (16:54 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 12 Mar 2021 15:54:39 +0000 (16:54 +0100)
wcfsetup/install/files/acp/templates/captchaQuestionList.tpl
wcfsetup/install/files/acp/templates/devtoolsMissingLanguageItemList.tpl
wcfsetup/install/files/acp/templates/labelGroupList.tpl
wcfsetup/install/files/acp/templates/labelList.tpl
wcfsetup/install/files/acp/templates/tagList.tpl
wcfsetup/install/files/acp/templates/templateGroupList.tpl
wcfsetup/install/files/acp/templates/templateList.tpl
wcfsetup/install/files/acp/templates/userGroupAssignmentList.tpl
wcfsetup/install/files/acp/templates/userList.tpl

index ba1afe0e4d1dfa01c5d357a6003b1edec67d7253..b14bbdc41971c58e4599eaf1ff53ddc9edce0041 100644 (file)
@@ -4,18 +4,6 @@
        $(function() {
                new WCF.Action.Delete('wcf\\data\\captcha\\question\\CaptchaQuestionAction', '.jsQuestionRow');
                new WCF.Action.Toggle('wcf\\data\\captcha\\question\\CaptchaQuestionAction', '.jsQuestionRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#captchaQuestionTabelContainer'), 'jsQuestionRow', options);
        });
 </script>
 
@@ -51,7 +39,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {content}
                                        {foreach from=$objects item='question'}
                                                <tr class="jsQuestionRow">
index 59ad8abfb981b6028b486f24f067f56054cf7c0e..fc7e657e5d118e92387c0355f4751779bae114ba 100644 (file)
@@ -43,7 +43,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=logEntry}
                                        <tr class="jsObjectRow">
                                                <td class="columnIcon">
                        new UiDevtoolsMissingLanguageItemList.default();
                        
                        new WCF.Action.Delete('wcf\\data\\devtools\\missing\\language\\item\\DevtoolsMissingLanguageItemAction', '.jsObjectRow');
-                       
-                       var options = { };
-                       {if $pages > 1}
-                               options.refreshPage = true;
-                               {if $pages == $pageNo}
-                                       options.updatePageNumber = -1;
-                               {/if}
-                       {else}
-                               options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-                       {/if}
-                       new WCF.Table.EmptyTableHandler($('#missingLanguageItemTable'), 'jsObjectRow', options);
                });
        </script>
 {else}
index 091bd5e77a28189b624b5ee7257651292d1eaa6c..c8ea67cef8fc9086e3cd0d13a5afea17a5821fbb 100644 (file)
@@ -3,18 +3,6 @@
 <script data-relocate="true">
        $(function() {
                new WCF.Action.Delete('wcf\\data\\label\\group\\LabelGroupAction', '.jsLabelGroupRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#labelGroupTableContainer'), 'jsLabelGroupRow', options);
        });
 </script>
 
@@ -92,7 +80,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=group}
                                        <tr class="jsLabelGroupRow">
                                                <td class="columnIcon">
index 16fa0e8cd9b9e630f5baa678516f9e371ff35089..4c7f541ad86b1be5840b765c4f64ef9835946893 100644 (file)
@@ -4,18 +4,6 @@
        $(function() {
                new WCF.Action.Delete('wcf\\data\\label\\LabelAction', '.jsLabelRow');
                
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#labelTableContainer'), 'jsLabelRow', options);
-               
                {if $labelGroup && !$labelSearch && !$cssClassName && $items > 1}
                        new WCF.Sortable.List('labelTableContainer', 'wcf\\data\\label\\LabelAction', {@$startIndex}, {
                                items: 'tr',
                                </tr>
                        </thead>
                        
-                       <tbody{if $labelGroup && !$labelSearch && !$cssClassName && $items > 1} class="sortableList" data-object-id="{@$labelGroup->groupID}"{/if}>
+                       <tbody class="jsReloadPageWhenEmpty{if $labelGroup && !$labelSearch && !$cssClassName && $items > 1} sortableList" data-object-id="{@$labelGroup->groupID}{/if}">
                                {foreach from=$objects item=label}
                                        <tr class="jsLabelRow{if $labelGroup && !$labelSearch && !$cssClassName && $items > 1} sortableNode" data-object-id="{@$label->labelID}{/if}">
                                                <td class="columnIcon">
index 1ced57ac86aac6ce881529134e2aadb259c0babe..c42c54772be90044fe67b3dc3a716e98edd636ed 100644 (file)
@@ -75,7 +75,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=tag}
                                        <tr class="jsTagRow jsClipboardObject">
                                                <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$tag->tagID}"></td>
index fa2516850cafaae36345f96ddfb0f2d36f6eefd1..20c82c913d8faeae98627d7be74031893e733d17 100644 (file)
@@ -3,18 +3,6 @@
 <script data-relocate="true">
        $(function() {
                new WCF.Action.Delete('wcf\\data\\template\\group\\TemplateGroupAction', '.jsTemplateGroupRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#templateGroupTableContainer'), 'jsTemplateGroupRow', options);
        });
 </script>
 
@@ -53,7 +41,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=templateGroup}
                                        <tr class="jsTemplateGroupRow">
                                                <td class="columnIcon">
index f6a62863f65bf8c515a9d9512ccd6b597811d24e..9abc40bce2810409a006e8d7b4839945d640de41 100644 (file)
@@ -3,18 +3,6 @@
 <script data-relocate="true">
        $(function() {
                new WCF.Action.Delete('wcf\\data\\template\\TemplateAction', '.jsTemplateRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#templateTableContainer'), 'jsTemplateRow', options);
        });
 </script>
 
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item=template}
                                        {if $template->canCopy()}
                                                <tr class="jsTemplateRow">
index e8a6d4e577bc45822751bc6b1c7620ec5b817b5e..b5c9948ca277c6c0628b48036bef21f89d47d2c9 100644 (file)
@@ -4,18 +4,6 @@
        $(function() {
                new WCF.Action.Delete('wcf\\data\\user\\group\\assignment\\UserGroupAssignmentAction', '.jsUserGroupAssignmentRow');
                new WCF.Action.Toggle('wcf\\data\\user\\group\\assignment\\UserGroupAssignmentAction', '.jsUserGroupAssignmentRow');
-               
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-                       {if $pages == $pageNo}
-                               options.updatePageNumber = -1;
-                       {/if}
-               {else}
-                       options.emptyMessage = '{jslang}wcf.global.noItems{/jslang}';
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#userGroupAssignmentTableContainer'), 'jsUserGroupAssignmentRow', options);
        });
 </script>
 
@@ -52,7 +40,7 @@
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$objects item='assignment'}
                                        <tr class="jsUserGroupAssignmentRow">
                                                <td class="columnIcon">
index 1f92e0ef3b559f2432c676442b46db9ecb354823..13a1c838ed49d9d5ffaa1fbf436d812e1f68a57e 100644 (file)
                
                WCF.Clipboard.init('wcf\\acp\\page\\UserListPage', {@$hasMarkedItems}, actionObjects);
                
-               var options = { };
-               {if $pages > 1}
-                       options.refreshPage = true;
-               {/if}
-               
-               new WCF.Table.EmptyTableHandler($('#userTableContainer'), 'jsUserRow', options);
-               
                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}',
                                </tr>
                        </thead>
                        
-                       <tbody>
+                       <tbody class="jsReloadPageWhenEmpty">
                                {foreach from=$users item=user}
                                        <tr class="jsUserRow jsClipboardObject" data-object-id="{@$user->userID}" data-banned="{if $user->banned}true{else}false{/if}" data-enabled="{if !$user->activationCode}true{else}false{/if}" data-email-confirmed="{if $user->isEmailConfirmed()}true{else}false{/if}">
                                                <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$user->userID}"></td>