Including panel:create event on models inheriting panel
authorDarren <darren@darrenwhitlen.com>
Fri, 19 Sep 2014 22:11:26 +0000 (23:11 +0100)
committerDarren <darren@darrenwhitlen.com>
Fri, 19 Sep 2014 22:11:26 +0000 (23:11 +0100)
client/src/models/channel.js
client/src/models/query.js
client/src/models/server.js

index e407c6c4ad6a9ecff3cc1249d316bdb32f7b0e67..4193b082dd4388f7bb8f2c5a9c5798387613cd85 100644 (file)
@@ -47,6 +47,8 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({
 \r
             }\r
         }, this);\r
+\r
+        _kiwi.global.events.emit('panel:created', {panel: this});\r
     },\r
 \r
 \r
index 293be21b1eec1365e12e46ee103b834a48ec784a..7be19e7d3379e79700d087e052389eda28bb1d2b 100644 (file)
@@ -8,6 +8,8 @@ _kiwi.model.Query = _kiwi.model.Channel.extend({
             "name": name,\r
             "scrollback": []\r
         }, {"silent": true});\r
+\r
+        _kiwi.global.events.emit('panel:created', {panel: this});\r
     },\r
 \r
     isChannel: function () {\r
index 3410394e7ccc4d683f0db891321b66e0d138797b..1eefd66dae98e48ce053075468d6fffe6675c8a0 100644 (file)
@@ -7,7 +7,7 @@ _kiwi.model.Server = _kiwi.model.Channel.extend({
             "name": name\r
         }, {"silent": true});\r
 \r
-        //this.addMsg(' ', '--> Kiwi IRC: Such an awesome IRC client', '', {style: 'color:#009900;'});\r
+        _kiwi.global.events.emit('panel:created', {panel: this});\r
     },\r
 \r
     isServer: function () {\r