From 53284655c60fcf134bf34816029ced06e2aa5698 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Mon, 29 Jul 2019 17:34:22 +0200 Subject: [PATCH] Add list toggle for reaction types Closes #2997 --- wcfsetup/install/files/acp/templates/reactionTypeList.tpl | 4 +++- .../lib/data/reaction/type/ReactionTypeAction.class.php | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 */ -- 2.20.1