1 _kiwi
.view
.Channel
= _kiwi
.view
.Panel
.extend({
2 initialize: function (options
) {
3 this.initializePanel(options
);
4 this.model
.bind('change:topic', this.topic
, this);
6 // Only show the loader if this is a channel (ie. not a query)
7 if (this.model
.isChannel()) {
8 this.$el
.append('<div class="initial_loader" style="margin:1em;text-align:center;">Joining channel.. <span class="loader"></span></div>');
12 // Override the existing newMsg() method to remove the joining channel loader
14 this.$el
.find('.initial_loader').slideUp(function () {
18 return this.constructor.__super__
.newMsg
.apply(this, arguments
);
21 topic: function (topic
) {
22 if (typeof topic
!== 'string' || !topic
) {
23 topic
= this.model
.get("topic");
26 this.model
.addMsg('', '== Topic for ' + this.model
.get('name') + ' is: ' + topic
, 'topic');
28 // If this is the active channel then update the topic bar
29 if (_kiwi
.app
.panels().active
=== this) {
30 _kiwi
.app
.topicbar
.setCurrentTopic(this.model
.get("topic"));