});
$(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');
});
</script>
{/if}
<span class="statusDisplay sortableButtonContainer">
<span class="icon icon16 fa-arrows sortableNodeHandle"></span>
+ <span class="icon icon16 fa-{if !$reactionType->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if $reactionType->isDisabled}enable{else}disable{/if}{/lang}" data-object-id="{@$reactionType->reactionTypeID}"></span>
<a href="{link controller='ReactionTypeEdit' id=$reactionType->reactionTypeID}{/link}"><span title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip icon icon16 fa-pencil"></span></a>
<span title="{lang}wcf.global.button.delete{/lang}" class="jsDeleteButton pointer jsTooltip icon icon16 fa-times" data-object-id="{@$reactionType->reactionTypeID}" data-confirm-message-html="{lang __encode=true}wcf.acp.reactionType.delete.confirmMessage{/lang}"></span>
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;
* @method ReactionTypeEditor[] getObjects()
* @method ReactionTypeEditor getSingleObject()
*/
-class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortableAction {
+class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortableAction, IToggleAction {
+ use TDatabaseObjectToggle;
+
/**
* @inheritDoc
*/