From: Darren Date: Fri, 19 Sep 2014 22:11:26 +0000 (+0100) Subject: Including panel:create event on models inheriting panel X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6b41f00199c51ab51844b510805a494627b99b0b;p=KiwiIRC.git Including panel:create event on models inheriting panel --- diff --git a/client/src/models/channel.js b/client/src/models/channel.js index e407c6c..4193b08 100644 --- a/client/src/models/channel.js +++ b/client/src/models/channel.js @@ -47,6 +47,8 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ } }, this); + + _kiwi.global.events.emit('panel:created', {panel: this}); }, diff --git a/client/src/models/query.js b/client/src/models/query.js index 293be21..7be19e7 100644 --- a/client/src/models/query.js +++ b/client/src/models/query.js @@ -8,6 +8,8 @@ _kiwi.model.Query = _kiwi.model.Channel.extend({ "name": name, "scrollback": [] }, {"silent": true}); + + _kiwi.global.events.emit('panel:created', {panel: this}); }, isChannel: function () { diff --git a/client/src/models/server.js b/client/src/models/server.js index 3410394..1eefd66 100644 --- a/client/src/models/server.js +++ b/client/src/models/server.js @@ -7,7 +7,7 @@ _kiwi.model.Server = _kiwi.model.Channel.extend({ "name": name }, {"silent": true}); - //this.addMsg(' ', '--> Kiwi IRC: Such an awesome IRC client', '', {style: 'color:#009900;'}); + _kiwi.global.events.emit('panel:created', {panel: this}); }, isServer: function () {