Fixed event handling
authorAlexander Ebert <ebert@woltlab.com>
Thu, 25 Aug 2016 17:19:26 +0000 (19:19 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 25 Aug 2016 17:19:40 +0000 (19:19 +0200)
com.woltlab.wcf/templates/wysiwyg.tpl
wcfsetup/install/files/acp/templates/wysiwyg.tpl
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js

index c26711b2631dd0b28b767eff69ce4c4b36933936..f98501aaf2d3b02ea8693a0367c2c51fb2690ec0 100644 (file)
                                        
                                        // WoltLab specials
                                        'WoltLabBlock',
+                                       'WoltLabEvent',
                                        'WoltLabKeydown',
                                        
                                        // WoltLab core
                                        'WoltLabCode',
                                        'WoltLabColor',
                                        'WoltLabDropdown',
-                                       'WoltLabEvent',
                                        'WoltLabImage',
                                        'WoltLabInlineCode',
                                        'WoltLabInsert',
index c26711b2631dd0b28b767eff69ce4c4b36933936..f98501aaf2d3b02ea8693a0367c2c51fb2690ec0 100644 (file)
                                        
                                        // WoltLab specials
                                        'WoltLabBlock',
+                                       'WoltLabEvent',
                                        'WoltLabKeydown',
                                        
                                        // WoltLab core
                                        'WoltLabCode',
                                        'WoltLabColor',
                                        'WoltLabDropdown',
-                                       'WoltLabEvent',
                                        'WoltLabImage',
                                        'WoltLabInlineCode',
                                        'WoltLabInsert',
index 8f52ad7e9db0eb0274b409cec09a6003e6fc4ce5..c9c11e296928d36d08a4502bfc9680c9c53b6cfa 100644 (file)
@@ -45,6 +45,8 @@ $.Redactor.prototype.WoltLabEvent = function() {
                
                register: function(callbackName, callback) {
                        require(['EventHandler'], (function(EventHandler) {
+                               var uuid = this.uuid;
+                               
                                if (this._callbacks.indexOf(callbackName) === -1) {
                                        this.opts.callbacks[callbackName] = (function (event) {
                                                var data = {
@@ -53,7 +55,7 @@ $.Redactor.prototype.WoltLabEvent = function() {
                                                        redactor: this
                                                };
                                                
-                                               EventHandler.fire('com.woltlab.wcf.redactor2', callbackName + '_' + this.WoltLabEvent._elementId, data);
+                                               EventHandler.fire('com.woltlab.wcf.redactor2', callbackName + '_' + uuid + '_' + this.WoltLabEvent._elementId, data);
                                                
                                                return (data.cancel === false);
                                        }).bind(this);
@@ -62,7 +64,7 @@ $.Redactor.prototype.WoltLabEvent = function() {
                                }
                                
                                require(['EventHandler'], (function(EventHandler) {
-                                       EventHandler.add('com.woltlab.wcf.redactor2', callbackName + '_' + this.WoltLabEvent._elementId, callback);
+                                       EventHandler.add('com.woltlab.wcf.redactor2', callbackName + '_' + uuid + '_' + this.WoltLabEvent._elementId, callback);
                                }).bind(this));
                        }).bind(this));
                }