Use `Ui/Object/Action/Delete` in frontend
authorMatthias Schmidt <gravatronics@live.com>
Sat, 20 Mar 2021 12:15:38 +0000 (13:15 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 21 Mar 2021 09:21:40 +0000 (10:21 +0100)
com.woltlab.wcf/templates/following.tpl
com.woltlab.wcf/templates/ignoredUsers.tpl

index ac0a69a3044c500dadf3e1260dc03582397853d6..1b3fc468b3b225a839a67f7724ace4eab2dd201b 100644 (file)
@@ -12,9 +12,9 @@
 
 {if $objects|count}
        <div class="section sectionContainerList">
-               <ol class="containerList userList jsReloadPageWhenEmpty">
+               <ol class="containerList userList jsReloadPageWhenEmpty jsObjectActionContainer" data-object-action-class-name="wcf\data\user\follow\UserFollowAction">
                        {foreach from=$objects item=user}
-                               <li class="jsFollowing">
+                               <li class="jsFollowing jsObjectActionObject" data-object-id="{@$user->getObjectID()}">
                                        <div class="box48">
                                                {user object=$user type='avatar48' ariaHidden='true' tabindex='-1'}
                                                
@@ -23,7 +23,7 @@
                                                        
                                                        <nav class="jsMobileNavigation buttonGroupNavigation">
                                                                <ul class="buttonList iconList jsOnly">
-                                                                       <li><a class="pointer jsTooltip jsDeleteButton" title="{lang}wcf.user.button.unfollow{/lang}" data-object-id="{@$user->followID}"><span class="icon icon16 fa-times"></span> <span class="invisible">{lang}wcf.user.button.unfollow{/lang}</span></a></li>
+                                                                       <li><a class="pointer jsTooltip jsObjectAction" data-object-action="delete" title="{lang}wcf.user.button.unfollow{/lang}" data-object-id="{@$user->followID}"><span class="icon icon16 fa-times"></span> <span class="invisible">{lang}wcf.user.button.unfollow{/lang}</span></a></li>
                                                                        {event name='userButtons'}
                                                                </ul>
                                                        </nav>
        <p class="info" role="status">{lang}wcf.user.following.noUsers{/lang}</p>
 {/if}
 
-<script data-relocate="true">
-       $(function() {
-               new WCF.Action.Delete('wcf\\data\\user\\follow\\UserFollowAction', '.jsFollowing');
-       });
-</script>
-
 {include file='footer'}
index 36071e512587dc6fe2cc6ed30da2bd7a75b1a794..4a37a19cb61f9b43cf7e8bda930c45a9c6f275db 100644 (file)
@@ -12,9 +12,9 @@
 
 {if $objects|count}
        <div class="section sectionContainerList">
-               <ol class="containerList userList jsReloadPageWhenEmpty">
+               <ol class="containerList userList jsReloadPageWhenEmpty jsObjectActionContainer" data-object-action-class-name="wcf\data\user\ignore\UserIgnoreAction">
                        {foreach from=$objects item=user}
-                               <li class="jsIgnoredUser">
+                               <li class="jsIgnoredUser jsObjectActionObject" data-object-id="{@$user->getObjectID()}">
                                        <div class="box48">
                                                {user object=$user type='avatar48' ariaHidden='true' tabindex='-1'}
                                                
@@ -23,7 +23,7 @@
                                                        
                                                        <nav class="jsMobileNavigation buttonGroupNavigation">
                                                                <ul class="buttonList iconList jsOnly">
-                                                                       <li><a class="pointer jsTooltip jsDeleteButton" title="{lang}wcf.user.button.unignore{/lang}" data-object-id="{@$user->ignoreID}"><span class="icon icon16 fa-times"></span> <span class="invisible">{lang}wcf.user.button.unignore{/lang}</span></a></li>
+                                                                       <li><a class="pointer jsTooltip jsObjectAction" data-object-action="delete" title="{lang}wcf.user.button.unignore{/lang}" data-object-id="{@$user->ignoreID}"><span class="icon icon16 fa-times"></span> <span class="invisible">{lang}wcf.user.button.unignore{/lang}</span></a></li>
                                                                        {event name='userButtons'}
                                                                </ul>
                                                        </nav>
        <p class="info" role="status">{lang}wcf.user.ignoredUsers.noUsers{/lang}</p>
 {/if}
 
-<script data-relocate="true">
-       $(function() {
-               new WCF.Action.Delete('wcf\\data\\user\\ignore\\UserIgnoreAction', '.jsIgnoredUser');
-       });
-</script>
-
 {include file='footer'}