From: Joshua Rüsweg Date: Sat, 7 Dec 2019 16:42:08 +0000 (+0100) Subject: Add JS event before open reaction count dialog X-Git-Tag: 5.2.0_RC_1~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a4bbf2a2dc0559ca454d5b964badbd07090a64f;p=GitHub%2FWoltLab%2FWCF.git Add JS event before open reaction count dialog Closes #3093 --- 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); },