Add JS event before open reaction count dialog
authorJoshua Rüsweg <ruesweg@woltlab.com>
Sat, 7 Dec 2019 16:42:08 +0000 (17:42 +0100)
committerJoshua Rüsweg <ruesweg@woltlab.com>
Sat, 7 Dec 2019 16:42:13 +0000 (17:42 +0100)
Closes #3093

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js

index 6155e2e16d2061b7b887fefe640890f83168dd24..aad32dbe51295ba713e146ca27b4debaf876f8ca 100644 (file)
@@ -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);
                        },