mirror of
https://github.com/Mibew/emoji-plugin.git
synced 2025-01-22 09:30:33 +03:00
Make the plugin works with invitations
This commit is contained in:
parent
14392ac494
commit
da1e7b2352
19
js/plugin.js
19
js/plugin.js
@ -17,15 +17,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function (Mibew) {
|
(function (Mibew) {
|
||||||
|
// Initialize separated Marionette.js module for the plugin.
|
||||||
var module = Mibew.Application.module(
|
var module = Mibew.Application.module(
|
||||||
'Chat.MibewEmojiPlugin',
|
'MibewEmojiPlugin',
|
||||||
{startWithParent: false}
|
{startWithParent: false}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Start the module only after the parent one will be initialized.
|
// Make the plugin works together with "Chat" and "Invitation" modules.
|
||||||
Mibew.Application.Chat.on('start', function() {
|
var eventsMap = {
|
||||||
module.start();
|
'start': function() {
|
||||||
});
|
module.start();
|
||||||
|
},
|
||||||
|
'stop': function() {
|
||||||
|
module.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Mibew.Application.Chat.on(eventsMap);
|
||||||
|
Mibew.Application.Invitation.on(eventsMap);
|
||||||
|
|
||||||
module.addInitializer(function() {
|
module.addInitializer(function() {
|
||||||
var imagesDir = Mibew.PluginOptions.MibewEmoji.imagesDir;
|
var imagesDir = Mibew.PluginOptions.MibewEmoji.imagesDir;
|
||||||
|
Loading…
Reference in New Issue
Block a user