From: Joshua Rüsweg Date: Mon, 29 Jul 2019 15:34:22 +0000 (+0200) Subject: Add list toggle for reaction types X-Git-Tag: 5.2.0_Alpha_4~27 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53284655c60fcf134bf34816029ced06e2aa5698;p=GitHub%2FWoltLab%2FWCF.git Add list toggle for reaction types Closes #2997 --- diff --git a/wcfsetup/install/files/acp/templates/reactionTypeList.tpl b/wcfsetup/install/files/acp/templates/reactionTypeList.tpl index d2f95162c4..fdf7e6a53b 100644 --- a/wcfsetup/install/files/acp/templates/reactionTypeList.tpl +++ b/wcfsetup/install/files/acp/templates/reactionTypeList.tpl @@ -11,7 +11,8 @@ }); $(function() { - new WCF.Action.Delete('wcf\\data\\reaction\\type\\ReactionTypeAction', $('.reactionTypeRow')); + new WCF.Action.Delete('wcf\\data\\reaction\\type\\ReactionTypeAction', '.reactionTypeRow'); + new WCF.Action.Toggle('wcf\\data\\reaction\\type\\ReactionTypeAction', '.reactionTypeRow'); }); {/if} @@ -47,6 +48,7 @@ + diff --git a/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php b/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php index 3bdae6773c..2d3c056399 100644 --- a/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php +++ b/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php @@ -2,6 +2,8 @@ namespace wcf\data\reaction\type; use wcf\data\AbstractDatabaseObjectAction; use wcf\data\ISortableAction; +use wcf\data\IToggleAction; +use wcf\data\TDatabaseObjectToggle; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\UserInputException; use wcf\system\file\upload\UploadFile; @@ -20,7 +22,9 @@ use wcf\system\WCF; * @method ReactionTypeEditor[] getObjects() * @method ReactionTypeEditor getSingleObject() */ -class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortableAction { +class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortableAction, IToggleAction { + use TDatabaseObjectToggle; + /** * @inheritDoc */