From 0a4bbf2a2dc0559ca454d5b964badbd07090a64f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Sat, 7 Dec 2019 17:42:08 +0100 Subject: [PATCH] Add JS event before open reaction count dialog Closes #3093 --- .../files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js index 6155e2e16d..aad32dbe51 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js @@ -11,12 +11,12 @@ define( [ 'Ajax', 'Core', 'Dictionary', 'Language', 'ObjectMap', 'StringUtil', 'Dom/ChangeListener', 'Dom/Util', - 'Ui/Dialog' + 'Ui/Dialog', 'EventHandler' ], function( Ajax, Core, Dictionary, Language, ObjectMap, StringUtil, DomChangeListener, DomUtil, - UiDialog + UiDialog, EventHandler ) { "use strict"; @@ -194,6 +194,8 @@ define( }, _ajaxSuccess: function(data) { + EventHandler.fire('com.woltlab.wcf.ReactionCountButtons', 'openDialog', data); + UiDialog.open(this, data.returnValues.template); UiDialog.setTitle('userReactionOverlay-' + this._objectType, data.returnValues.title); }, -- 2.20.1